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

          Line data    Source code
       1             : 
       2             : /* Python wrapper functions auto-generated by pidl */
       3             : #define PY_SSIZE_T_CLEAN 1 /* We use Py_ssize_t for PyArg_ParseTupleAndKeywords */
       4             : #include <Python.h>
       5             : #include "python/py3compat.h"
       6             : #include "includes.h"
       7             : #include "python/modules.h"
       8             : #include <pytalloc.h>
       9             : #include "librpc/rpc/pyrpc.h"
      10             : #include "librpc/rpc/pyrpc_util.h"
      11             : #include "bin/default/librpc/gen_ndr/ndr_netlogon.h"
      12             : #include "bin/default/librpc/gen_ndr/ndr_netlogon_c.h"
      13             : 
      14             : /*
      15             :  * Suppress compiler warnings if the generated code does not call these
      16             :  * functions
      17             :  */
      18             : #ifndef _MAYBE_UNUSED_
      19             : #ifdef __has_attribute
      20             : #if __has_attribute(unused)
      21             : #define _MAYBE_UNUSED_ __attribute__ ((unused))
      22             : #else
      23             : #define _MAYBE_UNUSED_
      24             : #endif
      25             : #endif
      26             : #endif
      27             : /*
      28             :  * These functions are here to ensure they can be optimized out by
      29             :  * the compiler based on the constant input values
      30             :  */
      31             : 
      32        4415 : static inline unsigned long long ndr_sizeof2uintmax(size_t var_size)
      33             : {
      34        4415 :         switch (var_size) {
      35           0 :         case 8:
      36           0 :                 return UINT64_MAX;
      37         721 :         case 4:
      38         721 :                 return UINT32_MAX;
      39          38 :         case 2:
      40          38 :                 return UINT16_MAX;
      41        3656 :         case 1:
      42        3656 :                 return UINT8_MAX;
      43             :         }
      44             : 
      45           0 :         return 0;
      46             : }
      47             : 
      48          19 : static inline _MAYBE_UNUSED_ long long ndr_sizeof2intmax(size_t var_size)
      49             : {
      50          19 :         switch (var_size) {
      51          19 :         case 8:
      52          19 :                 return INT64_MAX;
      53           0 :         case 4:
      54           0 :                 return INT32_MAX;
      55           0 :         case 2:
      56           0 :                 return INT16_MAX;
      57           0 :         case 1:
      58           0 :                 return INT8_MAX;
      59             :         }
      60             : 
      61           0 :         return 0;
      62             : }
      63             : 
      64             : #include "librpc/gen_ndr/misc.h"
      65             : #include "librpc/gen_ndr/lsa.h"
      66             : #include "librpc/gen_ndr/samr.h"
      67             : #include "librpc/gen_ndr/security.h"
      68             : static PyTypeObject netr_UasInfo_Type;
      69             : static PyTypeObject netr_UasLogoffInfo_Type;
      70             : static PyTypeObject netr_AcctLockStr_Type;
      71             : static PyTypeObject netr_IdentityInfo_Type;
      72             : static PyTypeObject netr_PasswordInfo_Type;
      73             : static PyTypeObject netr_ChallengeResponse_Type;
      74             : static PyTypeObject netr_NetworkInfo_Type;
      75             : static PyTypeObject netr_GenericInfo_Type;
      76             : static PyTypeObject netr_LogonLevel_Type;
      77             : static PyTypeObject netr_UserSessionKey_Type;
      78             : static PyTypeObject netr_LMSessionKey_Type;
      79             : static PyTypeObject netr_SamBaseInfo_Type;
      80             : static PyTypeObject netr_SamInfo2_Type;
      81             : static PyTypeObject netr_SidAttr_Type;
      82             : static PyTypeObject netr_SamInfo3_Type;
      83             : static PyTypeObject netr_SamInfo6_Type;
      84             : static PyTypeObject netr_PacInfo_Type;
      85             : static PyTypeObject netr_GenericInfo2_Type;
      86             : static PyTypeObject netr_Validation_Type;
      87             : static PyTypeObject netr_Credential_Type;
      88             : static PyTypeObject netr_Authenticator_Type;
      89             : static PyTypeObject netr_DELTA_DELETE_USER_Type;
      90             : static PyTypeObject netr_USER_KEY16_Type;
      91             : static PyTypeObject netr_PasswordHistory_Type;
      92             : static PyTypeObject netr_USER_KEYS2_Type;
      93             : static PyTypeObject netr_USER_KEY_UNION_Type;
      94             : static PyTypeObject netr_USER_KEYS_Type;
      95             : static PyTypeObject netr_USER_PRIVATE_INFO_Type;
      96             : static PyTypeObject netr_DELTA_USER_Type;
      97             : static PyTypeObject netr_DELTA_DOMAIN_Type;
      98             : static PyTypeObject netr_DELTA_GROUP_Type;
      99             : static PyTypeObject netr_DELTA_RENAME_Type;
     100             : static PyTypeObject netr_DELTA_GROUP_MEMBER_Type;
     101             : static PyTypeObject netr_DELTA_ALIAS_Type;
     102             : static PyTypeObject netr_DELTA_ALIAS_MEMBER_Type;
     103             : static PyTypeObject netr_QUOTA_LIMITS_Type;
     104             : static PyTypeObject netr_DELTA_POLICY_Type;
     105             : static PyTypeObject netr_DELTA_TRUSTED_DOMAIN_Type;
     106             : static PyTypeObject netr_DELTA_ACCOUNT_Type;
     107             : static PyTypeObject netr_CIPHER_VALUE_Type;
     108             : static PyTypeObject netr_DELTA_SECRET_Type;
     109             : static PyTypeObject netr_DELTA_UNION_Type;
     110             : static PyTypeObject netr_DELTA_ID_UNION_Type;
     111             : static PyTypeObject netr_DELTA_ENUM_Type;
     112             : static PyTypeObject netr_DELTA_ENUM_ARRAY_Type;
     113             : static PyTypeObject netr_UAS_INFO_0_Type;
     114             : static PyTypeObject netr_AccountBuffer_Type;
     115             : static PyTypeObject netr_NETLOGON_INFO_1_Type;
     116             : static PyTypeObject netr_NETLOGON_INFO_2_Type;
     117             : static PyTypeObject netr_NETLOGON_INFO_3_Type;
     118             : static PyTypeObject netr_NETLOGON_INFO_4_Type;
     119             : static PyTypeObject netr_CONTROL_QUERY_INFORMATION_Type;
     120             : static PyTypeObject netr_CONTROL_DATA_INFORMATION_Type;
     121             : static PyTypeObject netr_ChangeLogObject_Type;
     122             : static PyTypeObject netr_ChangeLogEntry_Type;
     123             : static PyTypeObject netr_Blob_Type;
     124             : static PyTypeObject netr_DsRGetDCNameInfo_Type;
     125             : static PyTypeObject netr_Capabilities_Type;
     126             : static PyTypeObject netr_LsaPolicyInformation_Type;
     127             : static PyTypeObject netr_OsVersionInfoEx_Type;
     128             : static PyTypeObject netr_OsVersion_Type;
     129             : static PyTypeObject netr_OsVersionContainer_Type;
     130             : static PyTypeObject netr_WorkstationInformation_Type;
     131             : static PyTypeObject netr_WorkstationInfo_Type;
     132             : static PyTypeObject netr_trust_extension_info_Type;
     133             : static PyTypeObject netr_trust_extension_Type;
     134             : static PyTypeObject netr_trust_extension_container_Type;
     135             : static PyTypeObject netr_OneDomainInfo_Type;
     136             : static PyTypeObject netr_DomainInformation_Type;
     137             : static PyTypeObject netr_DomainInfo_Type;
     138             : static PyTypeObject NL_PASSWORD_VERSION_Type;
     139             : static PyTypeObject netr_CryptPassword_Type;
     140             : static PyTypeObject netr_SendToSamResetBadPasswordCount_Type;
     141             : static PyTypeObject netr_SendToSamMessage_Type;
     142             : static PyTypeObject netr_SendToSamBase_Type;
     143             : static PyTypeObject netr_DsRAddressToSitenamesWCtr_Type;
     144             : static PyTypeObject netr_DsRAddress_Type;
     145             : static PyTypeObject netr_DomainTrust_Type;
     146             : static PyTypeObject netr_DomainTrustList_Type;
     147             : static PyTypeObject netr_DsRAddressToSitenamesExWCtr_Type;
     148             : static PyTypeObject DcSitesCtr_Type;
     149             : static PyTypeObject netr_TrustInfo_Type;
     150             : static PyTypeObject NL_DNS_NAME_INFO_Type;
     151             : static PyTypeObject NL_DNS_NAME_INFO_ARRAY_Type;
     152             : static PyTypeObject netlogon_InterfaceType;
     153             : static PyTypeObject netr_LogonUasLogon_Type;
     154             : static PyTypeObject netr_LogonUasLogoff_Type;
     155             : static PyTypeObject netr_LogonSamLogon_Type;
     156             : static PyTypeObject netr_LogonSamLogoff_Type;
     157             : static PyTypeObject netr_ServerReqChallenge_Type;
     158             : static PyTypeObject netr_ServerAuthenticate_Type;
     159             : static PyTypeObject netr_ServerPasswordSet_Type;
     160             : static PyTypeObject netr_DatabaseDeltas_Type;
     161             : static PyTypeObject netr_DatabaseSync_Type;
     162             : static PyTypeObject netr_AccountDeltas_Type;
     163             : static PyTypeObject netr_AccountSync_Type;
     164             : static PyTypeObject netr_GetDcName_Type;
     165             : static PyTypeObject netr_LogonControl_Type;
     166             : static PyTypeObject netr_GetAnyDCName_Type;
     167             : static PyTypeObject netr_LogonControl2_Type;
     168             : static PyTypeObject netr_ServerAuthenticate2_Type;
     169             : static PyTypeObject netr_DatabaseSync2_Type;
     170             : static PyTypeObject netr_DatabaseRedo_Type;
     171             : static PyTypeObject netr_LogonControl2Ex_Type;
     172             : static PyTypeObject netr_NetrEnumerateTrustedDomains_Type;
     173             : static PyTypeObject netr_DsRGetDCName_Type;
     174             : static PyTypeObject netr_LogonGetCapabilities_Type;
     175             : static PyTypeObject netr_LogonGetTrustRid_Type;
     176             : static PyTypeObject netr_ServerAuthenticate3_Type;
     177             : static PyTypeObject netr_DsRGetDCNameEx_Type;
     178             : static PyTypeObject netr_DsRGetSiteName_Type;
     179             : static PyTypeObject netr_LogonGetDomainInfo_Type;
     180             : static PyTypeObject netr_ServerPasswordSet2_Type;
     181             : static PyTypeObject netr_ServerPasswordGet_Type;
     182             : static PyTypeObject netr_NetrLogonSendToSam_Type;
     183             : static PyTypeObject netr_DsRAddressToSitenamesW_Type;
     184             : static PyTypeObject netr_DsRGetDCNameEx2_Type;
     185             : static PyTypeObject netr_NetrEnumerateTrustedDomainsEx_Type;
     186             : static PyTypeObject netr_DsRAddressToSitenamesExW_Type;
     187             : static PyTypeObject netr_DsrGetDcSiteCoverageW_Type;
     188             : static PyTypeObject netr_LogonSamLogonEx_Type;
     189             : static PyTypeObject netr_DsrEnumerateDomainTrusts_Type;
     190             : static PyTypeObject netr_DsrDeregisterDNSHostRecords_Type;
     191             : static PyTypeObject netr_ServerTrustPasswordsGet_Type;
     192             : static PyTypeObject netr_DsRGetForestTrustInformation_Type;
     193             : static PyTypeObject netr_GetForestTrustInformation_Type;
     194             : static PyTypeObject netr_LogonSamLogonWithFlags_Type;
     195             : static PyTypeObject netr_ServerGetTrustInfo_Type;
     196             : static PyTypeObject netr_Unused47_Type;
     197             : static PyTypeObject netr_DsrUpdateReadOnlyServerDnsRecords_Type;
     198             : 
     199             : static PyTypeObject *BaseObject_Type;
     200             : static PyTypeObject *lsa_String_Type;
     201             : static PyTypeObject *samr_Password_Type;
     202             : static PyTypeObject *samr_RidWithAttributeArray_Type;
     203             : static PyTypeObject *lsa_StringLarge_Type;
     204             : static PyTypeObject *dom_sid_Type;
     205             : static PyTypeObject *samr_LogonHours_Type;
     206             : static PyTypeObject *lsa_BinaryString_Type;
     207             : static PyTypeObject *sec_desc_buf_Type;
     208             : static PyTypeObject *lsa_SidArray_Type;
     209             : static PyTypeObject *GUID_Type;
     210             : static PyTypeObject *lsa_ForestTrustInformation_Type;
     211             : static PyTypeObject *ClientConnection_Type;
     212             : static PyTypeObject *ndr_syntax_id_Type;
     213             : 
     214           0 : static PyObject *py_netr_UasInfo_get_account_name(PyObject *obj, void *closure)
     215             : {
     216           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     217             :         PyObject *py_account_name;
     218           0 :         if (object->account_name == NULL) {
     219           0 :                 Py_RETURN_NONE;
     220             :         }
     221           0 :         if (object->account_name == NULL) {
     222           0 :                 py_account_name = Py_None;
     223           0 :                 Py_INCREF(py_account_name);
     224             :         } else {
     225           0 :                 if (object->account_name == NULL) {
     226           0 :                         py_account_name = Py_None;
     227           0 :                         Py_INCREF(py_account_name);
     228             :                 } else {
     229           0 :                         py_account_name = PyUnicode_Decode(object->account_name, strlen(object->account_name), "utf-8", "ignore");
     230             :                 }
     231             :         }
     232           0 :         return py_account_name;
     233             : }
     234             : 
     235           0 : static int py_netr_UasInfo_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
     236             : {
     237           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     238           0 :         if (value == NULL) {
     239           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->account_name");
     240           0 :                 return -1;
     241             :         }
     242           0 :         if (value == Py_None) {
     243           0 :                 object->account_name = NULL;
     244             :         } else {
     245           0 :                 object->account_name = NULL;
     246             :                 {
     247             :                         const char *test_str;
     248             :                         const char *talloc_str;
     249           0 :                         PyObject *unicode = NULL;
     250           0 :                         if (PyUnicode_Check(value)) {
     251           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     252           0 :                                 if (unicode == NULL) {
     253           0 :                                         PyErr_NoMemory();
     254           0 :                                         return -1;
     255             :                                 }
     256           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     257           0 :                         } else if (PyBytes_Check(value)) {
     258           0 :                                 test_str = PyBytes_AS_STRING(value);
     259             :                         } else {
     260           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     261           0 :                                 return -1;
     262             :                         }
     263           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     264           0 :                         if (unicode != NULL) {
     265           0 :                                 Py_DECREF(unicode);
     266             :                         }
     267           0 :                         if (talloc_str == NULL) {
     268           0 :                                 PyErr_NoMemory();
     269           0 :                                 return -1;
     270             :                         }
     271           0 :                         object->account_name = talloc_str;
     272             :                 }
     273             :         }
     274           0 :         return 0;
     275             : }
     276             : 
     277           0 : static PyObject *py_netr_UasInfo_get_priv(PyObject *obj, void *closure)
     278             : {
     279           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     280             :         PyObject *py_priv;
     281           0 :         py_priv = PyLong_FromUnsignedLongLong((uint32_t)object->priv);
     282           0 :         return py_priv;
     283             : }
     284             : 
     285           0 : static int py_netr_UasInfo_set_priv(PyObject *py_obj, PyObject *value, void *closure)
     286             : {
     287           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     288           0 :         if (value == NULL) {
     289           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->priv");
     290           0 :                 return -1;
     291             :         }
     292             :         {
     293           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->priv));
     294           0 :                 if (PyLong_Check(value)) {
     295             :                         unsigned long long test_var;
     296           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     297           0 :                         if (PyErr_Occurred() != NULL) {
     298           0 :                                 return -1;
     299             :                         }
     300           0 :                         if (test_var > uint_max) {
     301           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
     302             :                                   PyLong_Type.tp_name, uint_max, test_var);
     303           0 :                                 return -1;
     304             :                         }
     305           0 :                         object->priv = test_var;
     306             :                 } else {
     307           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     308             :                           PyLong_Type.tp_name);
     309           0 :                         return -1;
     310             :                 }
     311             :         }
     312           0 :         return 0;
     313             : }
     314             : 
     315           0 : static PyObject *py_netr_UasInfo_get_auth_flags(PyObject *obj, void *closure)
     316             : {
     317           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     318             :         PyObject *py_auth_flags;
     319           0 :         py_auth_flags = PyLong_FromUnsignedLongLong((uint32_t)object->auth_flags);
     320           0 :         return py_auth_flags;
     321             : }
     322             : 
     323           0 : static int py_netr_UasInfo_set_auth_flags(PyObject *py_obj, PyObject *value, void *closure)
     324             : {
     325           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     326           0 :         if (value == NULL) {
     327           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auth_flags");
     328           0 :                 return -1;
     329             :         }
     330             :         {
     331           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auth_flags));
     332           0 :                 if (PyLong_Check(value)) {
     333             :                         unsigned long long test_var;
     334           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     335           0 :                         if (PyErr_Occurred() != NULL) {
     336           0 :                                 return -1;
     337             :                         }
     338           0 :                         if (test_var > uint_max) {
     339           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
     340             :                                   PyLong_Type.tp_name, uint_max, test_var);
     341           0 :                                 return -1;
     342             :                         }
     343           0 :                         object->auth_flags = test_var;
     344             :                 } else {
     345           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     346             :                           PyLong_Type.tp_name);
     347           0 :                         return -1;
     348             :                 }
     349             :         }
     350           0 :         return 0;
     351             : }
     352             : 
     353           0 : static PyObject *py_netr_UasInfo_get_logon_count(PyObject *obj, void *closure)
     354             : {
     355           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     356             :         PyObject *py_logon_count;
     357           0 :         py_logon_count = PyLong_FromUnsignedLongLong((uint32_t)object->logon_count);
     358           0 :         return py_logon_count;
     359             : }
     360             : 
     361           0 : static int py_netr_UasInfo_set_logon_count(PyObject *py_obj, PyObject *value, void *closure)
     362             : {
     363           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     364           0 :         if (value == NULL) {
     365           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_count");
     366           0 :                 return -1;
     367             :         }
     368             :         {
     369           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_count));
     370           0 :                 if (PyLong_Check(value)) {
     371             :                         unsigned long long test_var;
     372           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     373           0 :                         if (PyErr_Occurred() != NULL) {
     374           0 :                                 return -1;
     375             :                         }
     376           0 :                         if (test_var > uint_max) {
     377           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
     378             :                                   PyLong_Type.tp_name, uint_max, test_var);
     379           0 :                                 return -1;
     380             :                         }
     381           0 :                         object->logon_count = test_var;
     382             :                 } else {
     383           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     384             :                           PyLong_Type.tp_name);
     385           0 :                         return -1;
     386             :                 }
     387             :         }
     388           0 :         return 0;
     389             : }
     390             : 
     391           0 : static PyObject *py_netr_UasInfo_get_bad_pw_count(PyObject *obj, void *closure)
     392             : {
     393           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     394             :         PyObject *py_bad_pw_count;
     395           0 :         py_bad_pw_count = PyLong_FromUnsignedLongLong((uint32_t)object->bad_pw_count);
     396           0 :         return py_bad_pw_count;
     397             : }
     398             : 
     399           0 : static int py_netr_UasInfo_set_bad_pw_count(PyObject *py_obj, PyObject *value, void *closure)
     400             : {
     401           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     402           0 :         if (value == NULL) {
     403           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bad_pw_count");
     404           0 :                 return -1;
     405             :         }
     406             :         {
     407           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bad_pw_count));
     408           0 :                 if (PyLong_Check(value)) {
     409             :                         unsigned long long test_var;
     410           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     411           0 :                         if (PyErr_Occurred() != NULL) {
     412           0 :                                 return -1;
     413             :                         }
     414           0 :                         if (test_var > uint_max) {
     415           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
     416             :                                   PyLong_Type.tp_name, uint_max, test_var);
     417           0 :                                 return -1;
     418             :                         }
     419           0 :                         object->bad_pw_count = test_var;
     420             :                 } else {
     421           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     422             :                           PyLong_Type.tp_name);
     423           0 :                         return -1;
     424             :                 }
     425             :         }
     426           0 :         return 0;
     427             : }
     428             : 
     429           0 : static PyObject *py_netr_UasInfo_get_last_logon(PyObject *obj, void *closure)
     430             : {
     431           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     432             :         PyObject *py_last_logon;
     433           0 :         py_last_logon = PyLong_FromLong(object->last_logon);
     434           0 :         return py_last_logon;
     435             : }
     436             : 
     437           0 : static int py_netr_UasInfo_set_last_logon(PyObject *py_obj, PyObject *value, void *closure)
     438             : {
     439           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     440           0 :         if (value == NULL) {
     441           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_logon");
     442           0 :                 return -1;
     443             :         }
     444             :         {
     445           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->last_logon));
     446           0 :                 const long long int_min = -int_max - 1;
     447           0 :                 if (PyLong_Check(value)) {
     448             :                         long long test_var;
     449           0 :                         test_var = PyLong_AsLongLong(value);
     450           0 :                         if (PyErr_Occurred() != NULL) {
     451           0 :                                 return -1;
     452             :                         }
     453           0 :                         if (test_var < int_min || test_var > int_max) {
     454           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",\
     455             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     456           0 :                                 return -1;
     457             :                         }
     458           0 :                         object->last_logon = test_var;
     459             :                 } else {
     460           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     461             :                           PyLong_Type.tp_name);
     462           0 :                         return -1;
     463             :                 }
     464             :         }
     465           0 :         return 0;
     466             : }
     467             : 
     468           0 : static PyObject *py_netr_UasInfo_get_last_logoff(PyObject *obj, void *closure)
     469             : {
     470           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     471             :         PyObject *py_last_logoff;
     472           0 :         py_last_logoff = PyLong_FromLong(object->last_logoff);
     473           0 :         return py_last_logoff;
     474             : }
     475             : 
     476           0 : static int py_netr_UasInfo_set_last_logoff(PyObject *py_obj, PyObject *value, void *closure)
     477             : {
     478           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     479           0 :         if (value == NULL) {
     480           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_logoff");
     481           0 :                 return -1;
     482             :         }
     483             :         {
     484           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->last_logoff));
     485           0 :                 const long long int_min = -int_max - 1;
     486           0 :                 if (PyLong_Check(value)) {
     487             :                         long long test_var;
     488           0 :                         test_var = PyLong_AsLongLong(value);
     489           0 :                         if (PyErr_Occurred() != NULL) {
     490           0 :                                 return -1;
     491             :                         }
     492           0 :                         if (test_var < int_min || test_var > int_max) {
     493           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",\
     494             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     495           0 :                                 return -1;
     496             :                         }
     497           0 :                         object->last_logoff = test_var;
     498             :                 } else {
     499           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     500             :                           PyLong_Type.tp_name);
     501           0 :                         return -1;
     502             :                 }
     503             :         }
     504           0 :         return 0;
     505             : }
     506             : 
     507           0 : static PyObject *py_netr_UasInfo_get_logoff_time(PyObject *obj, void *closure)
     508             : {
     509           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     510             :         PyObject *py_logoff_time;
     511           0 :         py_logoff_time = PyLong_FromLong(object->logoff_time);
     512           0 :         return py_logoff_time;
     513             : }
     514             : 
     515           0 : static int py_netr_UasInfo_set_logoff_time(PyObject *py_obj, PyObject *value, void *closure)
     516             : {
     517           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     518           0 :         if (value == NULL) {
     519           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logoff_time");
     520           0 :                 return -1;
     521             :         }
     522             :         {
     523           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->logoff_time));
     524           0 :                 const long long int_min = -int_max - 1;
     525           0 :                 if (PyLong_Check(value)) {
     526             :                         long long test_var;
     527           0 :                         test_var = PyLong_AsLongLong(value);
     528           0 :                         if (PyErr_Occurred() != NULL) {
     529           0 :                                 return -1;
     530             :                         }
     531           0 :                         if (test_var < int_min || test_var > int_max) {
     532           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",\
     533             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     534           0 :                                 return -1;
     535             :                         }
     536           0 :                         object->logoff_time = test_var;
     537             :                 } else {
     538           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     539             :                           PyLong_Type.tp_name);
     540           0 :                         return -1;
     541             :                 }
     542             :         }
     543           0 :         return 0;
     544             : }
     545             : 
     546           0 : static PyObject *py_netr_UasInfo_get_kickoff_time(PyObject *obj, void *closure)
     547             : {
     548           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     549             :         PyObject *py_kickoff_time;
     550           0 :         py_kickoff_time = PyLong_FromLong(object->kickoff_time);
     551           0 :         return py_kickoff_time;
     552             : }
     553             : 
     554           0 : static int py_netr_UasInfo_set_kickoff_time(PyObject *py_obj, PyObject *value, void *closure)
     555             : {
     556           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     557           0 :         if (value == NULL) {
     558           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->kickoff_time");
     559           0 :                 return -1;
     560             :         }
     561             :         {
     562           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->kickoff_time));
     563           0 :                 const long long int_min = -int_max - 1;
     564           0 :                 if (PyLong_Check(value)) {
     565             :                         long long test_var;
     566           0 :                         test_var = PyLong_AsLongLong(value);
     567           0 :                         if (PyErr_Occurred() != NULL) {
     568           0 :                                 return -1;
     569             :                         }
     570           0 :                         if (test_var < int_min || test_var > int_max) {
     571           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",\
     572             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     573           0 :                                 return -1;
     574             :                         }
     575           0 :                         object->kickoff_time = test_var;
     576             :                 } else {
     577           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     578             :                           PyLong_Type.tp_name);
     579           0 :                         return -1;
     580             :                 }
     581             :         }
     582           0 :         return 0;
     583             : }
     584             : 
     585           0 : static PyObject *py_netr_UasInfo_get_password_age(PyObject *obj, void *closure)
     586             : {
     587           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     588             :         PyObject *py_password_age;
     589           0 :         py_password_age = PyLong_FromUnsignedLongLong((uint32_t)object->password_age);
     590           0 :         return py_password_age;
     591             : }
     592             : 
     593           0 : static int py_netr_UasInfo_set_password_age(PyObject *py_obj, PyObject *value, void *closure)
     594             : {
     595           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     596           0 :         if (value == NULL) {
     597           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->password_age");
     598           0 :                 return -1;
     599             :         }
     600             :         {
     601           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->password_age));
     602           0 :                 if (PyLong_Check(value)) {
     603             :                         unsigned long long test_var;
     604           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     605           0 :                         if (PyErr_Occurred() != NULL) {
     606           0 :                                 return -1;
     607             :                         }
     608           0 :                         if (test_var > uint_max) {
     609           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
     610             :                                   PyLong_Type.tp_name, uint_max, test_var);
     611           0 :                                 return -1;
     612             :                         }
     613           0 :                         object->password_age = test_var;
     614             :                 } else {
     615           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     616             :                           PyLong_Type.tp_name);
     617           0 :                         return -1;
     618             :                 }
     619             :         }
     620           0 :         return 0;
     621             : }
     622             : 
     623           0 : static PyObject *py_netr_UasInfo_get_pw_can_change(PyObject *obj, void *closure)
     624             : {
     625           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     626             :         PyObject *py_pw_can_change;
     627           0 :         py_pw_can_change = PyLong_FromLong(object->pw_can_change);
     628           0 :         return py_pw_can_change;
     629             : }
     630             : 
     631           0 : static int py_netr_UasInfo_set_pw_can_change(PyObject *py_obj, PyObject *value, void *closure)
     632             : {
     633           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     634           0 :         if (value == NULL) {
     635           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pw_can_change");
     636           0 :                 return -1;
     637             :         }
     638             :         {
     639           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->pw_can_change));
     640           0 :                 const long long int_min = -int_max - 1;
     641           0 :                 if (PyLong_Check(value)) {
     642             :                         long long test_var;
     643           0 :                         test_var = PyLong_AsLongLong(value);
     644           0 :                         if (PyErr_Occurred() != NULL) {
     645           0 :                                 return -1;
     646             :                         }
     647           0 :                         if (test_var < int_min || test_var > int_max) {
     648           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",\
     649             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     650           0 :                                 return -1;
     651             :                         }
     652           0 :                         object->pw_can_change = test_var;
     653             :                 } else {
     654           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     655             :                           PyLong_Type.tp_name);
     656           0 :                         return -1;
     657             :                 }
     658             :         }
     659           0 :         return 0;
     660             : }
     661             : 
     662           0 : static PyObject *py_netr_UasInfo_get_pw_must_change(PyObject *obj, void *closure)
     663             : {
     664           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     665             :         PyObject *py_pw_must_change;
     666           0 :         py_pw_must_change = PyLong_FromLong(object->pw_must_change);
     667           0 :         return py_pw_must_change;
     668             : }
     669             : 
     670           0 : static int py_netr_UasInfo_set_pw_must_change(PyObject *py_obj, PyObject *value, void *closure)
     671             : {
     672           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     673           0 :         if (value == NULL) {
     674           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pw_must_change");
     675           0 :                 return -1;
     676             :         }
     677             :         {
     678           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->pw_must_change));
     679           0 :                 const long long int_min = -int_max - 1;
     680           0 :                 if (PyLong_Check(value)) {
     681             :                         long long test_var;
     682           0 :                         test_var = PyLong_AsLongLong(value);
     683           0 :                         if (PyErr_Occurred() != NULL) {
     684           0 :                                 return -1;
     685             :                         }
     686           0 :                         if (test_var < int_min || test_var > int_max) {
     687           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",\
     688             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
     689           0 :                                 return -1;
     690             :                         }
     691           0 :                         object->pw_must_change = test_var;
     692             :                 } else {
     693           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     694             :                           PyLong_Type.tp_name);
     695           0 :                         return -1;
     696             :                 }
     697             :         }
     698           0 :         return 0;
     699             : }
     700             : 
     701           0 : static PyObject *py_netr_UasInfo_get_computer(PyObject *obj, void *closure)
     702             : {
     703           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     704             :         PyObject *py_computer;
     705           0 :         if (object->computer == NULL) {
     706           0 :                 Py_RETURN_NONE;
     707             :         }
     708           0 :         if (object->computer == NULL) {
     709           0 :                 py_computer = Py_None;
     710           0 :                 Py_INCREF(py_computer);
     711             :         } else {
     712           0 :                 if (object->computer == NULL) {
     713           0 :                         py_computer = Py_None;
     714           0 :                         Py_INCREF(py_computer);
     715             :                 } else {
     716           0 :                         py_computer = PyUnicode_Decode(object->computer, strlen(object->computer), "utf-8", "ignore");
     717             :                 }
     718             :         }
     719           0 :         return py_computer;
     720             : }
     721             : 
     722           0 : static int py_netr_UasInfo_set_computer(PyObject *py_obj, PyObject *value, void *closure)
     723             : {
     724           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     725           0 :         if (value == NULL) {
     726           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->computer");
     727           0 :                 return -1;
     728             :         }
     729           0 :         if (value == Py_None) {
     730           0 :                 object->computer = NULL;
     731             :         } else {
     732           0 :                 object->computer = NULL;
     733             :                 {
     734             :                         const char *test_str;
     735             :                         const char *talloc_str;
     736           0 :                         PyObject *unicode = NULL;
     737           0 :                         if (PyUnicode_Check(value)) {
     738           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     739           0 :                                 if (unicode == NULL) {
     740           0 :                                         PyErr_NoMemory();
     741           0 :                                         return -1;
     742             :                                 }
     743           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     744           0 :                         } else if (PyBytes_Check(value)) {
     745           0 :                                 test_str = PyBytes_AS_STRING(value);
     746             :                         } else {
     747           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     748           0 :                                 return -1;
     749             :                         }
     750           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     751           0 :                         if (unicode != NULL) {
     752           0 :                                 Py_DECREF(unicode);
     753             :                         }
     754           0 :                         if (talloc_str == NULL) {
     755           0 :                                 PyErr_NoMemory();
     756           0 :                                 return -1;
     757             :                         }
     758           0 :                         object->computer = talloc_str;
     759             :                 }
     760             :         }
     761           0 :         return 0;
     762             : }
     763             : 
     764           0 : static PyObject *py_netr_UasInfo_get_domain(PyObject *obj, void *closure)
     765             : {
     766           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     767             :         PyObject *py_domain;
     768           0 :         if (object->domain == NULL) {
     769           0 :                 Py_RETURN_NONE;
     770             :         }
     771           0 :         if (object->domain == NULL) {
     772           0 :                 py_domain = Py_None;
     773           0 :                 Py_INCREF(py_domain);
     774             :         } else {
     775           0 :                 if (object->domain == NULL) {
     776           0 :                         py_domain = Py_None;
     777           0 :                         Py_INCREF(py_domain);
     778             :                 } else {
     779           0 :                         py_domain = PyUnicode_Decode(object->domain, strlen(object->domain), "utf-8", "ignore");
     780             :                 }
     781             :         }
     782           0 :         return py_domain;
     783             : }
     784             : 
     785           0 : static int py_netr_UasInfo_set_domain(PyObject *py_obj, PyObject *value, void *closure)
     786             : {
     787           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     788           0 :         if (value == NULL) {
     789           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain");
     790           0 :                 return -1;
     791             :         }
     792           0 :         if (value == Py_None) {
     793           0 :                 object->domain = NULL;
     794             :         } else {
     795           0 :                 object->domain = NULL;
     796             :                 {
     797             :                         const char *test_str;
     798             :                         const char *talloc_str;
     799           0 :                         PyObject *unicode = NULL;
     800           0 :                         if (PyUnicode_Check(value)) {
     801           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     802           0 :                                 if (unicode == NULL) {
     803           0 :                                         PyErr_NoMemory();
     804           0 :                                         return -1;
     805             :                                 }
     806           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     807           0 :                         } else if (PyBytes_Check(value)) {
     808           0 :                                 test_str = PyBytes_AS_STRING(value);
     809             :                         } else {
     810           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     811           0 :                                 return -1;
     812             :                         }
     813           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     814           0 :                         if (unicode != NULL) {
     815           0 :                                 Py_DECREF(unicode);
     816             :                         }
     817           0 :                         if (talloc_str == NULL) {
     818           0 :                                 PyErr_NoMemory();
     819           0 :                                 return -1;
     820             :                         }
     821           0 :                         object->domain = talloc_str;
     822             :                 }
     823             :         }
     824           0 :         return 0;
     825             : }
     826             : 
     827           0 : static PyObject *py_netr_UasInfo_get_script_path(PyObject *obj, void *closure)
     828             : {
     829           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     830             :         PyObject *py_script_path;
     831           0 :         if (object->script_path == NULL) {
     832           0 :                 Py_RETURN_NONE;
     833             :         }
     834           0 :         if (object->script_path == NULL) {
     835           0 :                 py_script_path = Py_None;
     836           0 :                 Py_INCREF(py_script_path);
     837             :         } else {
     838           0 :                 if (object->script_path == NULL) {
     839           0 :                         py_script_path = Py_None;
     840           0 :                         Py_INCREF(py_script_path);
     841             :                 } else {
     842           0 :                         py_script_path = PyUnicode_Decode(object->script_path, strlen(object->script_path), "utf-8", "ignore");
     843             :                 }
     844             :         }
     845           0 :         return py_script_path;
     846             : }
     847             : 
     848           0 : static int py_netr_UasInfo_set_script_path(PyObject *py_obj, PyObject *value, void *closure)
     849             : {
     850           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     851           0 :         if (value == NULL) {
     852           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->script_path");
     853           0 :                 return -1;
     854             :         }
     855           0 :         if (value == Py_None) {
     856           0 :                 object->script_path = NULL;
     857             :         } else {
     858           0 :                 object->script_path = NULL;
     859             :                 {
     860             :                         const char *test_str;
     861             :                         const char *talloc_str;
     862           0 :                         PyObject *unicode = NULL;
     863           0 :                         if (PyUnicode_Check(value)) {
     864           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
     865           0 :                                 if (unicode == NULL) {
     866           0 :                                         PyErr_NoMemory();
     867           0 :                                         return -1;
     868             :                                 }
     869           0 :                                 test_str = PyBytes_AS_STRING(unicode);
     870           0 :                         } else if (PyBytes_Check(value)) {
     871           0 :                                 test_str = PyBytes_AS_STRING(value);
     872             :                         } else {
     873           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
     874           0 :                                 return -1;
     875             :                         }
     876           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
     877           0 :                         if (unicode != NULL) {
     878           0 :                                 Py_DECREF(unicode);
     879             :                         }
     880           0 :                         if (talloc_str == NULL) {
     881           0 :                                 PyErr_NoMemory();
     882           0 :                                 return -1;
     883             :                         }
     884           0 :                         object->script_path = talloc_str;
     885             :                 }
     886             :         }
     887           0 :         return 0;
     888             : }
     889             : 
     890           0 : static PyObject *py_netr_UasInfo_get_unknown(PyObject *obj, void *closure)
     891             : {
     892           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(obj);
     893             :         PyObject *py_unknown;
     894           0 :         py_unknown = PyLong_FromUnsignedLongLong((uint32_t)object->unknown);
     895           0 :         return py_unknown;
     896             : }
     897             : 
     898           0 : static int py_netr_UasInfo_set_unknown(PyObject *py_obj, PyObject *value, void *closure)
     899             : {
     900           0 :         struct netr_UasInfo *object = (struct netr_UasInfo *)pytalloc_get_ptr(py_obj);
     901           0 :         if (value == NULL) {
     902           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown");
     903           0 :                 return -1;
     904             :         }
     905             :         {
     906           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown));
     907           0 :                 if (PyLong_Check(value)) {
     908             :                         unsigned long long test_var;
     909           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
     910           0 :                         if (PyErr_Occurred() != NULL) {
     911           0 :                                 return -1;
     912             :                         }
     913           0 :                         if (test_var > uint_max) {
     914           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
     915             :                                   PyLong_Type.tp_name, uint_max, test_var);
     916           0 :                                 return -1;
     917             :                         }
     918           0 :                         object->unknown = test_var;
     919             :                 } else {
     920           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
     921             :                           PyLong_Type.tp_name);
     922           0 :                         return -1;
     923             :                 }
     924             :         }
     925           0 :         return 0;
     926             : }
     927             : 
     928             : static PyGetSetDef py_netr_UasInfo_getsetters[] = {
     929             :         {
     930             :                 .name = discard_const_p(char, "account_name"),
     931             :                 .get = py_netr_UasInfo_get_account_name,
     932             :                 .set = py_netr_UasInfo_set_account_name,
     933             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
     934             :         },
     935             :         {
     936             :                 .name = discard_const_p(char, "priv"),
     937             :                 .get = py_netr_UasInfo_get_priv,
     938             :                 .set = py_netr_UasInfo_set_priv,
     939             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     940             :         },
     941             :         {
     942             :                 .name = discard_const_p(char, "auth_flags"),
     943             :                 .get = py_netr_UasInfo_get_auth_flags,
     944             :                 .set = py_netr_UasInfo_set_auth_flags,
     945             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     946             :         },
     947             :         {
     948             :                 .name = discard_const_p(char, "logon_count"),
     949             :                 .get = py_netr_UasInfo_get_logon_count,
     950             :                 .set = py_netr_UasInfo_set_logon_count,
     951             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     952             :         },
     953             :         {
     954             :                 .name = discard_const_p(char, "bad_pw_count"),
     955             :                 .get = py_netr_UasInfo_get_bad_pw_count,
     956             :                 .set = py_netr_UasInfo_set_bad_pw_count,
     957             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     958             :         },
     959             :         {
     960             :                 .name = discard_const_p(char, "last_logon"),
     961             :                 .get = py_netr_UasInfo_get_last_logon,
     962             :                 .set = py_netr_UasInfo_set_last_logon,
     963             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
     964             :         },
     965             :         {
     966             :                 .name = discard_const_p(char, "last_logoff"),
     967             :                 .get = py_netr_UasInfo_get_last_logoff,
     968             :                 .set = py_netr_UasInfo_set_last_logoff,
     969             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
     970             :         },
     971             :         {
     972             :                 .name = discard_const_p(char, "logoff_time"),
     973             :                 .get = py_netr_UasInfo_get_logoff_time,
     974             :                 .set = py_netr_UasInfo_set_logoff_time,
     975             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
     976             :         },
     977             :         {
     978             :                 .name = discard_const_p(char, "kickoff_time"),
     979             :                 .get = py_netr_UasInfo_get_kickoff_time,
     980             :                 .set = py_netr_UasInfo_set_kickoff_time,
     981             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
     982             :         },
     983             :         {
     984             :                 .name = discard_const_p(char, "password_age"),
     985             :                 .get = py_netr_UasInfo_get_password_age,
     986             :                 .set = py_netr_UasInfo_set_password_age,
     987             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
     988             :         },
     989             :         {
     990             :                 .name = discard_const_p(char, "pw_can_change"),
     991             :                 .get = py_netr_UasInfo_get_pw_can_change,
     992             :                 .set = py_netr_UasInfo_set_pw_can_change,
     993             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
     994             :         },
     995             :         {
     996             :                 .name = discard_const_p(char, "pw_must_change"),
     997             :                 .get = py_netr_UasInfo_get_pw_must_change,
     998             :                 .set = py_netr_UasInfo_set_pw_must_change,
     999             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
    1000             :         },
    1001             :         {
    1002             :                 .name = discard_const_p(char, "computer"),
    1003             :                 .get = py_netr_UasInfo_get_computer,
    1004             :                 .set = py_netr_UasInfo_set_computer,
    1005             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1006             :         },
    1007             :         {
    1008             :                 .name = discard_const_p(char, "domain"),
    1009             :                 .get = py_netr_UasInfo_get_domain,
    1010             :                 .set = py_netr_UasInfo_set_domain,
    1011             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1012             :         },
    1013             :         {
    1014             :                 .name = discard_const_p(char, "script_path"),
    1015             :                 .get = py_netr_UasInfo_get_script_path,
    1016             :                 .set = py_netr_UasInfo_set_script_path,
    1017             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1018             :         },
    1019             :         {
    1020             :                 .name = discard_const_p(char, "unknown"),
    1021             :                 .get = py_netr_UasInfo_get_unknown,
    1022             :                 .set = py_netr_UasInfo_set_unknown,
    1023             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1024             :         },
    1025             :         { .name = NULL }
    1026             : };
    1027             : 
    1028           0 : static PyObject *py_netr_UasInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1029             : {
    1030           0 :         return pytalloc_new(struct netr_UasInfo, type);
    1031             : }
    1032             : 
    1033             : 
    1034             : static PyTypeObject netr_UasInfo_Type = {
    1035             :         PyVarObject_HEAD_INIT(NULL, 0)
    1036             :         .tp_name = "netlogon.netr_UasInfo",
    1037             :         .tp_getset = py_netr_UasInfo_getsetters,
    1038             :         .tp_methods = NULL,
    1039             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1040             :         .tp_new = py_netr_UasInfo_new,
    1041             : };
    1042             : 
    1043             : 
    1044           0 : static PyObject *py_netr_UasLogoffInfo_get_duration(PyObject *obj, void *closure)
    1045             : {
    1046           0 :         struct netr_UasLogoffInfo *object = (struct netr_UasLogoffInfo *)pytalloc_get_ptr(obj);
    1047             :         PyObject *py_duration;
    1048           0 :         py_duration = PyLong_FromUnsignedLongLong((uint32_t)object->duration);
    1049           0 :         return py_duration;
    1050             : }
    1051             : 
    1052           0 : static int py_netr_UasLogoffInfo_set_duration(PyObject *py_obj, PyObject *value, void *closure)
    1053             : {
    1054           0 :         struct netr_UasLogoffInfo *object = (struct netr_UasLogoffInfo *)pytalloc_get_ptr(py_obj);
    1055           0 :         if (value == NULL) {
    1056           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->duration");
    1057           0 :                 return -1;
    1058             :         }
    1059             :         {
    1060           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->duration));
    1061           0 :                 if (PyLong_Check(value)) {
    1062             :                         unsigned long long test_var;
    1063           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1064           0 :                         if (PyErr_Occurred() != NULL) {
    1065           0 :                                 return -1;
    1066             :                         }
    1067           0 :                         if (test_var > uint_max) {
    1068           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    1069             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1070           0 :                                 return -1;
    1071             :                         }
    1072           0 :                         object->duration = test_var;
    1073             :                 } else {
    1074           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    1075             :                           PyLong_Type.tp_name);
    1076           0 :                         return -1;
    1077             :                 }
    1078             :         }
    1079           0 :         return 0;
    1080             : }
    1081             : 
    1082           0 : static PyObject *py_netr_UasLogoffInfo_get_logon_count(PyObject *obj, void *closure)
    1083             : {
    1084           0 :         struct netr_UasLogoffInfo *object = (struct netr_UasLogoffInfo *)pytalloc_get_ptr(obj);
    1085             :         PyObject *py_logon_count;
    1086           0 :         py_logon_count = PyLong_FromLong((uint16_t)object->logon_count);
    1087           0 :         return py_logon_count;
    1088             : }
    1089             : 
    1090           0 : static int py_netr_UasLogoffInfo_set_logon_count(PyObject *py_obj, PyObject *value, void *closure)
    1091             : {
    1092           0 :         struct netr_UasLogoffInfo *object = (struct netr_UasLogoffInfo *)pytalloc_get_ptr(py_obj);
    1093           0 :         if (value == NULL) {
    1094           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_count");
    1095           0 :                 return -1;
    1096             :         }
    1097             :         {
    1098           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_count));
    1099           0 :                 if (PyLong_Check(value)) {
    1100             :                         unsigned long long test_var;
    1101           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1102           0 :                         if (PyErr_Occurred() != NULL) {
    1103           0 :                                 return -1;
    1104             :                         }
    1105           0 :                         if (test_var > uint_max) {
    1106           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    1107             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1108           0 :                                 return -1;
    1109             :                         }
    1110           0 :                         object->logon_count = test_var;
    1111             :                 } else {
    1112           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    1113             :                           PyLong_Type.tp_name);
    1114           0 :                         return -1;
    1115             :                 }
    1116             :         }
    1117           0 :         return 0;
    1118             : }
    1119             : 
    1120             : static PyGetSetDef py_netr_UasLogoffInfo_getsetters[] = {
    1121             :         {
    1122             :                 .name = discard_const_p(char, "duration"),
    1123             :                 .get = py_netr_UasLogoffInfo_get_duration,
    1124             :                 .set = py_netr_UasLogoffInfo_set_duration,
    1125             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1126             :         },
    1127             :         {
    1128             :                 .name = discard_const_p(char, "logon_count"),
    1129             :                 .get = py_netr_UasLogoffInfo_get_logon_count,
    1130             :                 .set = py_netr_UasLogoffInfo_set_logon_count,
    1131             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1132             :         },
    1133             :         { .name = NULL }
    1134             : };
    1135             : 
    1136           0 : static PyObject *py_netr_UasLogoffInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1137             : {
    1138           0 :         return pytalloc_new(struct netr_UasLogoffInfo, type);
    1139             : }
    1140             : 
    1141             : 
    1142             : static PyTypeObject netr_UasLogoffInfo_Type = {
    1143             :         PyVarObject_HEAD_INIT(NULL, 0)
    1144             :         .tp_name = "netlogon.netr_UasLogoffInfo",
    1145             :         .tp_getset = py_netr_UasLogoffInfo_getsetters,
    1146             :         .tp_methods = NULL,
    1147             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1148             :         .tp_new = py_netr_UasLogoffInfo_new,
    1149             : };
    1150             : 
    1151             : 
    1152           0 : static PyObject *py_netr_AcctLockStr_get_lockout_duration(PyObject *obj, void *closure)
    1153             : {
    1154           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(obj);
    1155             :         PyObject *py_lockout_duration;
    1156           0 :         py_lockout_duration = PyLong_FromLongLong(object->lockout_duration);
    1157           0 :         return py_lockout_duration;
    1158             : }
    1159             : 
    1160           0 : static int py_netr_AcctLockStr_set_lockout_duration(PyObject *py_obj, PyObject *value, void *closure)
    1161             : {
    1162           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(py_obj);
    1163           0 :         if (value == NULL) {
    1164           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lockout_duration");
    1165           0 :                 return -1;
    1166             :         }
    1167             :         {
    1168           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->lockout_duration));
    1169           0 :                 const long long int_min = -int_max - 1;
    1170           0 :                 if (PyLong_Check(value)) {
    1171             :                         long long test_var;
    1172           0 :                         test_var = PyLong_AsLongLong(value);
    1173           0 :                         if (PyErr_Occurred() != NULL) {
    1174           0 :                                 return -1;
    1175             :                         }
    1176           0 :                         if (test_var < int_min || test_var > int_max) {
    1177           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",\
    1178             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
    1179           0 :                                 return -1;
    1180             :                         }
    1181           0 :                         object->lockout_duration = test_var;
    1182             :                 } else {
    1183           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    1184             :                           PyLong_Type.tp_name);
    1185           0 :                         return -1;
    1186             :                 }
    1187             :         }
    1188           0 :         return 0;
    1189             : }
    1190             : 
    1191           0 : static PyObject *py_netr_AcctLockStr_get_reset_count(PyObject *obj, void *closure)
    1192             : {
    1193           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(obj);
    1194             :         PyObject *py_reset_count;
    1195           0 :         py_reset_count = PyLong_FromUnsignedLongLong(object->reset_count);
    1196           0 :         return py_reset_count;
    1197             : }
    1198             : 
    1199           0 : static int py_netr_AcctLockStr_set_reset_count(PyObject *py_obj, PyObject *value, void *closure)
    1200             : {
    1201           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(py_obj);
    1202           0 :         if (value == NULL) {
    1203           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reset_count");
    1204           0 :                 return -1;
    1205             :         }
    1206             :         {
    1207           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reset_count));
    1208           0 :                 if (PyLong_Check(value)) {
    1209             :                         unsigned long long test_var;
    1210           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1211           0 :                         if (PyErr_Occurred() != NULL) {
    1212           0 :                                 return -1;
    1213             :                         }
    1214           0 :                         if (test_var > uint_max) {
    1215           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    1216             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1217           0 :                                 return -1;
    1218             :                         }
    1219           0 :                         object->reset_count = test_var;
    1220             :                 } else {
    1221           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    1222             :                           PyLong_Type.tp_name);
    1223           0 :                         return -1;
    1224             :                 }
    1225             :         }
    1226           0 :         return 0;
    1227             : }
    1228             : 
    1229           0 : static PyObject *py_netr_AcctLockStr_get_bad_attempt_lockout(PyObject *obj, void *closure)
    1230             : {
    1231           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(obj);
    1232             :         PyObject *py_bad_attempt_lockout;
    1233           0 :         py_bad_attempt_lockout = PyLong_FromUnsignedLongLong((uint32_t)object->bad_attempt_lockout);
    1234           0 :         return py_bad_attempt_lockout;
    1235             : }
    1236             : 
    1237           0 : static int py_netr_AcctLockStr_set_bad_attempt_lockout(PyObject *py_obj, PyObject *value, void *closure)
    1238             : {
    1239           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(py_obj);
    1240           0 :         if (value == NULL) {
    1241           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bad_attempt_lockout");
    1242           0 :                 return -1;
    1243             :         }
    1244             :         {
    1245           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bad_attempt_lockout));
    1246           0 :                 if (PyLong_Check(value)) {
    1247             :                         unsigned long long test_var;
    1248           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1249           0 :                         if (PyErr_Occurred() != NULL) {
    1250           0 :                                 return -1;
    1251             :                         }
    1252           0 :                         if (test_var > uint_max) {
    1253           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    1254             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1255           0 :                                 return -1;
    1256             :                         }
    1257           0 :                         object->bad_attempt_lockout = test_var;
    1258             :                 } else {
    1259           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    1260             :                           PyLong_Type.tp_name);
    1261           0 :                         return -1;
    1262             :                 }
    1263             :         }
    1264           0 :         return 0;
    1265             : }
    1266             : 
    1267           0 : static PyObject *py_netr_AcctLockStr_get_dummy(PyObject *obj, void *closure)
    1268             : {
    1269           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(obj);
    1270             :         PyObject *py_dummy;
    1271           0 :         py_dummy = PyLong_FromUnsignedLongLong((uint32_t)object->dummy);
    1272           0 :         return py_dummy;
    1273             : }
    1274             : 
    1275           0 : static int py_netr_AcctLockStr_set_dummy(PyObject *py_obj, PyObject *value, void *closure)
    1276             : {
    1277           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(py_obj);
    1278           0 :         if (value == NULL) {
    1279           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy");
    1280           0 :                 return -1;
    1281             :         }
    1282             :         {
    1283           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy));
    1284           0 :                 if (PyLong_Check(value)) {
    1285             :                         unsigned long long test_var;
    1286           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1287           0 :                         if (PyErr_Occurred() != NULL) {
    1288           0 :                                 return -1;
    1289             :                         }
    1290           0 :                         if (test_var > uint_max) {
    1291           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    1292             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1293           0 :                                 return -1;
    1294             :                         }
    1295           0 :                         object->dummy = test_var;
    1296             :                 } else {
    1297           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    1298             :                           PyLong_Type.tp_name);
    1299           0 :                         return -1;
    1300             :                 }
    1301             :         }
    1302           0 :         return 0;
    1303             : }
    1304             : 
    1305             : static PyGetSetDef py_netr_AcctLockStr_getsetters[] = {
    1306             :         {
    1307             :                 .name = discard_const_p(char, "lockout_duration"),
    1308             :                 .get = py_netr_AcctLockStr_get_lockout_duration,
    1309             :                 .set = py_netr_AcctLockStr_set_lockout_duration,
    1310             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dlong")
    1311             :         },
    1312             :         {
    1313             :                 .name = discard_const_p(char, "reset_count"),
    1314             :                 .get = py_netr_AcctLockStr_get_reset_count,
    1315             :                 .set = py_netr_AcctLockStr_set_reset_count,
    1316             :                 .doc = discard_const_p(char, "PIDL-generated element of base type udlong")
    1317             :         },
    1318             :         {
    1319             :                 .name = discard_const_p(char, "bad_attempt_lockout"),
    1320             :                 .get = py_netr_AcctLockStr_get_bad_attempt_lockout,
    1321             :                 .set = py_netr_AcctLockStr_set_bad_attempt_lockout,
    1322             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1323             :         },
    1324             :         {
    1325             :                 .name = discard_const_p(char, "dummy"),
    1326             :                 .get = py_netr_AcctLockStr_get_dummy,
    1327             :                 .set = py_netr_AcctLockStr_set_dummy,
    1328             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    1329             :         },
    1330             :         { .name = NULL }
    1331             : };
    1332             : 
    1333           0 : static PyObject *py_netr_AcctLockStr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1334             : {
    1335           0 :         return pytalloc_new(struct netr_AcctLockStr, type);
    1336             : }
    1337             : 
    1338           0 : static PyObject *py_netr_AcctLockStr_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    1339             : {
    1340           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(py_obj);
    1341           0 :         PyObject *ret = NULL;
    1342             :         DATA_BLOB blob;
    1343             :         enum ndr_err_code err;
    1344           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    1345           0 :         if (tmp_ctx == NULL) {
    1346           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    1347           0 :                 return NULL;
    1348             :         }
    1349           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_AcctLockStr);
    1350           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1351           0 :                 TALLOC_FREE(tmp_ctx);
    1352           0 :                 PyErr_SetNdrError(err);
    1353           0 :                 return NULL;
    1354             :         }
    1355             : 
    1356           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    1357           0 :         TALLOC_FREE(tmp_ctx);
    1358           0 :         return ret;
    1359             : }
    1360             : 
    1361           0 : static PyObject *py_netr_AcctLockStr_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    1362             : {
    1363           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(py_obj);
    1364           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    1365           0 :         Py_ssize_t blob_length = 0;
    1366             :         enum ndr_err_code err;
    1367           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    1368           0 :         PyObject *allow_remaining_obj = NULL;
    1369           0 :         bool allow_remaining = false;
    1370             : 
    1371           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    1372             :                 discard_const_p(char *, kwnames),
    1373             :                 &blob.data, &blob_length,
    1374             :                 &allow_remaining_obj)) {
    1375           0 :                 return NULL;
    1376             :         }
    1377           0 :         blob.length = blob_length;
    1378             : 
    1379           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    1380           0 :                 allow_remaining = true;
    1381             :         }
    1382             : 
    1383           0 :         if (allow_remaining) {
    1384           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_AcctLockStr);
    1385             :         } else {
    1386           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_AcctLockStr);
    1387             :         }
    1388           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    1389           0 :                 PyErr_SetNdrError(err);
    1390           0 :                 return NULL;
    1391             :         }
    1392             : 
    1393           0 :         Py_RETURN_NONE;
    1394             : }
    1395             : 
    1396           0 : static PyObject *py_netr_AcctLockStr_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    1397             : {
    1398           0 :         struct netr_AcctLockStr *object = (struct netr_AcctLockStr *)pytalloc_get_ptr(py_obj);
    1399             :         PyObject *ret;
    1400             :         char *retstr;
    1401             : 
    1402           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_AcctLockStr, "netr_AcctLockStr", object);
    1403           0 :         ret = PyUnicode_FromString(retstr);
    1404           0 :         talloc_free(retstr);
    1405             : 
    1406           0 :         return ret;
    1407             : }
    1408             : 
    1409             : static PyMethodDef py_netr_AcctLockStr_methods[] = {
    1410             :         { "__ndr_pack__", (PyCFunction)py_netr_AcctLockStr_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    1411             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AcctLockStr_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    1412             :         { "__ndr_print__", (PyCFunction)py_netr_AcctLockStr_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    1413             :         { NULL, NULL, 0, NULL }
    1414             : };
    1415             : 
    1416             : 
    1417             : static PyTypeObject netr_AcctLockStr_Type = {
    1418             :         PyVarObject_HEAD_INIT(NULL, 0)
    1419             :         .tp_name = "netlogon.netr_AcctLockStr",
    1420             :         .tp_getset = py_netr_AcctLockStr_getsetters,
    1421             :         .tp_methods = py_netr_AcctLockStr_methods,
    1422             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1423             :         .tp_new = py_netr_AcctLockStr_new,
    1424             : };
    1425             : 
    1426             : 
    1427          19 : static PyObject *py_netr_IdentityInfo_get_domain_name(PyObject *obj, void *closure)
    1428             : {
    1429          19 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(obj);
    1430             :         PyObject *py_domain_name;
    1431          19 :         py_domain_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->domain_name);
    1432          19 :         return py_domain_name;
    1433             : }
    1434             : 
    1435           0 : static int py_netr_IdentityInfo_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
    1436             : {
    1437           0 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(py_obj);
    1438           0 :         if (value == NULL) {
    1439           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_name");
    1440           0 :                 return -1;
    1441             :         }
    1442           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    1443           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1444           0 :                 PyErr_NoMemory();
    1445           0 :                 return -1;
    1446             :         }
    1447           0 :         object->domain_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    1448           0 :         return 0;
    1449             : }
    1450             : 
    1451           0 : static PyObject *py_netr_IdentityInfo_get_parameter_control(PyObject *obj, void *closure)
    1452             : {
    1453           0 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(obj);
    1454             :         PyObject *py_parameter_control;
    1455           0 :         py_parameter_control = PyLong_FromUnsignedLongLong((uint32_t)object->parameter_control);
    1456           0 :         return py_parameter_control;
    1457             : }
    1458             : 
    1459           3 : static int py_netr_IdentityInfo_set_parameter_control(PyObject *py_obj, PyObject *value, void *closure)
    1460             : {
    1461           3 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(py_obj);
    1462           3 :         if (value == NULL) {
    1463           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->parameter_control");
    1464           0 :                 return -1;
    1465             :         }
    1466             :         {
    1467           3 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->parameter_control));
    1468           3 :                 if (PyLong_Check(value)) {
    1469             :                         unsigned long long test_var;
    1470           3 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1471           3 :                         if (PyErr_Occurred() != NULL) {
    1472           0 :                                 return -1;
    1473             :                         }
    1474           3 :                         if (test_var > uint_max) {
    1475           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    1476             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1477           0 :                                 return -1;
    1478             :                         }
    1479           3 :                         object->parameter_control = test_var;
    1480             :                 } else {
    1481           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    1482             :                           PyLong_Type.tp_name);
    1483           0 :                         return -1;
    1484             :                 }
    1485             :         }
    1486           3 :         return 0;
    1487             : }
    1488             : 
    1489           0 : static PyObject *py_netr_IdentityInfo_get_logon_id(PyObject *obj, void *closure)
    1490             : {
    1491           0 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(obj);
    1492             :         PyObject *py_logon_id;
    1493           0 :         py_logon_id = PyLong_FromUnsignedLongLong(object->logon_id);
    1494           0 :         return py_logon_id;
    1495             : }
    1496             : 
    1497           0 : static int py_netr_IdentityInfo_set_logon_id(PyObject *py_obj, PyObject *value, void *closure)
    1498             : {
    1499           0 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(py_obj);
    1500           0 :         if (value == NULL) {
    1501           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_id");
    1502           0 :                 return -1;
    1503             :         }
    1504             :         {
    1505           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_id));
    1506           0 :                 if (PyLong_Check(value)) {
    1507             :                         unsigned long long test_var;
    1508           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1509           0 :                         if (PyErr_Occurred() != NULL) {
    1510           0 :                                 return -1;
    1511             :                         }
    1512           0 :                         if (test_var > uint_max) {
    1513           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    1514             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1515           0 :                                 return -1;
    1516             :                         }
    1517           0 :                         object->logon_id = test_var;
    1518             :                 } else {
    1519           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    1520             :                           PyLong_Type.tp_name);
    1521           0 :                         return -1;
    1522             :                 }
    1523             :         }
    1524           0 :         return 0;
    1525             : }
    1526             : 
    1527          19 : static PyObject *py_netr_IdentityInfo_get_account_name(PyObject *obj, void *closure)
    1528             : {
    1529          19 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(obj);
    1530             :         PyObject *py_account_name;
    1531          19 :         py_account_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->account_name);
    1532          19 :         return py_account_name;
    1533             : }
    1534             : 
    1535           0 : static int py_netr_IdentityInfo_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
    1536             : {
    1537           0 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(py_obj);
    1538           0 :         if (value == NULL) {
    1539           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->account_name");
    1540           0 :                 return -1;
    1541             :         }
    1542           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    1543           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1544           0 :                 PyErr_NoMemory();
    1545           0 :                 return -1;
    1546             :         }
    1547           0 :         object->account_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    1548           0 :         return 0;
    1549             : }
    1550             : 
    1551          19 : static PyObject *py_netr_IdentityInfo_get_workstation(PyObject *obj, void *closure)
    1552             : {
    1553          19 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(obj);
    1554             :         PyObject *py_workstation;
    1555          19 :         py_workstation = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->workstation);
    1556          19 :         return py_workstation;
    1557             : }
    1558             : 
    1559           0 : static int py_netr_IdentityInfo_set_workstation(PyObject *py_obj, PyObject *value, void *closure)
    1560             : {
    1561           0 :         struct netr_IdentityInfo *object = (struct netr_IdentityInfo *)pytalloc_get_ptr(py_obj);
    1562           0 :         if (value == NULL) {
    1563           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->workstation");
    1564           0 :                 return -1;
    1565             :         }
    1566           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    1567           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1568           0 :                 PyErr_NoMemory();
    1569           0 :                 return -1;
    1570             :         }
    1571           0 :         object->workstation = *(struct lsa_String *)pytalloc_get_ptr(value);
    1572           0 :         return 0;
    1573             : }
    1574             : 
    1575             : static PyGetSetDef py_netr_IdentityInfo_getsetters[] = {
    1576             :         {
    1577             :                 .name = discard_const_p(char, "domain_name"),
    1578             :                 .get = py_netr_IdentityInfo_get_domain_name,
    1579             :                 .set = py_netr_IdentityInfo_set_domain_name,
    1580             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    1581             :         },
    1582             :         {
    1583             :                 .name = discard_const_p(char, "parameter_control"),
    1584             :                 .get = py_netr_IdentityInfo_get_parameter_control,
    1585             :                 .set = py_netr_IdentityInfo_set_parameter_control,
    1586             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonParameterControl")
    1587             :         },
    1588             :         {
    1589             :                 .name = discard_const_p(char, "logon_id"),
    1590             :                 .get = py_netr_IdentityInfo_get_logon_id,
    1591             :                 .set = py_netr_IdentityInfo_set_logon_id,
    1592             :                 .doc = discard_const_p(char, "PIDL-generated element of base type udlong")
    1593             :         },
    1594             :         {
    1595             :                 .name = discard_const_p(char, "account_name"),
    1596             :                 .get = py_netr_IdentityInfo_get_account_name,
    1597             :                 .set = py_netr_IdentityInfo_set_account_name,
    1598             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    1599             :         },
    1600             :         {
    1601             :                 .name = discard_const_p(char, "workstation"),
    1602             :                 .get = py_netr_IdentityInfo_get_workstation,
    1603             :                 .set = py_netr_IdentityInfo_set_workstation,
    1604             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    1605             :         },
    1606             :         { .name = NULL }
    1607             : };
    1608             : 
    1609          19 : static PyObject *py_netr_IdentityInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1610             : {
    1611          19 :         return pytalloc_new(struct netr_IdentityInfo, type);
    1612             : }
    1613             : 
    1614             : 
    1615             : static PyTypeObject netr_IdentityInfo_Type = {
    1616             :         PyVarObject_HEAD_INIT(NULL, 0)
    1617             :         .tp_name = "netlogon.netr_IdentityInfo",
    1618             :         .tp_getset = py_netr_IdentityInfo_getsetters,
    1619             :         .tp_methods = NULL,
    1620             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1621             :         .tp_new = py_netr_IdentityInfo_new,
    1622             : };
    1623             : 
    1624             : 
    1625           0 : static PyObject *py_netr_PasswordInfo_get_identity_info(PyObject *obj, void *closure)
    1626             : {
    1627           0 :         struct netr_PasswordInfo *object = (struct netr_PasswordInfo *)pytalloc_get_ptr(obj);
    1628             :         PyObject *py_identity_info;
    1629           0 :         py_identity_info = pytalloc_reference_ex(&netr_IdentityInfo_Type, pytalloc_get_mem_ctx(obj), &object->identity_info);
    1630           0 :         return py_identity_info;
    1631             : }
    1632             : 
    1633           0 : static int py_netr_PasswordInfo_set_identity_info(PyObject *py_obj, PyObject *value, void *closure)
    1634             : {
    1635           0 :         struct netr_PasswordInfo *object = (struct netr_PasswordInfo *)pytalloc_get_ptr(py_obj);
    1636           0 :         if (value == NULL) {
    1637           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->identity_info");
    1638           0 :                 return -1;
    1639             :         }
    1640           0 :         PY_CHECK_TYPE(&netr_IdentityInfo_Type, value, return -1;);
    1641           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1642           0 :                 PyErr_NoMemory();
    1643           0 :                 return -1;
    1644             :         }
    1645           0 :         object->identity_info = *(struct netr_IdentityInfo *)pytalloc_get_ptr(value);
    1646           0 :         return 0;
    1647             : }
    1648             : 
    1649           0 : static PyObject *py_netr_PasswordInfo_get_lmpassword(PyObject *obj, void *closure)
    1650             : {
    1651           0 :         struct netr_PasswordInfo *object = (struct netr_PasswordInfo *)pytalloc_get_ptr(obj);
    1652             :         PyObject *py_lmpassword;
    1653           0 :         py_lmpassword = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->lmpassword);
    1654           0 :         return py_lmpassword;
    1655             : }
    1656             : 
    1657           0 : static int py_netr_PasswordInfo_set_lmpassword(PyObject *py_obj, PyObject *value, void *closure)
    1658             : {
    1659           0 :         struct netr_PasswordInfo *object = (struct netr_PasswordInfo *)pytalloc_get_ptr(py_obj);
    1660           0 :         if (value == NULL) {
    1661           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lmpassword");
    1662           0 :                 return -1;
    1663             :         }
    1664           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
    1665           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1666           0 :                 PyErr_NoMemory();
    1667           0 :                 return -1;
    1668             :         }
    1669           0 :         object->lmpassword = *(struct samr_Password *)pytalloc_get_ptr(value);
    1670           0 :         return 0;
    1671             : }
    1672             : 
    1673           0 : static PyObject *py_netr_PasswordInfo_get_ntpassword(PyObject *obj, void *closure)
    1674             : {
    1675           0 :         struct netr_PasswordInfo *object = (struct netr_PasswordInfo *)pytalloc_get_ptr(obj);
    1676             :         PyObject *py_ntpassword;
    1677           0 :         py_ntpassword = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->ntpassword);
    1678           0 :         return py_ntpassword;
    1679             : }
    1680             : 
    1681           0 : static int py_netr_PasswordInfo_set_ntpassword(PyObject *py_obj, PyObject *value, void *closure)
    1682             : {
    1683           0 :         struct netr_PasswordInfo *object = (struct netr_PasswordInfo *)pytalloc_get_ptr(py_obj);
    1684           0 :         if (value == NULL) {
    1685           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ntpassword");
    1686           0 :                 return -1;
    1687             :         }
    1688           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
    1689           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1690           0 :                 PyErr_NoMemory();
    1691           0 :                 return -1;
    1692             :         }
    1693           0 :         object->ntpassword = *(struct samr_Password *)pytalloc_get_ptr(value);
    1694           0 :         return 0;
    1695             : }
    1696             : 
    1697             : static PyGetSetDef py_netr_PasswordInfo_getsetters[] = {
    1698             :         {
    1699             :                 .name = discard_const_p(char, "identity_info"),
    1700             :                 .get = py_netr_PasswordInfo_get_identity_info,
    1701             :                 .set = py_netr_PasswordInfo_set_identity_info,
    1702             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_IdentityInfo")
    1703             :         },
    1704             :         {
    1705             :                 .name = discard_const_p(char, "lmpassword"),
    1706             :                 .get = py_netr_PasswordInfo_get_lmpassword,
    1707             :                 .set = py_netr_PasswordInfo_set_lmpassword,
    1708             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
    1709             :         },
    1710             :         {
    1711             :                 .name = discard_const_p(char, "ntpassword"),
    1712             :                 .get = py_netr_PasswordInfo_get_ntpassword,
    1713             :                 .set = py_netr_PasswordInfo_set_ntpassword,
    1714             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
    1715             :         },
    1716             :         { .name = NULL }
    1717             : };
    1718             : 
    1719           0 : static PyObject *py_netr_PasswordInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1720             : {
    1721           0 :         return pytalloc_new(struct netr_PasswordInfo, type);
    1722             : }
    1723             : 
    1724             : 
    1725             : static PyTypeObject netr_PasswordInfo_Type = {
    1726             :         PyVarObject_HEAD_INIT(NULL, 0)
    1727             :         .tp_name = "netlogon.netr_PasswordInfo",
    1728             :         .tp_getset = py_netr_PasswordInfo_getsetters,
    1729             :         .tp_methods = NULL,
    1730             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1731             :         .tp_new = py_netr_PasswordInfo_new,
    1732             : };
    1733             : 
    1734             : 
    1735           0 : static PyObject *py_netr_ChallengeResponse_get_length(PyObject *obj, void *closure)
    1736             : {
    1737           0 :         struct netr_ChallengeResponse *object = (struct netr_ChallengeResponse *)pytalloc_get_ptr(obj);
    1738             :         PyObject *py_length;
    1739           0 :         py_length = PyLong_FromLong((uint16_t)object->length);
    1740           0 :         return py_length;
    1741             : }
    1742             : 
    1743          19 : static int py_netr_ChallengeResponse_set_length(PyObject *py_obj, PyObject *value, void *closure)
    1744             : {
    1745          19 :         struct netr_ChallengeResponse *object = (struct netr_ChallengeResponse *)pytalloc_get_ptr(py_obj);
    1746          19 :         if (value == NULL) {
    1747           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
    1748           0 :                 return -1;
    1749             :         }
    1750             :         {
    1751          19 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
    1752          19 :                 if (PyLong_Check(value)) {
    1753             :                         unsigned long long test_var;
    1754          19 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1755          19 :                         if (PyErr_Occurred() != NULL) {
    1756           0 :                                 return -1;
    1757             :                         }
    1758          19 :                         if (test_var > uint_max) {
    1759           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    1760             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1761           0 :                                 return -1;
    1762             :                         }
    1763          19 :                         object->length = test_var;
    1764             :                 } else {
    1765           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    1766             :                           PyLong_Type.tp_name);
    1767           0 :                         return -1;
    1768             :                 }
    1769             :         }
    1770          19 :         return 0;
    1771             : }
    1772             : 
    1773           0 : static PyObject *py_netr_ChallengeResponse_get_size(PyObject *obj, void *closure)
    1774             : {
    1775           0 :         struct netr_ChallengeResponse *object = (struct netr_ChallengeResponse *)pytalloc_get_ptr(obj);
    1776             :         PyObject *py_size;
    1777           0 :         py_size = PyLong_FromLong((uint16_t)object->size);
    1778           0 :         return py_size;
    1779             : }
    1780             : 
    1781           0 : static int py_netr_ChallengeResponse_set_size(PyObject *py_obj, PyObject *value, void *closure)
    1782             : {
    1783           0 :         struct netr_ChallengeResponse *object = (struct netr_ChallengeResponse *)pytalloc_get_ptr(py_obj);
    1784           0 :         if (value == NULL) {
    1785           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->size");
    1786           0 :                 return -1;
    1787             :         }
    1788             :         {
    1789           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
    1790           0 :                 if (PyLong_Check(value)) {
    1791             :                         unsigned long long test_var;
    1792           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    1793           0 :                         if (PyErr_Occurred() != NULL) {
    1794           0 :                                 return -1;
    1795             :                         }
    1796           0 :                         if (test_var > uint_max) {
    1797           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    1798             :                                   PyLong_Type.tp_name, uint_max, test_var);
    1799           0 :                                 return -1;
    1800             :                         }
    1801           0 :                         object->size = test_var;
    1802             :                 } else {
    1803           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    1804             :                           PyLong_Type.tp_name);
    1805           0 :                         return -1;
    1806             :                 }
    1807             :         }
    1808           0 :         return 0;
    1809             : }
    1810             : 
    1811           0 : static PyObject *py_netr_ChallengeResponse_get_data(PyObject *obj, void *closure)
    1812             : {
    1813           0 :         struct netr_ChallengeResponse *object = (struct netr_ChallengeResponse *)pytalloc_get_ptr(obj);
    1814             :         PyObject *py_data;
    1815           0 :         if (object->data == NULL) {
    1816           0 :                 Py_RETURN_NONE;
    1817             :         }
    1818           0 :         if (object->data == NULL) {
    1819           0 :                 py_data = Py_None;
    1820           0 :                 Py_INCREF(py_data);
    1821             :         } else {
    1822           0 :                 py_data = PyList_New(object->length);
    1823           0 :                 if (py_data == NULL) {
    1824           0 :                         return NULL;
    1825             :                 }
    1826             :                 {
    1827             :                         int data_cntr_1;
    1828           0 :                         for (data_cntr_1 = 0; data_cntr_1 < (object->length); data_cntr_1++) {
    1829             :                                 PyObject *py_data_1;
    1830           0 :                                 py_data_1 = PyLong_FromLong((uint16_t)object->data[data_cntr_1]);
    1831           0 :                                 PyList_SetItem(py_data, data_cntr_1, py_data_1);
    1832             :                         }
    1833             :                 }
    1834             :         }
    1835           0 :         return py_data;
    1836             : }
    1837             : 
    1838          19 : static int py_netr_ChallengeResponse_set_data(PyObject *py_obj, PyObject *value, void *closure)
    1839             : {
    1840          19 :         struct netr_ChallengeResponse *object = (struct netr_ChallengeResponse *)pytalloc_get_ptr(py_obj);
    1841          19 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->data));
    1842          19 :         if (value == NULL) {
    1843           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data");
    1844           0 :                 return -1;
    1845             :         }
    1846          19 :         if (value == Py_None) {
    1847           0 :                 object->data = NULL;
    1848             :         } else {
    1849          19 :                 object->data = NULL;
    1850          19 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    1851             :                 {
    1852             :                         int data_cntr_1;
    1853          19 :                         object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
    1854          19 :                         if (!object->data) { return -1;; }
    1855          19 :                         talloc_set_name_const(object->data, "ARRAY: object->data");
    1856        1323 :                         for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
    1857        1304 :                                 if (PyList_GET_ITEM(value, data_cntr_1) == NULL) {
    1858           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data[data_cntr_1]");
    1859           0 :                                         return -1;
    1860             :                                 }
    1861             :                                 {
    1862        1304 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->data[data_cntr_1]));
    1863        1304 :                                         if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_1))) {
    1864             :                                                 unsigned long long test_var;
    1865        1304 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_1));
    1866        1304 :                                                 if (PyErr_Occurred() != NULL) {
    1867           0 :                                                         return -1;
    1868             :                                                 }
    1869        1304 :                                                 if (test_var > uint_max) {
    1870           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    1871             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    1872           0 :                                                         return -1;
    1873             :                                                 }
    1874        1304 :                                                 object->data[data_cntr_1] = test_var;
    1875             :                                         } else {
    1876           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",\
    1877             :                                                   PyLong_Type.tp_name);
    1878           0 :                                                 return -1;
    1879             :                                         }
    1880             :                                 }
    1881             :                         }
    1882             :                 }
    1883             :         }
    1884          19 :         return 0;
    1885             : }
    1886             : 
    1887             : static PyGetSetDef py_netr_ChallengeResponse_getsetters[] = {
    1888             :         {
    1889             :                 .name = discard_const_p(char, "length"),
    1890             :                 .get = py_netr_ChallengeResponse_get_length,
    1891             :                 .set = py_netr_ChallengeResponse_set_length,
    1892             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1893             :         },
    1894             :         {
    1895             :                 .name = discard_const_p(char, "size"),
    1896             :                 .get = py_netr_ChallengeResponse_get_size,
    1897             :                 .set = py_netr_ChallengeResponse_set_size,
    1898             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    1899             :         },
    1900             :         {
    1901             :                 .name = discard_const_p(char, "data"),
    1902             :                 .get = py_netr_ChallengeResponse_get_data,
    1903             :                 .set = py_netr_ChallengeResponse_set_data,
    1904             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    1905             :         },
    1906             :         { .name = NULL }
    1907             : };
    1908             : 
    1909          19 : static PyObject *py_netr_ChallengeResponse_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1910             : {
    1911          19 :         return pytalloc_new(struct netr_ChallengeResponse, type);
    1912             : }
    1913             : 
    1914             : 
    1915             : static PyTypeObject netr_ChallengeResponse_Type = {
    1916             :         PyVarObject_HEAD_INIT(NULL, 0)
    1917             :         .tp_name = "netlogon.netr_ChallengeResponse",
    1918             :         .tp_getset = py_netr_ChallengeResponse_getsetters,
    1919             :         .tp_methods = NULL,
    1920             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    1921             :         .tp_new = py_netr_ChallengeResponse_new,
    1922             : };
    1923             : 
    1924             : 
    1925          60 : static PyObject *py_netr_NetworkInfo_get_identity_info(PyObject *obj, void *closure)
    1926             : {
    1927          60 :         struct netr_NetworkInfo *object = (struct netr_NetworkInfo *)pytalloc_get_ptr(obj);
    1928             :         PyObject *py_identity_info;
    1929          60 :         py_identity_info = pytalloc_reference_ex(&netr_IdentityInfo_Type, pytalloc_get_mem_ctx(obj), &object->identity_info);
    1930          60 :         return py_identity_info;
    1931             : }
    1932             : 
    1933          19 : static int py_netr_NetworkInfo_set_identity_info(PyObject *py_obj, PyObject *value, void *closure)
    1934             : {
    1935          19 :         struct netr_NetworkInfo *object = (struct netr_NetworkInfo *)pytalloc_get_ptr(py_obj);
    1936          19 :         if (value == NULL) {
    1937           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->identity_info");
    1938           0 :                 return -1;
    1939             :         }
    1940          19 :         PY_CHECK_TYPE(&netr_IdentityInfo_Type, value, return -1;);
    1941          19 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    1942           0 :                 PyErr_NoMemory();
    1943           0 :                 return -1;
    1944             :         }
    1945          19 :         object->identity_info = *(struct netr_IdentityInfo *)pytalloc_get_ptr(value);
    1946          19 :         return 0;
    1947             : }
    1948             : 
    1949           0 : static PyObject *py_netr_NetworkInfo_get_challenge(PyObject *obj, void *closure)
    1950             : {
    1951           0 :         struct netr_NetworkInfo *object = (struct netr_NetworkInfo *)pytalloc_get_ptr(obj);
    1952             :         PyObject *py_challenge;
    1953           0 :         py_challenge = PyList_New(8);
    1954           0 :         if (py_challenge == NULL) {
    1955           0 :                 return NULL;
    1956             :         }
    1957             :         {
    1958             :                 int challenge_cntr_0;
    1959           0 :                 for (challenge_cntr_0 = 0; challenge_cntr_0 < (8); challenge_cntr_0++) {
    1960             :                         PyObject *py_challenge_0;
    1961           0 :                         py_challenge_0 = PyLong_FromLong((uint16_t)object->challenge[challenge_cntr_0]);
    1962           0 :                         PyList_SetItem(py_challenge, challenge_cntr_0, py_challenge_0);
    1963             :                 }
    1964             :         }
    1965           0 :         return py_challenge;
    1966             : }
    1967             : 
    1968          19 : static int py_netr_NetworkInfo_set_challenge(PyObject *py_obj, PyObject *value, void *closure)
    1969             : {
    1970          19 :         struct netr_NetworkInfo *object = (struct netr_NetworkInfo *)pytalloc_get_ptr(py_obj);
    1971          19 :         if (value == NULL) {
    1972           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->challenge");
    1973           0 :                 return -1;
    1974             :         }
    1975          19 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    1976             :         {
    1977             :                 int challenge_cntr_0;
    1978          19 :                 if (ARRAY_SIZE(object->challenge) != PyList_GET_SIZE(value)) {
    1979           0 :                         PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->challenge),  PyList_GET_SIZE(value));
    1980           0 :                         return -1;
    1981             :                 }
    1982         171 :                 for (challenge_cntr_0 = 0; challenge_cntr_0 < PyList_GET_SIZE(value); challenge_cntr_0++) {
    1983         152 :                         if (PyList_GET_ITEM(value, challenge_cntr_0) == NULL) {
    1984           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->challenge[challenge_cntr_0]");
    1985           0 :                                 return -1;
    1986             :                         }
    1987             :                         {
    1988         152 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->challenge[challenge_cntr_0]));
    1989         152 :                                 if (PyLong_Check(PyList_GET_ITEM(value, challenge_cntr_0))) {
    1990             :                                         unsigned long long test_var;
    1991         152 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, challenge_cntr_0));
    1992         152 :                                         if (PyErr_Occurred() != NULL) {
    1993           0 :                                                 return -1;
    1994             :                                         }
    1995         152 :                                         if (test_var > uint_max) {
    1996           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    1997             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    1998           0 :                                                 return -1;
    1999             :                                         }
    2000         152 :                                         object->challenge[challenge_cntr_0] = test_var;
    2001             :                                 } else {
    2002           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    2003             :                                           PyLong_Type.tp_name);
    2004           0 :                                         return -1;
    2005             :                                 }
    2006             :                         }
    2007             :                 }
    2008             :         }
    2009          19 :         return 0;
    2010             : }
    2011             : 
    2012          38 : static PyObject *py_netr_NetworkInfo_get_nt(PyObject *obj, void *closure)
    2013             : {
    2014          38 :         struct netr_NetworkInfo *object = (struct netr_NetworkInfo *)pytalloc_get_ptr(obj);
    2015             :         PyObject *py_nt;
    2016          38 :         py_nt = pytalloc_reference_ex(&netr_ChallengeResponse_Type, pytalloc_get_mem_ctx(obj), &object->nt);
    2017          38 :         return py_nt;
    2018             : }
    2019             : 
    2020          19 : static int py_netr_NetworkInfo_set_nt(PyObject *py_obj, PyObject *value, void *closure)
    2021             : {
    2022          19 :         struct netr_NetworkInfo *object = (struct netr_NetworkInfo *)pytalloc_get_ptr(py_obj);
    2023          19 :         if (value == NULL) {
    2024           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nt");
    2025           0 :                 return -1;
    2026             :         }
    2027          19 :         PY_CHECK_TYPE(&netr_ChallengeResponse_Type, value, return -1;);
    2028          19 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    2029           0 :                 PyErr_NoMemory();
    2030           0 :                 return -1;
    2031             :         }
    2032          19 :         object->nt = *(struct netr_ChallengeResponse *)pytalloc_get_ptr(value);
    2033          19 :         return 0;
    2034             : }
    2035             : 
    2036           0 : static PyObject *py_netr_NetworkInfo_get_lm(PyObject *obj, void *closure)
    2037             : {
    2038           0 :         struct netr_NetworkInfo *object = (struct netr_NetworkInfo *)pytalloc_get_ptr(obj);
    2039             :         PyObject *py_lm;
    2040           0 :         py_lm = pytalloc_reference_ex(&netr_ChallengeResponse_Type, pytalloc_get_mem_ctx(obj), &object->lm);
    2041           0 :         return py_lm;
    2042             : }
    2043             : 
    2044           0 : static int py_netr_NetworkInfo_set_lm(PyObject *py_obj, PyObject *value, void *closure)
    2045             : {
    2046           0 :         struct netr_NetworkInfo *object = (struct netr_NetworkInfo *)pytalloc_get_ptr(py_obj);
    2047           0 :         if (value == NULL) {
    2048           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lm");
    2049           0 :                 return -1;
    2050             :         }
    2051           0 :         PY_CHECK_TYPE(&netr_ChallengeResponse_Type, value, return -1;);
    2052           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    2053           0 :                 PyErr_NoMemory();
    2054           0 :                 return -1;
    2055             :         }
    2056           0 :         object->lm = *(struct netr_ChallengeResponse *)pytalloc_get_ptr(value);
    2057           0 :         return 0;
    2058             : }
    2059             : 
    2060             : static PyGetSetDef py_netr_NetworkInfo_getsetters[] = {
    2061             :         {
    2062             :                 .name = discard_const_p(char, "identity_info"),
    2063             :                 .get = py_netr_NetworkInfo_get_identity_info,
    2064             :                 .set = py_netr_NetworkInfo_set_identity_info,
    2065             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_IdentityInfo")
    2066             :         },
    2067             :         {
    2068             :                 .name = discard_const_p(char, "challenge"),
    2069             :                 .get = py_netr_NetworkInfo_get_challenge,
    2070             :                 .set = py_netr_NetworkInfo_set_challenge,
    2071             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2072             :         },
    2073             :         {
    2074             :                 .name = discard_const_p(char, "nt"),
    2075             :                 .get = py_netr_NetworkInfo_get_nt,
    2076             :                 .set = py_netr_NetworkInfo_set_nt,
    2077             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_ChallengeResponse")
    2078             :         },
    2079             :         {
    2080             :                 .name = discard_const_p(char, "lm"),
    2081             :                 .get = py_netr_NetworkInfo_get_lm,
    2082             :                 .set = py_netr_NetworkInfo_set_lm,
    2083             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_ChallengeResponse")
    2084             :         },
    2085             :         { .name = NULL }
    2086             : };
    2087             : 
    2088          19 : static PyObject *py_netr_NetworkInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2089             : {
    2090          19 :         return pytalloc_new(struct netr_NetworkInfo, type);
    2091             : }
    2092             : 
    2093             : 
    2094             : static PyTypeObject netr_NetworkInfo_Type = {
    2095             :         PyVarObject_HEAD_INIT(NULL, 0)
    2096             :         .tp_name = "netlogon.netr_NetworkInfo",
    2097             :         .tp_getset = py_netr_NetworkInfo_getsetters,
    2098             :         .tp_methods = NULL,
    2099             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2100             :         .tp_new = py_netr_NetworkInfo_new,
    2101             : };
    2102             : 
    2103             : 
    2104           0 : static PyObject *py_netr_GenericInfo_get_identity_info(PyObject *obj, void *closure)
    2105             : {
    2106           0 :         struct netr_GenericInfo *object = (struct netr_GenericInfo *)pytalloc_get_ptr(obj);
    2107             :         PyObject *py_identity_info;
    2108           0 :         py_identity_info = pytalloc_reference_ex(&netr_IdentityInfo_Type, pytalloc_get_mem_ctx(obj), &object->identity_info);
    2109           0 :         return py_identity_info;
    2110             : }
    2111             : 
    2112           0 : static int py_netr_GenericInfo_set_identity_info(PyObject *py_obj, PyObject *value, void *closure)
    2113             : {
    2114           0 :         struct netr_GenericInfo *object = (struct netr_GenericInfo *)pytalloc_get_ptr(py_obj);
    2115           0 :         if (value == NULL) {
    2116           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->identity_info");
    2117           0 :                 return -1;
    2118             :         }
    2119           0 :         PY_CHECK_TYPE(&netr_IdentityInfo_Type, value, return -1;);
    2120           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    2121           0 :                 PyErr_NoMemory();
    2122           0 :                 return -1;
    2123             :         }
    2124           0 :         object->identity_info = *(struct netr_IdentityInfo *)pytalloc_get_ptr(value);
    2125           0 :         return 0;
    2126             : }
    2127             : 
    2128           0 : static PyObject *py_netr_GenericInfo_get_package_name(PyObject *obj, void *closure)
    2129             : {
    2130           0 :         struct netr_GenericInfo *object = (struct netr_GenericInfo *)pytalloc_get_ptr(obj);
    2131             :         PyObject *py_package_name;
    2132           0 :         py_package_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->package_name);
    2133           0 :         return py_package_name;
    2134             : }
    2135             : 
    2136           0 : static int py_netr_GenericInfo_set_package_name(PyObject *py_obj, PyObject *value, void *closure)
    2137             : {
    2138           0 :         struct netr_GenericInfo *object = (struct netr_GenericInfo *)pytalloc_get_ptr(py_obj);
    2139           0 :         if (value == NULL) {
    2140           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->package_name");
    2141           0 :                 return -1;
    2142             :         }
    2143           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    2144           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    2145           0 :                 PyErr_NoMemory();
    2146           0 :                 return -1;
    2147             :         }
    2148           0 :         object->package_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    2149           0 :         return 0;
    2150             : }
    2151             : 
    2152           0 : static PyObject *py_netr_GenericInfo_get_length(PyObject *obj, void *closure)
    2153             : {
    2154           0 :         struct netr_GenericInfo *object = (struct netr_GenericInfo *)pytalloc_get_ptr(obj);
    2155             :         PyObject *py_length;
    2156           0 :         py_length = PyLong_FromUnsignedLongLong((uint32_t)object->length);
    2157           0 :         return py_length;
    2158             : }
    2159             : 
    2160           0 : static int py_netr_GenericInfo_set_length(PyObject *py_obj, PyObject *value, void *closure)
    2161             : {
    2162           0 :         struct netr_GenericInfo *object = (struct netr_GenericInfo *)pytalloc_get_ptr(py_obj);
    2163           0 :         if (value == NULL) {
    2164           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
    2165           0 :                 return -1;
    2166             :         }
    2167             :         {
    2168           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
    2169           0 :                 if (PyLong_Check(value)) {
    2170             :                         unsigned long long test_var;
    2171           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2172           0 :                         if (PyErr_Occurred() != NULL) {
    2173           0 :                                 return -1;
    2174             :                         }
    2175           0 :                         if (test_var > uint_max) {
    2176           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    2177             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2178           0 :                                 return -1;
    2179             :                         }
    2180           0 :                         object->length = test_var;
    2181             :                 } else {
    2182           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    2183             :                           PyLong_Type.tp_name);
    2184           0 :                         return -1;
    2185             :                 }
    2186             :         }
    2187           0 :         return 0;
    2188             : }
    2189             : 
    2190           0 : static PyObject *py_netr_GenericInfo_get_data(PyObject *obj, void *closure)
    2191             : {
    2192           0 :         struct netr_GenericInfo *object = (struct netr_GenericInfo *)pytalloc_get_ptr(obj);
    2193             :         PyObject *py_data;
    2194           0 :         if (object->data == NULL) {
    2195           0 :                 Py_RETURN_NONE;
    2196             :         }
    2197           0 :         if (object->data == NULL) {
    2198           0 :                 py_data = Py_None;
    2199           0 :                 Py_INCREF(py_data);
    2200             :         } else {
    2201           0 :                 py_data = PyList_New(object->length);
    2202           0 :                 if (py_data == NULL) {
    2203           0 :                         return NULL;
    2204             :                 }
    2205             :                 {
    2206             :                         int data_cntr_1;
    2207           0 :                         for (data_cntr_1 = 0; data_cntr_1 < (object->length); data_cntr_1++) {
    2208             :                                 PyObject *py_data_1;
    2209           0 :                                 py_data_1 = PyLong_FromLong((uint16_t)object->data[data_cntr_1]);
    2210           0 :                                 PyList_SetItem(py_data, data_cntr_1, py_data_1);
    2211             :                         }
    2212             :                 }
    2213             :         }
    2214           0 :         return py_data;
    2215             : }
    2216             : 
    2217           0 : static int py_netr_GenericInfo_set_data(PyObject *py_obj, PyObject *value, void *closure)
    2218             : {
    2219           0 :         struct netr_GenericInfo *object = (struct netr_GenericInfo *)pytalloc_get_ptr(py_obj);
    2220           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->data));
    2221           0 :         if (value == NULL) {
    2222           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data");
    2223           0 :                 return -1;
    2224             :         }
    2225           0 :         if (value == Py_None) {
    2226           0 :                 object->data = NULL;
    2227             :         } else {
    2228           0 :                 object->data = NULL;
    2229           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    2230             :                 {
    2231             :                         int data_cntr_1;
    2232           0 :                         object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
    2233           0 :                         if (!object->data) { return -1;; }
    2234           0 :                         talloc_set_name_const(object->data, "ARRAY: object->data");
    2235           0 :                         for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
    2236           0 :                                 if (PyList_GET_ITEM(value, data_cntr_1) == NULL) {
    2237           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data[data_cntr_1]");
    2238           0 :                                         return -1;
    2239             :                                 }
    2240             :                                 {
    2241           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->data[data_cntr_1]));
    2242           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_1))) {
    2243             :                                                 unsigned long long test_var;
    2244           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_1));
    2245           0 :                                                 if (PyErr_Occurred() != NULL) {
    2246           0 :                                                         return -1;
    2247             :                                                 }
    2248           0 :                                                 if (test_var > uint_max) {
    2249           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    2250             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    2251           0 :                                                         return -1;
    2252             :                                                 }
    2253           0 :                                                 object->data[data_cntr_1] = test_var;
    2254             :                                         } else {
    2255           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",\
    2256             :                                                   PyLong_Type.tp_name);
    2257           0 :                                                 return -1;
    2258             :                                         }
    2259             :                                 }
    2260             :                         }
    2261             :                 }
    2262             :         }
    2263           0 :         return 0;
    2264             : }
    2265             : 
    2266             : static PyGetSetDef py_netr_GenericInfo_getsetters[] = {
    2267             :         {
    2268             :                 .name = discard_const_p(char, "identity_info"),
    2269             :                 .get = py_netr_GenericInfo_get_identity_info,
    2270             :                 .set = py_netr_GenericInfo_set_identity_info,
    2271             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_IdentityInfo")
    2272             :         },
    2273             :         {
    2274             :                 .name = discard_const_p(char, "package_name"),
    2275             :                 .get = py_netr_GenericInfo_get_package_name,
    2276             :                 .set = py_netr_GenericInfo_set_package_name,
    2277             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    2278             :         },
    2279             :         {
    2280             :                 .name = discard_const_p(char, "length"),
    2281             :                 .get = py_netr_GenericInfo_get_length,
    2282             :                 .set = py_netr_GenericInfo_set_length,
    2283             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2284             :         },
    2285             :         {
    2286             :                 .name = discard_const_p(char, "data"),
    2287             :                 .get = py_netr_GenericInfo_get_data,
    2288             :                 .set = py_netr_GenericInfo_set_data,
    2289             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2290             :         },
    2291             :         { .name = NULL }
    2292             : };
    2293             : 
    2294           0 : static PyObject *py_netr_GenericInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2295             : {
    2296           0 :         return pytalloc_new(struct netr_GenericInfo, type);
    2297             : }
    2298             : 
    2299             : 
    2300             : static PyTypeObject netr_GenericInfo_Type = {
    2301             :         PyVarObject_HEAD_INIT(NULL, 0)
    2302             :         .tp_name = "netlogon.netr_GenericInfo",
    2303             :         .tp_getset = py_netr_GenericInfo_getsetters,
    2304             :         .tp_methods = NULL,
    2305             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2306             :         .tp_new = py_netr_GenericInfo_new,
    2307             : };
    2308             : 
    2309           0 : static PyObject *py_import_netr_LogonLevel(TALLOC_CTX *mem_ctx, int level, union netr_LogonLevel *in)
    2310             : {
    2311             :         PyObject *ret;
    2312             : 
    2313           0 :         switch (level) {
    2314           0 :                 case NetlogonInteractiveInformation:
    2315           0 :                         if (in->password == NULL) {
    2316           0 :                                 ret = Py_None;
    2317           0 :                                 Py_INCREF(ret);
    2318             :                         } else {
    2319           0 :                                 ret = pytalloc_reference_ex(&netr_PasswordInfo_Type, in->password, in->password);
    2320             :                         }
    2321           0 :                         return ret;
    2322             : 
    2323           0 :                 case NetlogonNetworkInformation:
    2324           0 :                         if (in->network == NULL) {
    2325           0 :                                 ret = Py_None;
    2326           0 :                                 Py_INCREF(ret);
    2327             :                         } else {
    2328           0 :                                 ret = pytalloc_reference_ex(&netr_NetworkInfo_Type, in->network, in->network);
    2329             :                         }
    2330           0 :                         return ret;
    2331             : 
    2332           0 :                 case NetlogonServiceInformation:
    2333           0 :                         if (in->password == NULL) {
    2334           0 :                                 ret = Py_None;
    2335           0 :                                 Py_INCREF(ret);
    2336             :                         } else {
    2337           0 :                                 ret = pytalloc_reference_ex(&netr_PasswordInfo_Type, in->password, in->password);
    2338             :                         }
    2339           0 :                         return ret;
    2340             : 
    2341           0 :                 case NetlogonGenericInformation:
    2342           0 :                         if (in->generic == NULL) {
    2343           0 :                                 ret = Py_None;
    2344           0 :                                 Py_INCREF(ret);
    2345             :                         } else {
    2346           0 :                                 ret = pytalloc_reference_ex(&netr_GenericInfo_Type, in->generic, in->generic);
    2347             :                         }
    2348           0 :                         return ret;
    2349             : 
    2350           0 :                 case NetlogonInteractiveTransitiveInformation:
    2351           0 :                         if (in->password == NULL) {
    2352           0 :                                 ret = Py_None;
    2353           0 :                                 Py_INCREF(ret);
    2354             :                         } else {
    2355           0 :                                 ret = pytalloc_reference_ex(&netr_PasswordInfo_Type, in->password, in->password);
    2356             :                         }
    2357           0 :                         return ret;
    2358             : 
    2359           0 :                 case NetlogonNetworkTransitiveInformation:
    2360           0 :                         if (in->network == NULL) {
    2361           0 :                                 ret = Py_None;
    2362           0 :                                 Py_INCREF(ret);
    2363             :                         } else {
    2364           0 :                                 ret = pytalloc_reference_ex(&netr_NetworkInfo_Type, in->network, in->network);
    2365             :                         }
    2366           0 :                         return ret;
    2367             : 
    2368           0 :                 case NetlogonServiceTransitiveInformation:
    2369           0 :                         if (in->password == NULL) {
    2370           0 :                                 ret = Py_None;
    2371           0 :                                 Py_INCREF(ret);
    2372             :                         } else {
    2373           0 :                                 ret = pytalloc_reference_ex(&netr_PasswordInfo_Type, in->password, in->password);
    2374             :                         }
    2375           0 :                         return ret;
    2376             : 
    2377           0 :                 default:
    2378           0 :                         ret = Py_None;
    2379           0 :                         Py_INCREF(ret);
    2380           0 :                         return ret;
    2381             : 
    2382             :         }
    2383             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    2384             :         return NULL;
    2385             : }
    2386             : 
    2387          19 : static union netr_LogonLevel *py_export_netr_LogonLevel(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    2388             : {
    2389          19 :         union netr_LogonLevel *ret = talloc_zero(mem_ctx, union netr_LogonLevel);
    2390          19 :         switch (level) {
    2391           0 :                 case NetlogonInteractiveInformation:
    2392           0 :                         if (in == NULL) {
    2393           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->password");
    2394           0 :                                 talloc_free(ret); return NULL;
    2395             :                         }
    2396           0 :                         if (in == Py_None) {
    2397           0 :                                 ret->password = NULL;
    2398             :                         } else {
    2399           0 :                                 ret->password = NULL;
    2400           0 :                                 PY_CHECK_TYPE(&netr_PasswordInfo_Type, in, talloc_free(ret); return NULL;);
    2401           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2402           0 :                                         PyErr_NoMemory();
    2403           0 :                                         talloc_free(ret); return NULL;
    2404             :                                 }
    2405           0 :                                 ret->password = (struct netr_PasswordInfo *)pytalloc_get_ptr(in);
    2406             :                         }
    2407           0 :                         break;
    2408             : 
    2409           0 :                 case NetlogonNetworkInformation:
    2410           0 :                         if (in == NULL) {
    2411           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->network");
    2412           0 :                                 talloc_free(ret); return NULL;
    2413             :                         }
    2414           0 :                         if (in == Py_None) {
    2415           0 :                                 ret->network = NULL;
    2416             :                         } else {
    2417           0 :                                 ret->network = NULL;
    2418           0 :                                 PY_CHECK_TYPE(&netr_NetworkInfo_Type, in, talloc_free(ret); return NULL;);
    2419           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2420           0 :                                         PyErr_NoMemory();
    2421           0 :                                         talloc_free(ret); return NULL;
    2422             :                                 }
    2423           0 :                                 ret->network = (struct netr_NetworkInfo *)pytalloc_get_ptr(in);
    2424             :                         }
    2425           0 :                         break;
    2426             : 
    2427           0 :                 case NetlogonServiceInformation:
    2428           0 :                         if (in == NULL) {
    2429           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->password");
    2430           0 :                                 talloc_free(ret); return NULL;
    2431             :                         }
    2432           0 :                         if (in == Py_None) {
    2433           0 :                                 ret->password = NULL;
    2434             :                         } else {
    2435           0 :                                 ret->password = NULL;
    2436           0 :                                 PY_CHECK_TYPE(&netr_PasswordInfo_Type, in, talloc_free(ret); return NULL;);
    2437           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2438           0 :                                         PyErr_NoMemory();
    2439           0 :                                         talloc_free(ret); return NULL;
    2440             :                                 }
    2441           0 :                                 ret->password = (struct netr_PasswordInfo *)pytalloc_get_ptr(in);
    2442             :                         }
    2443           0 :                         break;
    2444             : 
    2445           0 :                 case NetlogonGenericInformation:
    2446           0 :                         if (in == NULL) {
    2447           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->generic");
    2448           0 :                                 talloc_free(ret); return NULL;
    2449             :                         }
    2450           0 :                         if (in == Py_None) {
    2451           0 :                                 ret->generic = NULL;
    2452             :                         } else {
    2453           0 :                                 ret->generic = NULL;
    2454           0 :                                 PY_CHECK_TYPE(&netr_GenericInfo_Type, in, talloc_free(ret); return NULL;);
    2455           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2456           0 :                                         PyErr_NoMemory();
    2457           0 :                                         talloc_free(ret); return NULL;
    2458             :                                 }
    2459           0 :                                 ret->generic = (struct netr_GenericInfo *)pytalloc_get_ptr(in);
    2460             :                         }
    2461           0 :                         break;
    2462             : 
    2463           0 :                 case NetlogonInteractiveTransitiveInformation:
    2464           0 :                         if (in == NULL) {
    2465           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->password");
    2466           0 :                                 talloc_free(ret); return NULL;
    2467             :                         }
    2468           0 :                         if (in == Py_None) {
    2469           0 :                                 ret->password = NULL;
    2470             :                         } else {
    2471           0 :                                 ret->password = NULL;
    2472           0 :                                 PY_CHECK_TYPE(&netr_PasswordInfo_Type, in, talloc_free(ret); return NULL;);
    2473           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2474           0 :                                         PyErr_NoMemory();
    2475           0 :                                         talloc_free(ret); return NULL;
    2476             :                                 }
    2477           0 :                                 ret->password = (struct netr_PasswordInfo *)pytalloc_get_ptr(in);
    2478             :                         }
    2479           0 :                         break;
    2480             : 
    2481          19 :                 case NetlogonNetworkTransitiveInformation:
    2482          19 :                         if (in == NULL) {
    2483           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->network");
    2484           0 :                                 talloc_free(ret); return NULL;
    2485             :                         }
    2486          19 :                         if (in == Py_None) {
    2487           0 :                                 ret->network = NULL;
    2488             :                         } else {
    2489          19 :                                 ret->network = NULL;
    2490          19 :                                 PY_CHECK_TYPE(&netr_NetworkInfo_Type, in, talloc_free(ret); return NULL;);
    2491          19 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2492           0 :                                         PyErr_NoMemory();
    2493           0 :                                         talloc_free(ret); return NULL;
    2494             :                                 }
    2495          19 :                                 ret->network = (struct netr_NetworkInfo *)pytalloc_get_ptr(in);
    2496             :                         }
    2497          19 :                         break;
    2498             : 
    2499           0 :                 case NetlogonServiceTransitiveInformation:
    2500           0 :                         if (in == NULL) {
    2501           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->password");
    2502           0 :                                 talloc_free(ret); return NULL;
    2503             :                         }
    2504           0 :                         if (in == Py_None) {
    2505           0 :                                 ret->password = NULL;
    2506             :                         } else {
    2507           0 :                                 ret->password = NULL;
    2508           0 :                                 PY_CHECK_TYPE(&netr_PasswordInfo_Type, in, talloc_free(ret); return NULL;);
    2509           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2510           0 :                                         PyErr_NoMemory();
    2511           0 :                                         talloc_free(ret); return NULL;
    2512             :                                 }
    2513           0 :                                 ret->password = (struct netr_PasswordInfo *)pytalloc_get_ptr(in);
    2514             :                         }
    2515           0 :                         break;
    2516             : 
    2517           0 :                 default:
    2518           0 :                         break;
    2519             : 
    2520             :         }
    2521             : 
    2522          19 :         return ret;
    2523             : }
    2524             : 
    2525           0 : static PyObject *py_netr_LogonLevel_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2526             : {
    2527           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    2528           0 :         PyObject *mem_ctx_obj = NULL;
    2529           0 :         TALLOC_CTX *mem_ctx = NULL;
    2530           0 :         int level = 0;
    2531           0 :         PyObject *in_obj = NULL;
    2532           0 :         union netr_LogonLevel *in = NULL;
    2533             : 
    2534           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    2535             :                 discard_const_p(char *, kwnames),
    2536             :                 &mem_ctx_obj,
    2537             :                 &level,
    2538             :                 &in_obj)) {
    2539           0 :                 return NULL;
    2540             :         }
    2541           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    2542           0 :         if (mem_ctx == NULL) {
    2543           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    2544           0 :                 return NULL;
    2545             :         }
    2546           0 :         in = (union netr_LogonLevel *)pytalloc_get_ptr(in_obj);
    2547           0 :         if (in == NULL) {
    2548           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_LogonLevel!");
    2549           0 :                 return NULL;
    2550             :         }
    2551             : 
    2552           0 :         return py_import_netr_LogonLevel(mem_ctx, level, in);
    2553             : }
    2554             : 
    2555          19 : static PyObject *py_netr_LogonLevel_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2556             : {
    2557          19 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    2558          19 :         PyObject *mem_ctx_obj = NULL;
    2559          19 :         TALLOC_CTX *mem_ctx = NULL;
    2560          19 :         int level = 0;
    2561          19 :         PyObject *in = NULL;
    2562          19 :         union netr_LogonLevel *out = NULL;
    2563             : 
    2564          19 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    2565             :                 discard_const_p(char *, kwnames),
    2566             :                 &mem_ctx_obj,
    2567             :                 &level,
    2568             :                 &in)) {
    2569           0 :                 return NULL;
    2570             :         }
    2571          19 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    2572          19 :         if (mem_ctx == NULL) {
    2573           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    2574           0 :                 return NULL;
    2575             :         }
    2576             : 
    2577          19 :         out = py_export_netr_LogonLevel(mem_ctx, level, in);
    2578          19 :         if (out == NULL) {
    2579           0 :                 return NULL;
    2580             :         }
    2581             : 
    2582          19 :         return pytalloc_GenericObject_reference(out);
    2583             : }
    2584             : 
    2585             : static PyMethodDef py_netr_LogonLevel_methods[] = {
    2586             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonLevel_import),
    2587             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    2588             :                 "T.__import__(mem_ctx, level, in) => ret." },
    2589             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonLevel_export),
    2590             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    2591             :                 "T.__export__(mem_ctx, level, in) => ret." },
    2592             :         { NULL, NULL, 0, NULL }
    2593             : };
    2594             : 
    2595           0 : static PyObject *py_netr_LogonLevel_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2596             : {
    2597           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    2598           0 :         return NULL;
    2599             : }
    2600             : 
    2601             : 
    2602             : static PyTypeObject netr_LogonLevel_Type = {
    2603             :         PyVarObject_HEAD_INIT(NULL, 0)
    2604             :         .tp_name = "netlogon.netr_LogonLevel",
    2605             :         .tp_getset = NULL,
    2606             :         .tp_methods = py_netr_LogonLevel_methods,
    2607             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2608             :         .tp_new = py_netr_LogonLevel_new,
    2609             : };
    2610             : 
    2611             : 
    2612           0 : static PyObject *py_netr_UserSessionKey_get_key(PyObject *obj, void *closure)
    2613             : {
    2614           0 :         struct netr_UserSessionKey *object = (struct netr_UserSessionKey *)pytalloc_get_ptr(obj);
    2615             :         PyObject *py_key;
    2616           0 :         py_key = PyList_New(16);
    2617           0 :         if (py_key == NULL) {
    2618           0 :                 return NULL;
    2619             :         }
    2620             :         {
    2621             :                 int key_cntr_0;
    2622           0 :                 for (key_cntr_0 = 0; key_cntr_0 < (16); key_cntr_0++) {
    2623             :                         PyObject *py_key_0;
    2624           0 :                         py_key_0 = PyLong_FromLong((uint16_t)object->key[key_cntr_0]);
    2625           0 :                         PyList_SetItem(py_key, key_cntr_0, py_key_0);
    2626             :                 }
    2627             :         }
    2628           0 :         return py_key;
    2629             : }
    2630             : 
    2631           0 : static int py_netr_UserSessionKey_set_key(PyObject *py_obj, PyObject *value, void *closure)
    2632             : {
    2633           0 :         struct netr_UserSessionKey *object = (struct netr_UserSessionKey *)pytalloc_get_ptr(py_obj);
    2634           0 :         if (value == NULL) {
    2635           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->key");
    2636           0 :                 return -1;
    2637             :         }
    2638           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    2639             :         {
    2640             :                 int key_cntr_0;
    2641           0 :                 if (ARRAY_SIZE(object->key) != PyList_GET_SIZE(value)) {
    2642           0 :                         PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->key),  PyList_GET_SIZE(value));
    2643           0 :                         return -1;
    2644             :                 }
    2645           0 :                 for (key_cntr_0 = 0; key_cntr_0 < PyList_GET_SIZE(value); key_cntr_0++) {
    2646           0 :                         if (PyList_GET_ITEM(value, key_cntr_0) == NULL) {
    2647           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->key[key_cntr_0]");
    2648           0 :                                 return -1;
    2649             :                         }
    2650             :                         {
    2651           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->key[key_cntr_0]));
    2652           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, key_cntr_0))) {
    2653             :                                         unsigned long long test_var;
    2654           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, key_cntr_0));
    2655           0 :                                         if (PyErr_Occurred() != NULL) {
    2656           0 :                                                 return -1;
    2657             :                                         }
    2658           0 :                                         if (test_var > uint_max) {
    2659           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    2660             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    2661           0 :                                                 return -1;
    2662             :                                         }
    2663           0 :                                         object->key[key_cntr_0] = test_var;
    2664             :                                 } else {
    2665           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    2666             :                                           PyLong_Type.tp_name);
    2667           0 :                                         return -1;
    2668             :                                 }
    2669             :                         }
    2670             :                 }
    2671             :         }
    2672           0 :         return 0;
    2673             : }
    2674             : 
    2675             : static PyGetSetDef py_netr_UserSessionKey_getsetters[] = {
    2676             :         {
    2677             :                 .name = discard_const_p(char, "key"),
    2678             :                 .get = py_netr_UserSessionKey_get_key,
    2679             :                 .set = py_netr_UserSessionKey_set_key,
    2680             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2681             :         },
    2682             :         { .name = NULL }
    2683             : };
    2684             : 
    2685           0 : static PyObject *py_netr_UserSessionKey_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2686             : {
    2687           0 :         return pytalloc_new(struct netr_UserSessionKey, type);
    2688             : }
    2689             : 
    2690           0 : static PyObject *py_netr_UserSessionKey_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    2691             : {
    2692           0 :         struct netr_UserSessionKey *object = (struct netr_UserSessionKey *)pytalloc_get_ptr(py_obj);
    2693           0 :         PyObject *ret = NULL;
    2694             :         DATA_BLOB blob;
    2695             :         enum ndr_err_code err;
    2696           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    2697           0 :         if (tmp_ctx == NULL) {
    2698           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    2699           0 :                 return NULL;
    2700             :         }
    2701           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_UserSessionKey);
    2702           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2703           0 :                 TALLOC_FREE(tmp_ctx);
    2704           0 :                 PyErr_SetNdrError(err);
    2705           0 :                 return NULL;
    2706             :         }
    2707             : 
    2708           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    2709           0 :         TALLOC_FREE(tmp_ctx);
    2710           0 :         return ret;
    2711             : }
    2712             : 
    2713           0 : static PyObject *py_netr_UserSessionKey_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    2714             : {
    2715           0 :         struct netr_UserSessionKey *object = (struct netr_UserSessionKey *)pytalloc_get_ptr(py_obj);
    2716           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    2717           0 :         Py_ssize_t blob_length = 0;
    2718             :         enum ndr_err_code err;
    2719           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    2720           0 :         PyObject *allow_remaining_obj = NULL;
    2721           0 :         bool allow_remaining = false;
    2722             : 
    2723           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    2724             :                 discard_const_p(char *, kwnames),
    2725             :                 &blob.data, &blob_length,
    2726             :                 &allow_remaining_obj)) {
    2727           0 :                 return NULL;
    2728             :         }
    2729           0 :         blob.length = blob_length;
    2730             : 
    2731           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    2732           0 :                 allow_remaining = true;
    2733             :         }
    2734             : 
    2735           0 :         if (allow_remaining) {
    2736           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_UserSessionKey);
    2737             :         } else {
    2738           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_UserSessionKey);
    2739             :         }
    2740           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2741           0 :                 PyErr_SetNdrError(err);
    2742           0 :                 return NULL;
    2743             :         }
    2744             : 
    2745           0 :         Py_RETURN_NONE;
    2746             : }
    2747             : 
    2748           0 : static PyObject *py_netr_UserSessionKey_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    2749             : {
    2750           0 :         struct netr_UserSessionKey *object = (struct netr_UserSessionKey *)pytalloc_get_ptr(py_obj);
    2751             :         PyObject *ret;
    2752             :         char *retstr;
    2753             : 
    2754           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_UserSessionKey, "netr_UserSessionKey", object);
    2755           0 :         ret = PyUnicode_FromString(retstr);
    2756           0 :         talloc_free(retstr);
    2757             : 
    2758           0 :         return ret;
    2759             : }
    2760             : 
    2761             : static PyMethodDef py_netr_UserSessionKey_methods[] = {
    2762             :         { "__ndr_pack__", (PyCFunction)py_netr_UserSessionKey_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    2763             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_UserSessionKey_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    2764             :         { "__ndr_print__", (PyCFunction)py_netr_UserSessionKey_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    2765             :         { NULL, NULL, 0, NULL }
    2766             : };
    2767             : 
    2768             : 
    2769             : static PyTypeObject netr_UserSessionKey_Type = {
    2770             :         PyVarObject_HEAD_INIT(NULL, 0)
    2771             :         .tp_name = "netlogon.netr_UserSessionKey",
    2772             :         .tp_getset = py_netr_UserSessionKey_getsetters,
    2773             :         .tp_methods = py_netr_UserSessionKey_methods,
    2774             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2775             :         .tp_new = py_netr_UserSessionKey_new,
    2776             : };
    2777             : 
    2778             : 
    2779           0 : static PyObject *py_netr_LMSessionKey_get_key(PyObject *obj, void *closure)
    2780             : {
    2781           0 :         struct netr_LMSessionKey *object = (struct netr_LMSessionKey *)pytalloc_get_ptr(obj);
    2782             :         PyObject *py_key;
    2783           0 :         py_key = PyList_New(8);
    2784           0 :         if (py_key == NULL) {
    2785           0 :                 return NULL;
    2786             :         }
    2787             :         {
    2788             :                 int key_cntr_0;
    2789           0 :                 for (key_cntr_0 = 0; key_cntr_0 < (8); key_cntr_0++) {
    2790             :                         PyObject *py_key_0;
    2791           0 :                         py_key_0 = PyLong_FromLong((uint16_t)object->key[key_cntr_0]);
    2792           0 :                         PyList_SetItem(py_key, key_cntr_0, py_key_0);
    2793             :                 }
    2794             :         }
    2795           0 :         return py_key;
    2796             : }
    2797             : 
    2798           0 : static int py_netr_LMSessionKey_set_key(PyObject *py_obj, PyObject *value, void *closure)
    2799             : {
    2800           0 :         struct netr_LMSessionKey *object = (struct netr_LMSessionKey *)pytalloc_get_ptr(py_obj);
    2801           0 :         if (value == NULL) {
    2802           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->key");
    2803           0 :                 return -1;
    2804             :         }
    2805           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    2806             :         {
    2807             :                 int key_cntr_0;
    2808           0 :                 if (ARRAY_SIZE(object->key) != PyList_GET_SIZE(value)) {
    2809           0 :                         PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->key),  PyList_GET_SIZE(value));
    2810           0 :                         return -1;
    2811             :                 }
    2812           0 :                 for (key_cntr_0 = 0; key_cntr_0 < PyList_GET_SIZE(value); key_cntr_0++) {
    2813           0 :                         if (PyList_GET_ITEM(value, key_cntr_0) == NULL) {
    2814           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->key[key_cntr_0]");
    2815           0 :                                 return -1;
    2816             :                         }
    2817             :                         {
    2818           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->key[key_cntr_0]));
    2819           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, key_cntr_0))) {
    2820             :                                         unsigned long long test_var;
    2821           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, key_cntr_0));
    2822           0 :                                         if (PyErr_Occurred() != NULL) {
    2823           0 :                                                 return -1;
    2824             :                                         }
    2825           0 :                                         if (test_var > uint_max) {
    2826           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    2827             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    2828           0 :                                                 return -1;
    2829             :                                         }
    2830           0 :                                         object->key[key_cntr_0] = test_var;
    2831             :                                 } else {
    2832           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    2833             :                                           PyLong_Type.tp_name);
    2834           0 :                                         return -1;
    2835             :                                 }
    2836             :                         }
    2837             :                 }
    2838             :         }
    2839           0 :         return 0;
    2840             : }
    2841             : 
    2842             : static PyGetSetDef py_netr_LMSessionKey_getsetters[] = {
    2843             :         {
    2844             :                 .name = discard_const_p(char, "key"),
    2845             :                 .get = py_netr_LMSessionKey_get_key,
    2846             :                 .set = py_netr_LMSessionKey_set_key,
    2847             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2848             :         },
    2849             :         { .name = NULL }
    2850             : };
    2851             : 
    2852           0 : static PyObject *py_netr_LMSessionKey_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2853             : {
    2854           0 :         return pytalloc_new(struct netr_LMSessionKey, type);
    2855             : }
    2856             : 
    2857           0 : static PyObject *py_netr_LMSessionKey_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    2858             : {
    2859           0 :         struct netr_LMSessionKey *object = (struct netr_LMSessionKey *)pytalloc_get_ptr(py_obj);
    2860           0 :         PyObject *ret = NULL;
    2861             :         DATA_BLOB blob;
    2862             :         enum ndr_err_code err;
    2863           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    2864           0 :         if (tmp_ctx == NULL) {
    2865           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    2866           0 :                 return NULL;
    2867             :         }
    2868           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_LMSessionKey);
    2869           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2870           0 :                 TALLOC_FREE(tmp_ctx);
    2871           0 :                 PyErr_SetNdrError(err);
    2872           0 :                 return NULL;
    2873             :         }
    2874             : 
    2875           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    2876           0 :         TALLOC_FREE(tmp_ctx);
    2877           0 :         return ret;
    2878             : }
    2879             : 
    2880           0 : static PyObject *py_netr_LMSessionKey_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    2881             : {
    2882           0 :         struct netr_LMSessionKey *object = (struct netr_LMSessionKey *)pytalloc_get_ptr(py_obj);
    2883           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    2884           0 :         Py_ssize_t blob_length = 0;
    2885             :         enum ndr_err_code err;
    2886           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    2887           0 :         PyObject *allow_remaining_obj = NULL;
    2888           0 :         bool allow_remaining = false;
    2889             : 
    2890           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    2891             :                 discard_const_p(char *, kwnames),
    2892             :                 &blob.data, &blob_length,
    2893             :                 &allow_remaining_obj)) {
    2894           0 :                 return NULL;
    2895             :         }
    2896           0 :         blob.length = blob_length;
    2897             : 
    2898           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    2899           0 :                 allow_remaining = true;
    2900             :         }
    2901             : 
    2902           0 :         if (allow_remaining) {
    2903           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_LMSessionKey);
    2904             :         } else {
    2905           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_LMSessionKey);
    2906             :         }
    2907           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2908           0 :                 PyErr_SetNdrError(err);
    2909           0 :                 return NULL;
    2910             :         }
    2911             : 
    2912           0 :         Py_RETURN_NONE;
    2913             : }
    2914             : 
    2915           0 : static PyObject *py_netr_LMSessionKey_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    2916             : {
    2917           0 :         struct netr_LMSessionKey *object = (struct netr_LMSessionKey *)pytalloc_get_ptr(py_obj);
    2918             :         PyObject *ret;
    2919             :         char *retstr;
    2920             : 
    2921           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_LMSessionKey, "netr_LMSessionKey", object);
    2922           0 :         ret = PyUnicode_FromString(retstr);
    2923           0 :         talloc_free(retstr);
    2924             : 
    2925           0 :         return ret;
    2926             : }
    2927             : 
    2928             : static PyMethodDef py_netr_LMSessionKey_methods[] = {
    2929             :         { "__ndr_pack__", (PyCFunction)py_netr_LMSessionKey_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    2930             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LMSessionKey_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    2931             :         { "__ndr_print__", (PyCFunction)py_netr_LMSessionKey_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    2932             :         { NULL, NULL, 0, NULL }
    2933             : };
    2934             : 
    2935             : 
    2936             : static PyTypeObject netr_LMSessionKey_Type = {
    2937             :         PyVarObject_HEAD_INIT(NULL, 0)
    2938             :         .tp_name = "netlogon.netr_LMSessionKey",
    2939             :         .tp_getset = py_netr_LMSessionKey_getsetters,
    2940             :         .tp_methods = py_netr_LMSessionKey_methods,
    2941             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2942             :         .tp_new = py_netr_LMSessionKey_new,
    2943             : };
    2944             : 
    2945             : 
    2946           0 : static PyObject *py_netr_SamBaseInfo_get_logon_time(PyObject *obj, void *closure)
    2947             : {
    2948           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    2949             :         PyObject *py_logon_time;
    2950           0 :         py_logon_time = PyLong_FromUnsignedLongLong(object->logon_time);
    2951           0 :         return py_logon_time;
    2952             : }
    2953             : 
    2954           0 : static int py_netr_SamBaseInfo_set_logon_time(PyObject *py_obj, PyObject *value, void *closure)
    2955             : {
    2956           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    2957           0 :         if (value == NULL) {
    2958           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_time");
    2959           0 :                 return -1;
    2960             :         }
    2961             :         {
    2962           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_time));
    2963           0 :                 if (PyLong_Check(value)) {
    2964             :                         unsigned long long test_var;
    2965           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2966           0 :                         if (PyErr_Occurred() != NULL) {
    2967           0 :                                 return -1;
    2968             :                         }
    2969           0 :                         if (test_var > uint_max) {
    2970           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    2971             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2972           0 :                                 return -1;
    2973             :                         }
    2974           0 :                         object->logon_time = test_var;
    2975             :                 } else {
    2976           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    2977             :                           PyLong_Type.tp_name);
    2978           0 :                         return -1;
    2979             :                 }
    2980             :         }
    2981           0 :         return 0;
    2982             : }
    2983             : 
    2984           0 : static PyObject *py_netr_SamBaseInfo_get_logoff_time(PyObject *obj, void *closure)
    2985             : {
    2986           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    2987             :         PyObject *py_logoff_time;
    2988           0 :         py_logoff_time = PyLong_FromUnsignedLongLong(object->logoff_time);
    2989           0 :         return py_logoff_time;
    2990             : }
    2991             : 
    2992           0 : static int py_netr_SamBaseInfo_set_logoff_time(PyObject *py_obj, PyObject *value, void *closure)
    2993             : {
    2994           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    2995           0 :         if (value == NULL) {
    2996           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logoff_time");
    2997           0 :                 return -1;
    2998             :         }
    2999             :         {
    3000           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logoff_time));
    3001           0 :                 if (PyLong_Check(value)) {
    3002             :                         unsigned long long test_var;
    3003           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3004           0 :                         if (PyErr_Occurred() != NULL) {
    3005           0 :                                 return -1;
    3006             :                         }
    3007           0 :                         if (test_var > uint_max) {
    3008           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3009             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3010           0 :                                 return -1;
    3011             :                         }
    3012           0 :                         object->logoff_time = test_var;
    3013             :                 } else {
    3014           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3015             :                           PyLong_Type.tp_name);
    3016           0 :                         return -1;
    3017             :                 }
    3018             :         }
    3019           0 :         return 0;
    3020             : }
    3021             : 
    3022           0 : static PyObject *py_netr_SamBaseInfo_get_kickoff_time(PyObject *obj, void *closure)
    3023             : {
    3024           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3025             :         PyObject *py_kickoff_time;
    3026           0 :         py_kickoff_time = PyLong_FromUnsignedLongLong(object->kickoff_time);
    3027           0 :         return py_kickoff_time;
    3028             : }
    3029             : 
    3030           0 : static int py_netr_SamBaseInfo_set_kickoff_time(PyObject *py_obj, PyObject *value, void *closure)
    3031             : {
    3032           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3033           0 :         if (value == NULL) {
    3034           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->kickoff_time");
    3035           0 :                 return -1;
    3036             :         }
    3037             :         {
    3038           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->kickoff_time));
    3039           0 :                 if (PyLong_Check(value)) {
    3040             :                         unsigned long long test_var;
    3041           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3042           0 :                         if (PyErr_Occurred() != NULL) {
    3043           0 :                                 return -1;
    3044             :                         }
    3045           0 :                         if (test_var > uint_max) {
    3046           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3047             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3048           0 :                                 return -1;
    3049             :                         }
    3050           0 :                         object->kickoff_time = test_var;
    3051             :                 } else {
    3052           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3053             :                           PyLong_Type.tp_name);
    3054           0 :                         return -1;
    3055             :                 }
    3056             :         }
    3057           0 :         return 0;
    3058             : }
    3059             : 
    3060           0 : static PyObject *py_netr_SamBaseInfo_get_last_password_change(PyObject *obj, void *closure)
    3061             : {
    3062           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3063             :         PyObject *py_last_password_change;
    3064           0 :         py_last_password_change = PyLong_FromUnsignedLongLong(object->last_password_change);
    3065           0 :         return py_last_password_change;
    3066             : }
    3067             : 
    3068           0 : static int py_netr_SamBaseInfo_set_last_password_change(PyObject *py_obj, PyObject *value, void *closure)
    3069             : {
    3070           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3071           0 :         if (value == NULL) {
    3072           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_password_change");
    3073           0 :                 return -1;
    3074             :         }
    3075             :         {
    3076           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_password_change));
    3077           0 :                 if (PyLong_Check(value)) {
    3078             :                         unsigned long long test_var;
    3079           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3080           0 :                         if (PyErr_Occurred() != NULL) {
    3081           0 :                                 return -1;
    3082             :                         }
    3083           0 :                         if (test_var > uint_max) {
    3084           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3085             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3086           0 :                                 return -1;
    3087             :                         }
    3088           0 :                         object->last_password_change = test_var;
    3089             :                 } else {
    3090           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3091             :                           PyLong_Type.tp_name);
    3092           0 :                         return -1;
    3093             :                 }
    3094             :         }
    3095           0 :         return 0;
    3096             : }
    3097             : 
    3098           0 : static PyObject *py_netr_SamBaseInfo_get_allow_password_change(PyObject *obj, void *closure)
    3099             : {
    3100           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3101             :         PyObject *py_allow_password_change;
    3102           0 :         py_allow_password_change = PyLong_FromUnsignedLongLong(object->allow_password_change);
    3103           0 :         return py_allow_password_change;
    3104             : }
    3105             : 
    3106           0 : static int py_netr_SamBaseInfo_set_allow_password_change(PyObject *py_obj, PyObject *value, void *closure)
    3107             : {
    3108           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3109           0 :         if (value == NULL) {
    3110           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->allow_password_change");
    3111           0 :                 return -1;
    3112             :         }
    3113             :         {
    3114           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->allow_password_change));
    3115           0 :                 if (PyLong_Check(value)) {
    3116             :                         unsigned long long test_var;
    3117           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3118           0 :                         if (PyErr_Occurred() != NULL) {
    3119           0 :                                 return -1;
    3120             :                         }
    3121           0 :                         if (test_var > uint_max) {
    3122           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3123             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3124           0 :                                 return -1;
    3125             :                         }
    3126           0 :                         object->allow_password_change = test_var;
    3127             :                 } else {
    3128           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3129             :                           PyLong_Type.tp_name);
    3130           0 :                         return -1;
    3131             :                 }
    3132             :         }
    3133           0 :         return 0;
    3134             : }
    3135             : 
    3136           0 : static PyObject *py_netr_SamBaseInfo_get_force_password_change(PyObject *obj, void *closure)
    3137             : {
    3138           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3139             :         PyObject *py_force_password_change;
    3140           0 :         py_force_password_change = PyLong_FromUnsignedLongLong(object->force_password_change);
    3141           0 :         return py_force_password_change;
    3142             : }
    3143             : 
    3144           0 : static int py_netr_SamBaseInfo_set_force_password_change(PyObject *py_obj, PyObject *value, void *closure)
    3145             : {
    3146           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3147           0 :         if (value == NULL) {
    3148           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->force_password_change");
    3149           0 :                 return -1;
    3150             :         }
    3151             :         {
    3152           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->force_password_change));
    3153           0 :                 if (PyLong_Check(value)) {
    3154             :                         unsigned long long test_var;
    3155           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3156           0 :                         if (PyErr_Occurred() != NULL) {
    3157           0 :                                 return -1;
    3158             :                         }
    3159           0 :                         if (test_var > uint_max) {
    3160           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3161             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3162           0 :                                 return -1;
    3163             :                         }
    3164           0 :                         object->force_password_change = test_var;
    3165             :                 } else {
    3166           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3167             :                           PyLong_Type.tp_name);
    3168           0 :                         return -1;
    3169             :                 }
    3170             :         }
    3171           0 :         return 0;
    3172             : }
    3173             : 
    3174           4 : static PyObject *py_netr_SamBaseInfo_get_account_name(PyObject *obj, void *closure)
    3175             : {
    3176           4 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3177             :         PyObject *py_account_name;
    3178           4 :         py_account_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->account_name);
    3179           4 :         return py_account_name;
    3180             : }
    3181             : 
    3182           0 : static int py_netr_SamBaseInfo_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
    3183             : {
    3184           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3185           0 :         if (value == NULL) {
    3186           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->account_name");
    3187           0 :                 return -1;
    3188             :         }
    3189           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    3190           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3191           0 :                 PyErr_NoMemory();
    3192           0 :                 return -1;
    3193             :         }
    3194           0 :         object->account_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    3195           0 :         return 0;
    3196             : }
    3197             : 
    3198           0 : static PyObject *py_netr_SamBaseInfo_get_full_name(PyObject *obj, void *closure)
    3199             : {
    3200           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3201             :         PyObject *py_full_name;
    3202           0 :         py_full_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->full_name);
    3203           0 :         return py_full_name;
    3204             : }
    3205             : 
    3206           0 : static int py_netr_SamBaseInfo_set_full_name(PyObject *py_obj, PyObject *value, void *closure)
    3207             : {
    3208           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3209           0 :         if (value == NULL) {
    3210           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->full_name");
    3211           0 :                 return -1;
    3212             :         }
    3213           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    3214           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3215           0 :                 PyErr_NoMemory();
    3216           0 :                 return -1;
    3217             :         }
    3218           0 :         object->full_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    3219           0 :         return 0;
    3220             : }
    3221             : 
    3222           0 : static PyObject *py_netr_SamBaseInfo_get_logon_script(PyObject *obj, void *closure)
    3223             : {
    3224           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3225             :         PyObject *py_logon_script;
    3226           0 :         py_logon_script = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->logon_script);
    3227           0 :         return py_logon_script;
    3228             : }
    3229             : 
    3230           0 : static int py_netr_SamBaseInfo_set_logon_script(PyObject *py_obj, PyObject *value, void *closure)
    3231             : {
    3232           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3233           0 :         if (value == NULL) {
    3234           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_script");
    3235           0 :                 return -1;
    3236             :         }
    3237           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    3238           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3239           0 :                 PyErr_NoMemory();
    3240           0 :                 return -1;
    3241             :         }
    3242           0 :         object->logon_script = *(struct lsa_String *)pytalloc_get_ptr(value);
    3243           0 :         return 0;
    3244             : }
    3245             : 
    3246           0 : static PyObject *py_netr_SamBaseInfo_get_profile_path(PyObject *obj, void *closure)
    3247             : {
    3248           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3249             :         PyObject *py_profile_path;
    3250           0 :         py_profile_path = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->profile_path);
    3251           0 :         return py_profile_path;
    3252             : }
    3253             : 
    3254           0 : static int py_netr_SamBaseInfo_set_profile_path(PyObject *py_obj, PyObject *value, void *closure)
    3255             : {
    3256           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3257           0 :         if (value == NULL) {
    3258           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->profile_path");
    3259           0 :                 return -1;
    3260             :         }
    3261           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    3262           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3263           0 :                 PyErr_NoMemory();
    3264           0 :                 return -1;
    3265             :         }
    3266           0 :         object->profile_path = *(struct lsa_String *)pytalloc_get_ptr(value);
    3267           0 :         return 0;
    3268             : }
    3269             : 
    3270           0 : static PyObject *py_netr_SamBaseInfo_get_home_directory(PyObject *obj, void *closure)
    3271             : {
    3272           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3273             :         PyObject *py_home_directory;
    3274           0 :         py_home_directory = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->home_directory);
    3275           0 :         return py_home_directory;
    3276             : }
    3277             : 
    3278           0 : static int py_netr_SamBaseInfo_set_home_directory(PyObject *py_obj, PyObject *value, void *closure)
    3279             : {
    3280           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3281           0 :         if (value == NULL) {
    3282           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->home_directory");
    3283           0 :                 return -1;
    3284             :         }
    3285           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    3286           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3287           0 :                 PyErr_NoMemory();
    3288           0 :                 return -1;
    3289             :         }
    3290           0 :         object->home_directory = *(struct lsa_String *)pytalloc_get_ptr(value);
    3291           0 :         return 0;
    3292             : }
    3293             : 
    3294           0 : static PyObject *py_netr_SamBaseInfo_get_home_drive(PyObject *obj, void *closure)
    3295             : {
    3296           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3297             :         PyObject *py_home_drive;
    3298           0 :         py_home_drive = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->home_drive);
    3299           0 :         return py_home_drive;
    3300             : }
    3301             : 
    3302           0 : static int py_netr_SamBaseInfo_set_home_drive(PyObject *py_obj, PyObject *value, void *closure)
    3303             : {
    3304           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3305           0 :         if (value == NULL) {
    3306           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->home_drive");
    3307           0 :                 return -1;
    3308             :         }
    3309           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    3310           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3311           0 :                 PyErr_NoMemory();
    3312           0 :                 return -1;
    3313             :         }
    3314           0 :         object->home_drive = *(struct lsa_String *)pytalloc_get_ptr(value);
    3315           0 :         return 0;
    3316             : }
    3317             : 
    3318           0 : static PyObject *py_netr_SamBaseInfo_get_logon_count(PyObject *obj, void *closure)
    3319             : {
    3320           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3321             :         PyObject *py_logon_count;
    3322           0 :         py_logon_count = PyLong_FromLong((uint16_t)object->logon_count);
    3323           0 :         return py_logon_count;
    3324             : }
    3325             : 
    3326           0 : static int py_netr_SamBaseInfo_set_logon_count(PyObject *py_obj, PyObject *value, void *closure)
    3327             : {
    3328           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3329           0 :         if (value == NULL) {
    3330           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_count");
    3331           0 :                 return -1;
    3332             :         }
    3333             :         {
    3334           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_count));
    3335           0 :                 if (PyLong_Check(value)) {
    3336             :                         unsigned long long test_var;
    3337           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3338           0 :                         if (PyErr_Occurred() != NULL) {
    3339           0 :                                 return -1;
    3340             :                         }
    3341           0 :                         if (test_var > uint_max) {
    3342           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3343             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3344           0 :                                 return -1;
    3345             :                         }
    3346           0 :                         object->logon_count = test_var;
    3347             :                 } else {
    3348           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3349             :                           PyLong_Type.tp_name);
    3350           0 :                         return -1;
    3351             :                 }
    3352             :         }
    3353           0 :         return 0;
    3354             : }
    3355             : 
    3356           0 : static PyObject *py_netr_SamBaseInfo_get_bad_password_count(PyObject *obj, void *closure)
    3357             : {
    3358           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3359             :         PyObject *py_bad_password_count;
    3360           0 :         py_bad_password_count = PyLong_FromLong((uint16_t)object->bad_password_count);
    3361           0 :         return py_bad_password_count;
    3362             : }
    3363             : 
    3364           0 : static int py_netr_SamBaseInfo_set_bad_password_count(PyObject *py_obj, PyObject *value, void *closure)
    3365             : {
    3366           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3367           0 :         if (value == NULL) {
    3368           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bad_password_count");
    3369           0 :                 return -1;
    3370             :         }
    3371             :         {
    3372           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bad_password_count));
    3373           0 :                 if (PyLong_Check(value)) {
    3374             :                         unsigned long long test_var;
    3375           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3376           0 :                         if (PyErr_Occurred() != NULL) {
    3377           0 :                                 return -1;
    3378             :                         }
    3379           0 :                         if (test_var > uint_max) {
    3380           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3381             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3382           0 :                                 return -1;
    3383             :                         }
    3384           0 :                         object->bad_password_count = test_var;
    3385             :                 } else {
    3386           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3387             :                           PyLong_Type.tp_name);
    3388           0 :                         return -1;
    3389             :                 }
    3390             :         }
    3391           0 :         return 0;
    3392             : }
    3393             : 
    3394           4 : static PyObject *py_netr_SamBaseInfo_get_rid(PyObject *obj, void *closure)
    3395             : {
    3396           4 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3397             :         PyObject *py_rid;
    3398           4 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)object->rid);
    3399           4 :         return py_rid;
    3400             : }
    3401             : 
    3402           0 : static int py_netr_SamBaseInfo_set_rid(PyObject *py_obj, PyObject *value, void *closure)
    3403             : {
    3404           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3405           0 :         if (value == NULL) {
    3406           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rid");
    3407           0 :                 return -1;
    3408             :         }
    3409             :         {
    3410           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rid));
    3411           0 :                 if (PyLong_Check(value)) {
    3412             :                         unsigned long long test_var;
    3413           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3414           0 :                         if (PyErr_Occurred() != NULL) {
    3415           0 :                                 return -1;
    3416             :                         }
    3417           0 :                         if (test_var > uint_max) {
    3418           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3419             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3420           0 :                                 return -1;
    3421             :                         }
    3422           0 :                         object->rid = test_var;
    3423             :                 } else {
    3424           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3425             :                           PyLong_Type.tp_name);
    3426           0 :                         return -1;
    3427             :                 }
    3428             :         }
    3429           0 :         return 0;
    3430             : }
    3431             : 
    3432           0 : static PyObject *py_netr_SamBaseInfo_get_primary_gid(PyObject *obj, void *closure)
    3433             : {
    3434           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3435             :         PyObject *py_primary_gid;
    3436           0 :         py_primary_gid = PyLong_FromUnsignedLongLong((uint32_t)object->primary_gid);
    3437           0 :         return py_primary_gid;
    3438             : }
    3439             : 
    3440           0 : static int py_netr_SamBaseInfo_set_primary_gid(PyObject *py_obj, PyObject *value, void *closure)
    3441             : {
    3442           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3443           0 :         if (value == NULL) {
    3444           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->primary_gid");
    3445           0 :                 return -1;
    3446             :         }
    3447             :         {
    3448           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->primary_gid));
    3449           0 :                 if (PyLong_Check(value)) {
    3450             :                         unsigned long long test_var;
    3451           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3452           0 :                         if (PyErr_Occurred() != NULL) {
    3453           0 :                                 return -1;
    3454             :                         }
    3455           0 :                         if (test_var > uint_max) {
    3456           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3457             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3458           0 :                                 return -1;
    3459             :                         }
    3460           0 :                         object->primary_gid = test_var;
    3461             :                 } else {
    3462           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3463             :                           PyLong_Type.tp_name);
    3464           0 :                         return -1;
    3465             :                 }
    3466             :         }
    3467           0 :         return 0;
    3468             : }
    3469             : 
    3470           0 : static PyObject *py_netr_SamBaseInfo_get_groups(PyObject *obj, void *closure)
    3471             : {
    3472           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3473             :         PyObject *py_groups;
    3474           0 :         py_groups = pytalloc_reference_ex(samr_RidWithAttributeArray_Type, pytalloc_get_mem_ctx(obj), &object->groups);
    3475           0 :         return py_groups;
    3476             : }
    3477             : 
    3478           0 : static int py_netr_SamBaseInfo_set_groups(PyObject *py_obj, PyObject *value, void *closure)
    3479             : {
    3480           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3481           0 :         if (value == NULL) {
    3482           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->groups");
    3483           0 :                 return -1;
    3484             :         }
    3485           0 :         PY_CHECK_TYPE(samr_RidWithAttributeArray_Type, value, return -1;);
    3486           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3487           0 :                 PyErr_NoMemory();
    3488           0 :                 return -1;
    3489             :         }
    3490           0 :         object->groups = *(struct samr_RidWithAttributeArray *)pytalloc_get_ptr(value);
    3491           0 :         return 0;
    3492             : }
    3493             : 
    3494           0 : static PyObject *py_netr_SamBaseInfo_get_user_flags(PyObject *obj, void *closure)
    3495             : {
    3496           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3497             :         PyObject *py_user_flags;
    3498           0 :         py_user_flags = PyLong_FromUnsignedLongLong((uint32_t)object->user_flags);
    3499           0 :         return py_user_flags;
    3500             : }
    3501             : 
    3502           0 : static int py_netr_SamBaseInfo_set_user_flags(PyObject *py_obj, PyObject *value, void *closure)
    3503             : {
    3504           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3505           0 :         if (value == NULL) {
    3506           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user_flags");
    3507           0 :                 return -1;
    3508             :         }
    3509             :         {
    3510           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->user_flags));
    3511           0 :                 if (PyLong_Check(value)) {
    3512             :                         unsigned long long test_var;
    3513           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3514           0 :                         if (PyErr_Occurred() != NULL) {
    3515           0 :                                 return -1;
    3516             :                         }
    3517           0 :                         if (test_var > uint_max) {
    3518           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3519             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3520           0 :                                 return -1;
    3521             :                         }
    3522           0 :                         object->user_flags = test_var;
    3523             :                 } else {
    3524           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3525             :                           PyLong_Type.tp_name);
    3526           0 :                         return -1;
    3527             :                 }
    3528             :         }
    3529           0 :         return 0;
    3530             : }
    3531             : 
    3532           0 : static PyObject *py_netr_SamBaseInfo_get_key(PyObject *obj, void *closure)
    3533             : {
    3534           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3535             :         PyObject *py_key;
    3536           0 :         py_key = pytalloc_reference_ex(&netr_UserSessionKey_Type, pytalloc_get_mem_ctx(obj), &object->key);
    3537           0 :         return py_key;
    3538             : }
    3539             : 
    3540           0 : static int py_netr_SamBaseInfo_set_key(PyObject *py_obj, PyObject *value, void *closure)
    3541             : {
    3542           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3543           0 :         if (value == NULL) {
    3544           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->key");
    3545           0 :                 return -1;
    3546             :         }
    3547           0 :         PY_CHECK_TYPE(&netr_UserSessionKey_Type, value, return -1;);
    3548           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3549           0 :                 PyErr_NoMemory();
    3550           0 :                 return -1;
    3551             :         }
    3552           0 :         object->key = *(struct netr_UserSessionKey *)pytalloc_get_ptr(value);
    3553           0 :         return 0;
    3554             : }
    3555             : 
    3556           0 : static PyObject *py_netr_SamBaseInfo_get_logon_server(PyObject *obj, void *closure)
    3557             : {
    3558           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3559             :         PyObject *py_logon_server;
    3560           0 :         py_logon_server = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->logon_server);
    3561           0 :         return py_logon_server;
    3562             : }
    3563             : 
    3564           0 : static int py_netr_SamBaseInfo_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
    3565             : {
    3566           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3567           0 :         if (value == NULL) {
    3568           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_server");
    3569           0 :                 return -1;
    3570             :         }
    3571           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
    3572           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3573           0 :                 PyErr_NoMemory();
    3574           0 :                 return -1;
    3575             :         }
    3576           0 :         object->logon_server = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
    3577           0 :         return 0;
    3578             : }
    3579             : 
    3580           0 : static PyObject *py_netr_SamBaseInfo_get_logon_domain(PyObject *obj, void *closure)
    3581             : {
    3582           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3583             :         PyObject *py_logon_domain;
    3584           0 :         py_logon_domain = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->logon_domain);
    3585           0 :         return py_logon_domain;
    3586             : }
    3587             : 
    3588           0 : static int py_netr_SamBaseInfo_set_logon_domain(PyObject *py_obj, PyObject *value, void *closure)
    3589             : {
    3590           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3591           0 :         if (value == NULL) {
    3592           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_domain");
    3593           0 :                 return -1;
    3594             :         }
    3595           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
    3596           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3597           0 :                 PyErr_NoMemory();
    3598           0 :                 return -1;
    3599             :         }
    3600           0 :         object->logon_domain = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
    3601           0 :         return 0;
    3602             : }
    3603             : 
    3604           4 : static PyObject *py_netr_SamBaseInfo_get_domain_sid(PyObject *obj, void *closure)
    3605             : {
    3606           4 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3607             :         PyObject *py_domain_sid;
    3608           4 :         if (object->domain_sid == NULL) {
    3609           0 :                 Py_RETURN_NONE;
    3610             :         }
    3611           4 :         if (object->domain_sid == NULL) {
    3612           0 :                 py_domain_sid = Py_None;
    3613           0 :                 Py_INCREF(py_domain_sid);
    3614             :         } else {
    3615           4 :                 py_domain_sid = pytalloc_reference_ex(dom_sid_Type, object->domain_sid, object->domain_sid);
    3616             :         }
    3617           4 :         return py_domain_sid;
    3618             : }
    3619             : 
    3620           0 : static int py_netr_SamBaseInfo_set_domain_sid(PyObject *py_obj, PyObject *value, void *closure)
    3621             : {
    3622           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3623           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->domain_sid));
    3624           0 :         if (value == NULL) {
    3625           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_sid");
    3626           0 :                 return -1;
    3627             :         }
    3628           0 :         if (value == Py_None) {
    3629           0 :                 object->domain_sid = NULL;
    3630             :         } else {
    3631           0 :                 object->domain_sid = NULL;
    3632           0 :                 PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
    3633           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3634           0 :                         PyErr_NoMemory();
    3635           0 :                         return -1;
    3636             :                 }
    3637           0 :                 object->domain_sid = (struct dom_sid *)pytalloc_get_ptr(value);
    3638             :         }
    3639           0 :         return 0;
    3640             : }
    3641             : 
    3642           0 : static PyObject *py_netr_SamBaseInfo_get_LMSessKey(PyObject *obj, void *closure)
    3643             : {
    3644           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3645             :         PyObject *py_LMSessKey;
    3646           0 :         py_LMSessKey = pytalloc_reference_ex(&netr_LMSessionKey_Type, pytalloc_get_mem_ctx(obj), &object->LMSessKey);
    3647           0 :         return py_LMSessKey;
    3648             : }
    3649             : 
    3650           0 : static int py_netr_SamBaseInfo_set_LMSessKey(PyObject *py_obj, PyObject *value, void *closure)
    3651             : {
    3652           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3653           0 :         if (value == NULL) {
    3654           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->LMSessKey");
    3655           0 :                 return -1;
    3656             :         }
    3657           0 :         PY_CHECK_TYPE(&netr_LMSessionKey_Type, value, return -1;);
    3658           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3659           0 :                 PyErr_NoMemory();
    3660           0 :                 return -1;
    3661             :         }
    3662           0 :         object->LMSessKey = *(struct netr_LMSessionKey *)pytalloc_get_ptr(value);
    3663           0 :         return 0;
    3664             : }
    3665             : 
    3666           0 : static PyObject *py_netr_SamBaseInfo_get_acct_flags(PyObject *obj, void *closure)
    3667             : {
    3668           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3669             :         PyObject *py_acct_flags;
    3670           0 :         py_acct_flags = PyLong_FromUnsignedLongLong((uint32_t)object->acct_flags);
    3671           0 :         return py_acct_flags;
    3672             : }
    3673             : 
    3674           0 : static int py_netr_SamBaseInfo_set_acct_flags(PyObject *py_obj, PyObject *value, void *closure)
    3675             : {
    3676           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3677           0 :         if (value == NULL) {
    3678           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->acct_flags");
    3679           0 :                 return -1;
    3680             :         }
    3681             :         {
    3682           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acct_flags));
    3683           0 :                 if (PyLong_Check(value)) {
    3684             :                         unsigned long long test_var;
    3685           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3686           0 :                         if (PyErr_Occurred() != NULL) {
    3687           0 :                                 return -1;
    3688             :                         }
    3689           0 :                         if (test_var > uint_max) {
    3690           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3691             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3692           0 :                                 return -1;
    3693             :                         }
    3694           0 :                         object->acct_flags = test_var;
    3695             :                 } else {
    3696           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3697             :                           PyLong_Type.tp_name);
    3698           0 :                         return -1;
    3699             :                 }
    3700             :         }
    3701           0 :         return 0;
    3702             : }
    3703             : 
    3704           0 : static PyObject *py_netr_SamBaseInfo_get_sub_auth_status(PyObject *obj, void *closure)
    3705             : {
    3706           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3707             :         PyObject *py_sub_auth_status;
    3708           0 :         py_sub_auth_status = PyLong_FromUnsignedLongLong((uint32_t)object->sub_auth_status);
    3709           0 :         return py_sub_auth_status;
    3710             : }
    3711             : 
    3712           0 : static int py_netr_SamBaseInfo_set_sub_auth_status(PyObject *py_obj, PyObject *value, void *closure)
    3713             : {
    3714           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3715           0 :         if (value == NULL) {
    3716           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sub_auth_status");
    3717           0 :                 return -1;
    3718             :         }
    3719             :         {
    3720           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sub_auth_status));
    3721           0 :                 if (PyLong_Check(value)) {
    3722             :                         unsigned long long test_var;
    3723           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3724           0 :                         if (PyErr_Occurred() != NULL) {
    3725           0 :                                 return -1;
    3726             :                         }
    3727           0 :                         if (test_var > uint_max) {
    3728           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3729             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3730           0 :                                 return -1;
    3731             :                         }
    3732           0 :                         object->sub_auth_status = test_var;
    3733             :                 } else {
    3734           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3735             :                           PyLong_Type.tp_name);
    3736           0 :                         return -1;
    3737             :                 }
    3738             :         }
    3739           0 :         return 0;
    3740             : }
    3741             : 
    3742           0 : static PyObject *py_netr_SamBaseInfo_get_last_successful_logon(PyObject *obj, void *closure)
    3743             : {
    3744           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3745             :         PyObject *py_last_successful_logon;
    3746           0 :         py_last_successful_logon = PyLong_FromUnsignedLongLong(object->last_successful_logon);
    3747           0 :         return py_last_successful_logon;
    3748             : }
    3749             : 
    3750           0 : static int py_netr_SamBaseInfo_set_last_successful_logon(PyObject *py_obj, PyObject *value, void *closure)
    3751             : {
    3752           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3753           0 :         if (value == NULL) {
    3754           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_successful_logon");
    3755           0 :                 return -1;
    3756             :         }
    3757             :         {
    3758           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_successful_logon));
    3759           0 :                 if (PyLong_Check(value)) {
    3760             :                         unsigned long long test_var;
    3761           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3762           0 :                         if (PyErr_Occurred() != NULL) {
    3763           0 :                                 return -1;
    3764             :                         }
    3765           0 :                         if (test_var > uint_max) {
    3766           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3767             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3768           0 :                                 return -1;
    3769             :                         }
    3770           0 :                         object->last_successful_logon = test_var;
    3771             :                 } else {
    3772           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3773             :                           PyLong_Type.tp_name);
    3774           0 :                         return -1;
    3775             :                 }
    3776             :         }
    3777           0 :         return 0;
    3778             : }
    3779             : 
    3780           0 : static PyObject *py_netr_SamBaseInfo_get_last_failed_logon(PyObject *obj, void *closure)
    3781             : {
    3782           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3783             :         PyObject *py_last_failed_logon;
    3784           0 :         py_last_failed_logon = PyLong_FromUnsignedLongLong(object->last_failed_logon);
    3785           0 :         return py_last_failed_logon;
    3786             : }
    3787             : 
    3788           0 : static int py_netr_SamBaseInfo_set_last_failed_logon(PyObject *py_obj, PyObject *value, void *closure)
    3789             : {
    3790           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3791           0 :         if (value == NULL) {
    3792           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_failed_logon");
    3793           0 :                 return -1;
    3794             :         }
    3795             :         {
    3796           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_failed_logon));
    3797           0 :                 if (PyLong_Check(value)) {
    3798             :                         unsigned long long test_var;
    3799           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3800           0 :                         if (PyErr_Occurred() != NULL) {
    3801           0 :                                 return -1;
    3802             :                         }
    3803           0 :                         if (test_var > uint_max) {
    3804           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3805             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3806           0 :                                 return -1;
    3807             :                         }
    3808           0 :                         object->last_failed_logon = test_var;
    3809             :                 } else {
    3810           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3811             :                           PyLong_Type.tp_name);
    3812           0 :                         return -1;
    3813             :                 }
    3814             :         }
    3815           0 :         return 0;
    3816             : }
    3817             : 
    3818           0 : static PyObject *py_netr_SamBaseInfo_get_failed_logon_count(PyObject *obj, void *closure)
    3819             : {
    3820           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3821             :         PyObject *py_failed_logon_count;
    3822           0 :         py_failed_logon_count = PyLong_FromUnsignedLongLong((uint32_t)object->failed_logon_count);
    3823           0 :         return py_failed_logon_count;
    3824             : }
    3825             : 
    3826           0 : static int py_netr_SamBaseInfo_set_failed_logon_count(PyObject *py_obj, PyObject *value, void *closure)
    3827             : {
    3828           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3829           0 :         if (value == NULL) {
    3830           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->failed_logon_count");
    3831           0 :                 return -1;
    3832             :         }
    3833             :         {
    3834           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->failed_logon_count));
    3835           0 :                 if (PyLong_Check(value)) {
    3836             :                         unsigned long long test_var;
    3837           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3838           0 :                         if (PyErr_Occurred() != NULL) {
    3839           0 :                                 return -1;
    3840             :                         }
    3841           0 :                         if (test_var > uint_max) {
    3842           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3843             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3844           0 :                                 return -1;
    3845             :                         }
    3846           0 :                         object->failed_logon_count = test_var;
    3847             :                 } else {
    3848           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3849             :                           PyLong_Type.tp_name);
    3850           0 :                         return -1;
    3851             :                 }
    3852             :         }
    3853           0 :         return 0;
    3854             : }
    3855             : 
    3856           0 : static PyObject *py_netr_SamBaseInfo_get_reserved(PyObject *obj, void *closure)
    3857             : {
    3858           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(obj);
    3859             :         PyObject *py_reserved;
    3860           0 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)object->reserved);
    3861           0 :         return py_reserved;
    3862             : }
    3863             : 
    3864           0 : static int py_netr_SamBaseInfo_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
    3865             : {
    3866           0 :         struct netr_SamBaseInfo *object = (struct netr_SamBaseInfo *)pytalloc_get_ptr(py_obj);
    3867           0 :         if (value == NULL) {
    3868           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
    3869           0 :                 return -1;
    3870             :         }
    3871             :         {
    3872           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
    3873           0 :                 if (PyLong_Check(value)) {
    3874             :                         unsigned long long test_var;
    3875           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3876           0 :                         if (PyErr_Occurred() != NULL) {
    3877           0 :                                 return -1;
    3878             :                         }
    3879           0 :                         if (test_var > uint_max) {
    3880           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    3881             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3882           0 :                                 return -1;
    3883             :                         }
    3884           0 :                         object->reserved = test_var;
    3885             :                 } else {
    3886           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    3887             :                           PyLong_Type.tp_name);
    3888           0 :                         return -1;
    3889             :                 }
    3890             :         }
    3891           0 :         return 0;
    3892             : }
    3893             : 
    3894             : static PyGetSetDef py_netr_SamBaseInfo_getsetters[] = {
    3895             :         {
    3896             :                 .name = discard_const_p(char, "logon_time"),
    3897             :                 .get = py_netr_SamBaseInfo_get_logon_time,
    3898             :                 .set = py_netr_SamBaseInfo_set_logon_time,
    3899             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    3900             :         },
    3901             :         {
    3902             :                 .name = discard_const_p(char, "logoff_time"),
    3903             :                 .get = py_netr_SamBaseInfo_get_logoff_time,
    3904             :                 .set = py_netr_SamBaseInfo_set_logoff_time,
    3905             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    3906             :         },
    3907             :         {
    3908             :                 .name = discard_const_p(char, "kickoff_time"),
    3909             :                 .get = py_netr_SamBaseInfo_get_kickoff_time,
    3910             :                 .set = py_netr_SamBaseInfo_set_kickoff_time,
    3911             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    3912             :         },
    3913             :         {
    3914             :                 .name = discard_const_p(char, "last_password_change"),
    3915             :                 .get = py_netr_SamBaseInfo_get_last_password_change,
    3916             :                 .set = py_netr_SamBaseInfo_set_last_password_change,
    3917             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    3918             :         },
    3919             :         {
    3920             :                 .name = discard_const_p(char, "allow_password_change"),
    3921             :                 .get = py_netr_SamBaseInfo_get_allow_password_change,
    3922             :                 .set = py_netr_SamBaseInfo_set_allow_password_change,
    3923             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    3924             :         },
    3925             :         {
    3926             :                 .name = discard_const_p(char, "force_password_change"),
    3927             :                 .get = py_netr_SamBaseInfo_get_force_password_change,
    3928             :                 .set = py_netr_SamBaseInfo_set_force_password_change,
    3929             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    3930             :         },
    3931             :         {
    3932             :                 .name = discard_const_p(char, "account_name"),
    3933             :                 .get = py_netr_SamBaseInfo_get_account_name,
    3934             :                 .set = py_netr_SamBaseInfo_set_account_name,
    3935             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    3936             :         },
    3937             :         {
    3938             :                 .name = discard_const_p(char, "full_name"),
    3939             :                 .get = py_netr_SamBaseInfo_get_full_name,
    3940             :                 .set = py_netr_SamBaseInfo_set_full_name,
    3941             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    3942             :         },
    3943             :         {
    3944             :                 .name = discard_const_p(char, "logon_script"),
    3945             :                 .get = py_netr_SamBaseInfo_get_logon_script,
    3946             :                 .set = py_netr_SamBaseInfo_set_logon_script,
    3947             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    3948             :         },
    3949             :         {
    3950             :                 .name = discard_const_p(char, "profile_path"),
    3951             :                 .get = py_netr_SamBaseInfo_get_profile_path,
    3952             :                 .set = py_netr_SamBaseInfo_set_profile_path,
    3953             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    3954             :         },
    3955             :         {
    3956             :                 .name = discard_const_p(char, "home_directory"),
    3957             :                 .get = py_netr_SamBaseInfo_get_home_directory,
    3958             :                 .set = py_netr_SamBaseInfo_set_home_directory,
    3959             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    3960             :         },
    3961             :         {
    3962             :                 .name = discard_const_p(char, "home_drive"),
    3963             :                 .get = py_netr_SamBaseInfo_get_home_drive,
    3964             :                 .set = py_netr_SamBaseInfo_set_home_drive,
    3965             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    3966             :         },
    3967             :         {
    3968             :                 .name = discard_const_p(char, "logon_count"),
    3969             :                 .get = py_netr_SamBaseInfo_get_logon_count,
    3970             :                 .set = py_netr_SamBaseInfo_set_logon_count,
    3971             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    3972             :         },
    3973             :         {
    3974             :                 .name = discard_const_p(char, "bad_password_count"),
    3975             :                 .get = py_netr_SamBaseInfo_get_bad_password_count,
    3976             :                 .set = py_netr_SamBaseInfo_set_bad_password_count,
    3977             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    3978             :         },
    3979             :         {
    3980             :                 .name = discard_const_p(char, "rid"),
    3981             :                 .get = py_netr_SamBaseInfo_get_rid,
    3982             :                 .set = py_netr_SamBaseInfo_set_rid,
    3983             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3984             :         },
    3985             :         {
    3986             :                 .name = discard_const_p(char, "primary_gid"),
    3987             :                 .get = py_netr_SamBaseInfo_get_primary_gid,
    3988             :                 .set = py_netr_SamBaseInfo_set_primary_gid,
    3989             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3990             :         },
    3991             :         {
    3992             :                 .name = discard_const_p(char, "groups"),
    3993             :                 .get = py_netr_SamBaseInfo_get_groups,
    3994             :                 .set = py_netr_SamBaseInfo_set_groups,
    3995             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_RidWithAttributeArray")
    3996             :         },
    3997             :         {
    3998             :                 .name = discard_const_p(char, "user_flags"),
    3999             :                 .get = py_netr_SamBaseInfo_get_user_flags,
    4000             :                 .set = py_netr_SamBaseInfo_set_user_flags,
    4001             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UserFlags")
    4002             :         },
    4003             :         {
    4004             :                 .name = discard_const_p(char, "key"),
    4005             :                 .get = py_netr_SamBaseInfo_get_key,
    4006             :                 .set = py_netr_SamBaseInfo_set_key,
    4007             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UserSessionKey")
    4008             :         },
    4009             :         {
    4010             :                 .name = discard_const_p(char, "logon_server"),
    4011             :                 .get = py_netr_SamBaseInfo_get_logon_server,
    4012             :                 .set = py_netr_SamBaseInfo_set_logon_server,
    4013             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
    4014             :         },
    4015             :         {
    4016             :                 .name = discard_const_p(char, "logon_domain"),
    4017             :                 .get = py_netr_SamBaseInfo_get_logon_domain,
    4018             :                 .set = py_netr_SamBaseInfo_set_logon_domain,
    4019             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
    4020             :         },
    4021             :         {
    4022             :                 .name = discard_const_p(char, "domain_sid"),
    4023             :                 .get = py_netr_SamBaseInfo_get_domain_sid,
    4024             :                 .set = py_netr_SamBaseInfo_set_domain_sid,
    4025             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid2")
    4026             :         },
    4027             :         {
    4028             :                 .name = discard_const_p(char, "LMSessKey"),
    4029             :                 .get = py_netr_SamBaseInfo_get_LMSessKey,
    4030             :                 .set = py_netr_SamBaseInfo_set_LMSessKey,
    4031             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LMSessionKey")
    4032             :         },
    4033             :         {
    4034             :                 .name = discard_const_p(char, "acct_flags"),
    4035             :                 .get = py_netr_SamBaseInfo_get_acct_flags,
    4036             :                 .set = py_netr_SamBaseInfo_set_acct_flags,
    4037             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_AcctFlags")
    4038             :         },
    4039             :         {
    4040             :                 .name = discard_const_p(char, "sub_auth_status"),
    4041             :                 .get = py_netr_SamBaseInfo_get_sub_auth_status,
    4042             :                 .set = py_netr_SamBaseInfo_set_sub_auth_status,
    4043             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4044             :         },
    4045             :         {
    4046             :                 .name = discard_const_p(char, "last_successful_logon"),
    4047             :                 .get = py_netr_SamBaseInfo_get_last_successful_logon,
    4048             :                 .set = py_netr_SamBaseInfo_set_last_successful_logon,
    4049             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    4050             :         },
    4051             :         {
    4052             :                 .name = discard_const_p(char, "last_failed_logon"),
    4053             :                 .get = py_netr_SamBaseInfo_get_last_failed_logon,
    4054             :                 .set = py_netr_SamBaseInfo_set_last_failed_logon,
    4055             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    4056             :         },
    4057             :         {
    4058             :                 .name = discard_const_p(char, "failed_logon_count"),
    4059             :                 .get = py_netr_SamBaseInfo_get_failed_logon_count,
    4060             :                 .set = py_netr_SamBaseInfo_set_failed_logon_count,
    4061             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4062             :         },
    4063             :         {
    4064             :                 .name = discard_const_p(char, "reserved"),
    4065             :                 .get = py_netr_SamBaseInfo_get_reserved,
    4066             :                 .set = py_netr_SamBaseInfo_set_reserved,
    4067             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4068             :         },
    4069             :         { .name = NULL }
    4070             : };
    4071             : 
    4072           0 : static PyObject *py_netr_SamBaseInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4073             : {
    4074           0 :         return pytalloc_new(struct netr_SamBaseInfo, type);
    4075             : }
    4076             : 
    4077             : 
    4078             : static PyTypeObject netr_SamBaseInfo_Type = {
    4079             :         PyVarObject_HEAD_INIT(NULL, 0)
    4080             :         .tp_name = "netlogon.netr_SamBaseInfo",
    4081             :         .tp_getset = py_netr_SamBaseInfo_getsetters,
    4082             :         .tp_methods = NULL,
    4083             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4084             :         .tp_new = py_netr_SamBaseInfo_new,
    4085             : };
    4086             : 
    4087             : 
    4088           0 : static PyObject *py_netr_SamInfo2_get_base(PyObject *obj, void *closure)
    4089             : {
    4090           0 :         struct netr_SamInfo2 *object = (struct netr_SamInfo2 *)pytalloc_get_ptr(obj);
    4091             :         PyObject *py_base;
    4092           0 :         py_base = pytalloc_reference_ex(&netr_SamBaseInfo_Type, pytalloc_get_mem_ctx(obj), &object->base);
    4093           0 :         return py_base;
    4094             : }
    4095             : 
    4096           0 : static int py_netr_SamInfo2_set_base(PyObject *py_obj, PyObject *value, void *closure)
    4097             : {
    4098           0 :         struct netr_SamInfo2 *object = (struct netr_SamInfo2 *)pytalloc_get_ptr(py_obj);
    4099           0 :         if (value == NULL) {
    4100           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->base");
    4101           0 :                 return -1;
    4102             :         }
    4103           0 :         PY_CHECK_TYPE(&netr_SamBaseInfo_Type, value, return -1;);
    4104           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4105           0 :                 PyErr_NoMemory();
    4106           0 :                 return -1;
    4107             :         }
    4108           0 :         object->base = *(struct netr_SamBaseInfo *)pytalloc_get_ptr(value);
    4109           0 :         return 0;
    4110             : }
    4111             : 
    4112             : static PyGetSetDef py_netr_SamInfo2_getsetters[] = {
    4113             :         {
    4114             :                 .name = discard_const_p(char, "base"),
    4115             :                 .get = py_netr_SamInfo2_get_base,
    4116             :                 .set = py_netr_SamInfo2_set_base,
    4117             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SamBaseInfo")
    4118             :         },
    4119             :         { .name = NULL }
    4120             : };
    4121             : 
    4122           0 : static PyObject *py_netr_SamInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4123             : {
    4124           0 :         return pytalloc_new(struct netr_SamInfo2, type);
    4125             : }
    4126             : 
    4127             : 
    4128             : static PyTypeObject netr_SamInfo2_Type = {
    4129             :         PyVarObject_HEAD_INIT(NULL, 0)
    4130             :         .tp_name = "netlogon.netr_SamInfo2",
    4131             :         .tp_getset = py_netr_SamInfo2_getsetters,
    4132             :         .tp_methods = NULL,
    4133             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4134             :         .tp_new = py_netr_SamInfo2_new,
    4135             : };
    4136             : 
    4137             : 
    4138           0 : static PyObject *py_netr_SidAttr_get_sid(PyObject *obj, void *closure)
    4139             : {
    4140           0 :         struct netr_SidAttr *object = (struct netr_SidAttr *)pytalloc_get_ptr(obj);
    4141             :         PyObject *py_sid;
    4142           0 :         if (object->sid == NULL) {
    4143           0 :                 Py_RETURN_NONE;
    4144             :         }
    4145           0 :         if (object->sid == NULL) {
    4146           0 :                 py_sid = Py_None;
    4147           0 :                 Py_INCREF(py_sid);
    4148             :         } else {
    4149           0 :                 py_sid = pytalloc_reference_ex(dom_sid_Type, object->sid, object->sid);
    4150             :         }
    4151           0 :         return py_sid;
    4152             : }
    4153             : 
    4154           0 : static int py_netr_SidAttr_set_sid(PyObject *py_obj, PyObject *value, void *closure)
    4155             : {
    4156           0 :         struct netr_SidAttr *object = (struct netr_SidAttr *)pytalloc_get_ptr(py_obj);
    4157           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sid));
    4158           0 :         if (value == NULL) {
    4159           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sid");
    4160           0 :                 return -1;
    4161             :         }
    4162           0 :         if (value == Py_None) {
    4163           0 :                 object->sid = NULL;
    4164             :         } else {
    4165           0 :                 object->sid = NULL;
    4166           0 :                 PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
    4167           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4168           0 :                         PyErr_NoMemory();
    4169           0 :                         return -1;
    4170             :                 }
    4171           0 :                 object->sid = (struct dom_sid *)pytalloc_get_ptr(value);
    4172             :         }
    4173           0 :         return 0;
    4174             : }
    4175             : 
    4176           0 : static PyObject *py_netr_SidAttr_get_attributes(PyObject *obj, void *closure)
    4177             : {
    4178           0 :         struct netr_SidAttr *object = (struct netr_SidAttr *)pytalloc_get_ptr(obj);
    4179             :         PyObject *py_attributes;
    4180           0 :         py_attributes = PyLong_FromUnsignedLongLong((uint32_t)object->attributes);
    4181           0 :         return py_attributes;
    4182             : }
    4183             : 
    4184           0 : static int py_netr_SidAttr_set_attributes(PyObject *py_obj, PyObject *value, void *closure)
    4185             : {
    4186           0 :         struct netr_SidAttr *object = (struct netr_SidAttr *)pytalloc_get_ptr(py_obj);
    4187           0 :         if (value == NULL) {
    4188           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attributes");
    4189           0 :                 return -1;
    4190             :         }
    4191             :         {
    4192           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->attributes));
    4193           0 :                 if (PyLong_Check(value)) {
    4194             :                         unsigned long long test_var;
    4195           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4196           0 :                         if (PyErr_Occurred() != NULL) {
    4197           0 :                                 return -1;
    4198             :                         }
    4199           0 :                         if (test_var > uint_max) {
    4200           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    4201             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4202           0 :                                 return -1;
    4203             :                         }
    4204           0 :                         object->attributes = test_var;
    4205             :                 } else {
    4206           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    4207             :                           PyLong_Type.tp_name);
    4208           0 :                         return -1;
    4209             :                 }
    4210             :         }
    4211           0 :         return 0;
    4212             : }
    4213             : 
    4214             : static PyGetSetDef py_netr_SidAttr_getsetters[] = {
    4215             :         {
    4216             :                 .name = discard_const_p(char, "sid"),
    4217             :                 .get = py_netr_SidAttr_get_sid,
    4218             :                 .set = py_netr_SidAttr_set_sid,
    4219             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid2")
    4220             :         },
    4221             :         {
    4222             :                 .name = discard_const_p(char, "attributes"),
    4223             :                 .get = py_netr_SidAttr_get_attributes,
    4224             :                 .set = py_netr_SidAttr_set_attributes,
    4225             :                 .doc = discard_const_p(char, "PIDL-generated element of base type security_GroupAttrs")
    4226             :         },
    4227             :         { .name = NULL }
    4228             : };
    4229             : 
    4230           0 : static PyObject *py_netr_SidAttr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4231             : {
    4232           0 :         return pytalloc_new(struct netr_SidAttr, type);
    4233             : }
    4234             : 
    4235           0 : static PyObject *py_netr_SidAttr_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    4236             : {
    4237           0 :         struct netr_SidAttr *object = (struct netr_SidAttr *)pytalloc_get_ptr(py_obj);
    4238           0 :         PyObject *ret = NULL;
    4239             :         DATA_BLOB blob;
    4240             :         enum ndr_err_code err;
    4241           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    4242           0 :         if (tmp_ctx == NULL) {
    4243           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4244           0 :                 return NULL;
    4245             :         }
    4246           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_SidAttr);
    4247           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4248           0 :                 TALLOC_FREE(tmp_ctx);
    4249           0 :                 PyErr_SetNdrError(err);
    4250           0 :                 return NULL;
    4251             :         }
    4252             : 
    4253           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    4254           0 :         TALLOC_FREE(tmp_ctx);
    4255           0 :         return ret;
    4256             : }
    4257             : 
    4258           0 : static PyObject *py_netr_SidAttr_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4259             : {
    4260           0 :         struct netr_SidAttr *object = (struct netr_SidAttr *)pytalloc_get_ptr(py_obj);
    4261           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    4262           0 :         Py_ssize_t blob_length = 0;
    4263             :         enum ndr_err_code err;
    4264           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    4265           0 :         PyObject *allow_remaining_obj = NULL;
    4266           0 :         bool allow_remaining = false;
    4267             : 
    4268           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    4269             :                 discard_const_p(char *, kwnames),
    4270             :                 &blob.data, &blob_length,
    4271             :                 &allow_remaining_obj)) {
    4272           0 :                 return NULL;
    4273             :         }
    4274           0 :         blob.length = blob_length;
    4275             : 
    4276           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4277           0 :                 allow_remaining = true;
    4278             :         }
    4279             : 
    4280           0 :         if (allow_remaining) {
    4281           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SidAttr);
    4282             :         } else {
    4283           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SidAttr);
    4284             :         }
    4285           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4286           0 :                 PyErr_SetNdrError(err);
    4287           0 :                 return NULL;
    4288             :         }
    4289             : 
    4290           0 :         Py_RETURN_NONE;
    4291             : }
    4292             : 
    4293           0 : static PyObject *py_netr_SidAttr_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    4294             : {
    4295           0 :         struct netr_SidAttr *object = (struct netr_SidAttr *)pytalloc_get_ptr(py_obj);
    4296             :         PyObject *ret;
    4297             :         char *retstr;
    4298             : 
    4299           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_SidAttr, "netr_SidAttr", object);
    4300           0 :         ret = PyUnicode_FromString(retstr);
    4301           0 :         talloc_free(retstr);
    4302             : 
    4303           0 :         return ret;
    4304             : }
    4305             : 
    4306             : static PyMethodDef py_netr_SidAttr_methods[] = {
    4307             :         { "__ndr_pack__", (PyCFunction)py_netr_SidAttr_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    4308             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_SidAttr_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    4309             :         { "__ndr_print__", (PyCFunction)py_netr_SidAttr_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    4310             :         { NULL, NULL, 0, NULL }
    4311             : };
    4312             : 
    4313             : 
    4314             : static PyTypeObject netr_SidAttr_Type = {
    4315             :         PyVarObject_HEAD_INIT(NULL, 0)
    4316             :         .tp_name = "netlogon.netr_SidAttr",
    4317             :         .tp_getset = py_netr_SidAttr_getsetters,
    4318             :         .tp_methods = py_netr_SidAttr_methods,
    4319             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4320             :         .tp_new = py_netr_SidAttr_new,
    4321             : };
    4322             : 
    4323             : 
    4324          12 : static PyObject *py_netr_SamInfo3_get_base(PyObject *obj, void *closure)
    4325             : {
    4326          12 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(obj);
    4327             :         PyObject *py_base;
    4328          12 :         py_base = pytalloc_reference_ex(&netr_SamBaseInfo_Type, pytalloc_get_mem_ctx(obj), &object->base);
    4329          12 :         return py_base;
    4330             : }
    4331             : 
    4332           0 : static int py_netr_SamInfo3_set_base(PyObject *py_obj, PyObject *value, void *closure)
    4333             : {
    4334           0 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(py_obj);
    4335           0 :         if (value == NULL) {
    4336           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->base");
    4337           0 :                 return -1;
    4338             :         }
    4339           0 :         PY_CHECK_TYPE(&netr_SamBaseInfo_Type, value, return -1;);
    4340           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4341           0 :                 PyErr_NoMemory();
    4342           0 :                 return -1;
    4343             :         }
    4344           0 :         object->base = *(struct netr_SamBaseInfo *)pytalloc_get_ptr(value);
    4345           0 :         return 0;
    4346             : }
    4347             : 
    4348           0 : static PyObject *py_netr_SamInfo3_get_sidcount(PyObject *obj, void *closure)
    4349             : {
    4350           0 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(obj);
    4351             :         PyObject *py_sidcount;
    4352           0 :         py_sidcount = PyLong_FromUnsignedLongLong((uint32_t)object->sidcount);
    4353           0 :         return py_sidcount;
    4354             : }
    4355             : 
    4356           0 : static int py_netr_SamInfo3_set_sidcount(PyObject *py_obj, PyObject *value, void *closure)
    4357             : {
    4358           0 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(py_obj);
    4359           0 :         if (value == NULL) {
    4360           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sidcount");
    4361           0 :                 return -1;
    4362             :         }
    4363             :         {
    4364           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sidcount));
    4365           0 :                 if (PyLong_Check(value)) {
    4366             :                         unsigned long long test_var;
    4367           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4368           0 :                         if (PyErr_Occurred() != NULL) {
    4369           0 :                                 return -1;
    4370             :                         }
    4371           0 :                         if (test_var > uint_max) {
    4372           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    4373             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4374           0 :                                 return -1;
    4375             :                         }
    4376           0 :                         object->sidcount = test_var;
    4377             :                 } else {
    4378           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    4379             :                           PyLong_Type.tp_name);
    4380           0 :                         return -1;
    4381             :                 }
    4382             :         }
    4383           0 :         return 0;
    4384             : }
    4385             : 
    4386           0 : static PyObject *py_netr_SamInfo3_get_sids(PyObject *obj, void *closure)
    4387             : {
    4388           0 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(obj);
    4389             :         PyObject *py_sids;
    4390           0 :         if (object->sids == NULL) {
    4391           0 :                 Py_RETURN_NONE;
    4392             :         }
    4393           0 :         if (object->sids == NULL) {
    4394           0 :                 py_sids = Py_None;
    4395           0 :                 Py_INCREF(py_sids);
    4396             :         } else {
    4397           0 :                 py_sids = PyList_New(object->sidcount);
    4398           0 :                 if (py_sids == NULL) {
    4399           0 :                         return NULL;
    4400             :                 }
    4401             :                 {
    4402             :                         int sids_cntr_1;
    4403           0 :                         for (sids_cntr_1 = 0; sids_cntr_1 < (object->sidcount); sids_cntr_1++) {
    4404             :                                 PyObject *py_sids_1;
    4405           0 :                                 py_sids_1 = pytalloc_reference_ex(&netr_SidAttr_Type, object->sids, &object->sids[sids_cntr_1]);
    4406           0 :                                 PyList_SetItem(py_sids, sids_cntr_1, py_sids_1);
    4407             :                         }
    4408             :                 }
    4409             :         }
    4410           0 :         return py_sids;
    4411             : }
    4412             : 
    4413           0 : static int py_netr_SamInfo3_set_sids(PyObject *py_obj, PyObject *value, void *closure)
    4414             : {
    4415           0 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(py_obj);
    4416           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sids));
    4417           0 :         if (value == NULL) {
    4418           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sids");
    4419           0 :                 return -1;
    4420             :         }
    4421           0 :         if (value == Py_None) {
    4422           0 :                 object->sids = NULL;
    4423             :         } else {
    4424           0 :                 object->sids = NULL;
    4425           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4426             :                 {
    4427             :                         int sids_cntr_1;
    4428           0 :                         object->sids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sids, PyList_GET_SIZE(value));
    4429           0 :                         if (!object->sids) { return -1;; }
    4430           0 :                         talloc_set_name_const(object->sids, "ARRAY: object->sids");
    4431           0 :                         for (sids_cntr_1 = 0; sids_cntr_1 < PyList_GET_SIZE(value); sids_cntr_1++) {
    4432           0 :                                 if (PyList_GET_ITEM(value, sids_cntr_1) == NULL) {
    4433           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sids[sids_cntr_1]");
    4434           0 :                                         return -1;
    4435             :                                 }
    4436           0 :                                 PY_CHECK_TYPE(&netr_SidAttr_Type, PyList_GET_ITEM(value, sids_cntr_1), return -1;);
    4437           0 :                                 if (talloc_reference(object->sids, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sids_cntr_1))) == NULL) {
    4438           0 :                                         PyErr_NoMemory();
    4439           0 :                                         return -1;
    4440             :                                 }
    4441           0 :                                 object->sids[sids_cntr_1] = *(struct netr_SidAttr *)pytalloc_get_ptr(PyList_GET_ITEM(value, sids_cntr_1));
    4442             :                         }
    4443             :                 }
    4444             :         }
    4445           0 :         return 0;
    4446             : }
    4447             : 
    4448             : static PyGetSetDef py_netr_SamInfo3_getsetters[] = {
    4449             :         {
    4450             :                 .name = discard_const_p(char, "base"),
    4451             :                 .get = py_netr_SamInfo3_get_base,
    4452             :                 .set = py_netr_SamInfo3_set_base,
    4453             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SamBaseInfo")
    4454             :         },
    4455             :         {
    4456             :                 .name = discard_const_p(char, "sidcount"),
    4457             :                 .get = py_netr_SamInfo3_get_sidcount,
    4458             :                 .set = py_netr_SamInfo3_set_sidcount,
    4459             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4460             :         },
    4461             :         {
    4462             :                 .name = discard_const_p(char, "sids"),
    4463             :                 .get = py_netr_SamInfo3_get_sids,
    4464             :                 .set = py_netr_SamInfo3_set_sids,
    4465             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SidAttr")
    4466             :         },
    4467             :         { .name = NULL }
    4468             : };
    4469             : 
    4470           0 : static PyObject *py_netr_SamInfo3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4471             : {
    4472           0 :         return pytalloc_new(struct netr_SamInfo3, type);
    4473             : }
    4474             : 
    4475           0 : static PyObject *py_netr_SamInfo3_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    4476             : {
    4477           0 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(py_obj);
    4478           0 :         PyObject *ret = NULL;
    4479             :         DATA_BLOB blob;
    4480             :         enum ndr_err_code err;
    4481           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    4482           0 :         if (tmp_ctx == NULL) {
    4483           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4484           0 :                 return NULL;
    4485             :         }
    4486           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_SamInfo3);
    4487           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4488           0 :                 TALLOC_FREE(tmp_ctx);
    4489           0 :                 PyErr_SetNdrError(err);
    4490           0 :                 return NULL;
    4491             :         }
    4492             : 
    4493           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    4494           0 :         TALLOC_FREE(tmp_ctx);
    4495           0 :         return ret;
    4496             : }
    4497             : 
    4498           0 : static PyObject *py_netr_SamInfo3_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4499             : {
    4500           0 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(py_obj);
    4501           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    4502           0 :         Py_ssize_t blob_length = 0;
    4503             :         enum ndr_err_code err;
    4504           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    4505           0 :         PyObject *allow_remaining_obj = NULL;
    4506           0 :         bool allow_remaining = false;
    4507             : 
    4508           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    4509             :                 discard_const_p(char *, kwnames),
    4510             :                 &blob.data, &blob_length,
    4511             :                 &allow_remaining_obj)) {
    4512           0 :                 return NULL;
    4513             :         }
    4514           0 :         blob.length = blob_length;
    4515             : 
    4516           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4517           0 :                 allow_remaining = true;
    4518             :         }
    4519             : 
    4520           0 :         if (allow_remaining) {
    4521           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SamInfo3);
    4522             :         } else {
    4523           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SamInfo3);
    4524             :         }
    4525           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4526           0 :                 PyErr_SetNdrError(err);
    4527           0 :                 return NULL;
    4528             :         }
    4529             : 
    4530           0 :         Py_RETURN_NONE;
    4531             : }
    4532             : 
    4533           0 : static PyObject *py_netr_SamInfo3_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    4534             : {
    4535           0 :         struct netr_SamInfo3 *object = (struct netr_SamInfo3 *)pytalloc_get_ptr(py_obj);
    4536             :         PyObject *ret;
    4537             :         char *retstr;
    4538             : 
    4539           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_SamInfo3, "netr_SamInfo3", object);
    4540           0 :         ret = PyUnicode_FromString(retstr);
    4541           0 :         talloc_free(retstr);
    4542             : 
    4543           0 :         return ret;
    4544             : }
    4545             : 
    4546             : static PyMethodDef py_netr_SamInfo3_methods[] = {
    4547             :         { "__ndr_pack__", (PyCFunction)py_netr_SamInfo3_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    4548             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_SamInfo3_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    4549             :         { "__ndr_print__", (PyCFunction)py_netr_SamInfo3_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    4550             :         { NULL, NULL, 0, NULL }
    4551             : };
    4552             : 
    4553             : 
    4554             : static PyTypeObject netr_SamInfo3_Type = {
    4555             :         PyVarObject_HEAD_INIT(NULL, 0)
    4556             :         .tp_name = "netlogon.netr_SamInfo3",
    4557             :         .tp_getset = py_netr_SamInfo3_getsetters,
    4558             :         .tp_methods = py_netr_SamInfo3_methods,
    4559             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4560             :         .tp_new = py_netr_SamInfo3_new,
    4561             : };
    4562             : 
    4563             : 
    4564           0 : static PyObject *py_netr_SamInfo6_get_base(PyObject *obj, void *closure)
    4565             : {
    4566           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(obj);
    4567             :         PyObject *py_base;
    4568           0 :         py_base = pytalloc_reference_ex(&netr_SamBaseInfo_Type, pytalloc_get_mem_ctx(obj), &object->base);
    4569           0 :         return py_base;
    4570             : }
    4571             : 
    4572           0 : static int py_netr_SamInfo6_set_base(PyObject *py_obj, PyObject *value, void *closure)
    4573             : {
    4574           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(py_obj);
    4575           0 :         if (value == NULL) {
    4576           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->base");
    4577           0 :                 return -1;
    4578             :         }
    4579           0 :         PY_CHECK_TYPE(&netr_SamBaseInfo_Type, value, return -1;);
    4580           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4581           0 :                 PyErr_NoMemory();
    4582           0 :                 return -1;
    4583             :         }
    4584           0 :         object->base = *(struct netr_SamBaseInfo *)pytalloc_get_ptr(value);
    4585           0 :         return 0;
    4586             : }
    4587             : 
    4588           0 : static PyObject *py_netr_SamInfo6_get_sidcount(PyObject *obj, void *closure)
    4589             : {
    4590           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(obj);
    4591             :         PyObject *py_sidcount;
    4592           0 :         py_sidcount = PyLong_FromUnsignedLongLong((uint32_t)object->sidcount);
    4593           0 :         return py_sidcount;
    4594             : }
    4595             : 
    4596           0 : static int py_netr_SamInfo6_set_sidcount(PyObject *py_obj, PyObject *value, void *closure)
    4597             : {
    4598           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(py_obj);
    4599           0 :         if (value == NULL) {
    4600           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sidcount");
    4601           0 :                 return -1;
    4602             :         }
    4603             :         {
    4604           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sidcount));
    4605           0 :                 if (PyLong_Check(value)) {
    4606             :                         unsigned long long test_var;
    4607           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4608           0 :                         if (PyErr_Occurred() != NULL) {
    4609           0 :                                 return -1;
    4610             :                         }
    4611           0 :                         if (test_var > uint_max) {
    4612           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    4613             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4614           0 :                                 return -1;
    4615             :                         }
    4616           0 :                         object->sidcount = test_var;
    4617             :                 } else {
    4618           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    4619             :                           PyLong_Type.tp_name);
    4620           0 :                         return -1;
    4621             :                 }
    4622             :         }
    4623           0 :         return 0;
    4624             : }
    4625             : 
    4626           0 : static PyObject *py_netr_SamInfo6_get_sids(PyObject *obj, void *closure)
    4627             : {
    4628           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(obj);
    4629             :         PyObject *py_sids;
    4630           0 :         if (object->sids == NULL) {
    4631           0 :                 Py_RETURN_NONE;
    4632             :         }
    4633           0 :         if (object->sids == NULL) {
    4634           0 :                 py_sids = Py_None;
    4635           0 :                 Py_INCREF(py_sids);
    4636             :         } else {
    4637           0 :                 py_sids = PyList_New(object->sidcount);
    4638           0 :                 if (py_sids == NULL) {
    4639           0 :                         return NULL;
    4640             :                 }
    4641             :                 {
    4642             :                         int sids_cntr_1;
    4643           0 :                         for (sids_cntr_1 = 0; sids_cntr_1 < (object->sidcount); sids_cntr_1++) {
    4644             :                                 PyObject *py_sids_1;
    4645           0 :                                 py_sids_1 = pytalloc_reference_ex(&netr_SidAttr_Type, object->sids, &object->sids[sids_cntr_1]);
    4646           0 :                                 PyList_SetItem(py_sids, sids_cntr_1, py_sids_1);
    4647             :                         }
    4648             :                 }
    4649             :         }
    4650           0 :         return py_sids;
    4651             : }
    4652             : 
    4653           0 : static int py_netr_SamInfo6_set_sids(PyObject *py_obj, PyObject *value, void *closure)
    4654             : {
    4655           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(py_obj);
    4656           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sids));
    4657           0 :         if (value == NULL) {
    4658           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sids");
    4659           0 :                 return -1;
    4660             :         }
    4661           0 :         if (value == Py_None) {
    4662           0 :                 object->sids = NULL;
    4663             :         } else {
    4664           0 :                 object->sids = NULL;
    4665           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4666             :                 {
    4667             :                         int sids_cntr_1;
    4668           0 :                         object->sids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sids, PyList_GET_SIZE(value));
    4669           0 :                         if (!object->sids) { return -1;; }
    4670           0 :                         talloc_set_name_const(object->sids, "ARRAY: object->sids");
    4671           0 :                         for (sids_cntr_1 = 0; sids_cntr_1 < PyList_GET_SIZE(value); sids_cntr_1++) {
    4672           0 :                                 if (PyList_GET_ITEM(value, sids_cntr_1) == NULL) {
    4673           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sids[sids_cntr_1]");
    4674           0 :                                         return -1;
    4675             :                                 }
    4676           0 :                                 PY_CHECK_TYPE(&netr_SidAttr_Type, PyList_GET_ITEM(value, sids_cntr_1), return -1;);
    4677           0 :                                 if (talloc_reference(object->sids, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sids_cntr_1))) == NULL) {
    4678           0 :                                         PyErr_NoMemory();
    4679           0 :                                         return -1;
    4680             :                                 }
    4681           0 :                                 object->sids[sids_cntr_1] = *(struct netr_SidAttr *)pytalloc_get_ptr(PyList_GET_ITEM(value, sids_cntr_1));
    4682             :                         }
    4683             :                 }
    4684             :         }
    4685           0 :         return 0;
    4686             : }
    4687             : 
    4688           0 : static PyObject *py_netr_SamInfo6_get_dns_domainname(PyObject *obj, void *closure)
    4689             : {
    4690           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(obj);
    4691             :         PyObject *py_dns_domainname;
    4692           0 :         py_dns_domainname = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->dns_domainname);
    4693           0 :         return py_dns_domainname;
    4694             : }
    4695             : 
    4696           0 : static int py_netr_SamInfo6_set_dns_domainname(PyObject *py_obj, PyObject *value, void *closure)
    4697             : {
    4698           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(py_obj);
    4699           0 :         if (value == NULL) {
    4700           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_domainname");
    4701           0 :                 return -1;
    4702             :         }
    4703           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    4704           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4705           0 :                 PyErr_NoMemory();
    4706           0 :                 return -1;
    4707             :         }
    4708           0 :         object->dns_domainname = *(struct lsa_String *)pytalloc_get_ptr(value);
    4709           0 :         return 0;
    4710             : }
    4711             : 
    4712           0 : static PyObject *py_netr_SamInfo6_get_principal_name(PyObject *obj, void *closure)
    4713             : {
    4714           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(obj);
    4715             :         PyObject *py_principal_name;
    4716           0 :         py_principal_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->principal_name);
    4717           0 :         return py_principal_name;
    4718             : }
    4719             : 
    4720           0 : static int py_netr_SamInfo6_set_principal_name(PyObject *py_obj, PyObject *value, void *closure)
    4721             : {
    4722           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(py_obj);
    4723           0 :         if (value == NULL) {
    4724           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->principal_name");
    4725           0 :                 return -1;
    4726             :         }
    4727           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    4728           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4729           0 :                 PyErr_NoMemory();
    4730           0 :                 return -1;
    4731             :         }
    4732           0 :         object->principal_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    4733           0 :         return 0;
    4734             : }
    4735             : 
    4736           0 : static PyObject *py_netr_SamInfo6_get_unknown4(PyObject *obj, void *closure)
    4737             : {
    4738           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(obj);
    4739             :         PyObject *py_unknown4;
    4740           0 :         py_unknown4 = PyList_New(20);
    4741           0 :         if (py_unknown4 == NULL) {
    4742           0 :                 return NULL;
    4743             :         }
    4744             :         {
    4745             :                 int unknown4_cntr_0;
    4746           0 :                 for (unknown4_cntr_0 = 0; unknown4_cntr_0 < (20); unknown4_cntr_0++) {
    4747             :                         PyObject *py_unknown4_0;
    4748           0 :                         py_unknown4_0 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown4[unknown4_cntr_0]);
    4749           0 :                         PyList_SetItem(py_unknown4, unknown4_cntr_0, py_unknown4_0);
    4750             :                 }
    4751             :         }
    4752           0 :         return py_unknown4;
    4753             : }
    4754             : 
    4755           0 : static int py_netr_SamInfo6_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
    4756             : {
    4757           0 :         struct netr_SamInfo6 *object = (struct netr_SamInfo6 *)pytalloc_get_ptr(py_obj);
    4758           0 :         if (value == NULL) {
    4759           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
    4760           0 :                 return -1;
    4761             :         }
    4762           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4763             :         {
    4764             :                 int unknown4_cntr_0;
    4765           0 :                 if (ARRAY_SIZE(object->unknown4) != PyList_GET_SIZE(value)) {
    4766           0 :                         PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->unknown4),  PyList_GET_SIZE(value));
    4767           0 :                         return -1;
    4768             :                 }
    4769           0 :                 for (unknown4_cntr_0 = 0; unknown4_cntr_0 < PyList_GET_SIZE(value); unknown4_cntr_0++) {
    4770           0 :                         if (PyList_GET_ITEM(value, unknown4_cntr_0) == NULL) {
    4771           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4[unknown4_cntr_0]");
    4772           0 :                                 return -1;
    4773             :                         }
    4774             :                         {
    4775           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown4[unknown4_cntr_0]));
    4776           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, unknown4_cntr_0))) {
    4777             :                                         unsigned long long test_var;
    4778           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, unknown4_cntr_0));
    4779           0 :                                         if (PyErr_Occurred() != NULL) {
    4780           0 :                                                 return -1;
    4781             :                                         }
    4782           0 :                                         if (test_var > uint_max) {
    4783           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    4784             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    4785           0 :                                                 return -1;
    4786             :                                         }
    4787           0 :                                         object->unknown4[unknown4_cntr_0] = test_var;
    4788             :                                 } else {
    4789           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    4790             :                                           PyLong_Type.tp_name);
    4791           0 :                                         return -1;
    4792             :                                 }
    4793             :                         }
    4794             :                 }
    4795             :         }
    4796           0 :         return 0;
    4797             : }
    4798             : 
    4799             : static PyGetSetDef py_netr_SamInfo6_getsetters[] = {
    4800             :         {
    4801             :                 .name = discard_const_p(char, "base"),
    4802             :                 .get = py_netr_SamInfo6_get_base,
    4803             :                 .set = py_netr_SamInfo6_set_base,
    4804             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SamBaseInfo")
    4805             :         },
    4806             :         {
    4807             :                 .name = discard_const_p(char, "sidcount"),
    4808             :                 .get = py_netr_SamInfo6_get_sidcount,
    4809             :                 .set = py_netr_SamInfo6_set_sidcount,
    4810             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4811             :         },
    4812             :         {
    4813             :                 .name = discard_const_p(char, "sids"),
    4814             :                 .get = py_netr_SamInfo6_get_sids,
    4815             :                 .set = py_netr_SamInfo6_set_sids,
    4816             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SidAttr")
    4817             :         },
    4818             :         {
    4819             :                 .name = discard_const_p(char, "dns_domainname"),
    4820             :                 .get = py_netr_SamInfo6_get_dns_domainname,
    4821             :                 .set = py_netr_SamInfo6_set_dns_domainname,
    4822             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    4823             :         },
    4824             :         {
    4825             :                 .name = discard_const_p(char, "principal_name"),
    4826             :                 .get = py_netr_SamInfo6_get_principal_name,
    4827             :                 .set = py_netr_SamInfo6_set_principal_name,
    4828             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    4829             :         },
    4830             :         {
    4831             :                 .name = discard_const_p(char, "unknown4"),
    4832             :                 .get = py_netr_SamInfo6_get_unknown4,
    4833             :                 .set = py_netr_SamInfo6_set_unknown4,
    4834             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4835             :         },
    4836             :         { .name = NULL }
    4837             : };
    4838             : 
    4839           0 : static PyObject *py_netr_SamInfo6_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4840             : {
    4841           0 :         return pytalloc_new(struct netr_SamInfo6, type);
    4842             : }
    4843             : 
    4844             : 
    4845             : static PyTypeObject netr_SamInfo6_Type = {
    4846             :         PyVarObject_HEAD_INIT(NULL, 0)
    4847             :         .tp_name = "netlogon.netr_SamInfo6",
    4848             :         .tp_getset = py_netr_SamInfo6_getsetters,
    4849             :         .tp_methods = NULL,
    4850             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4851             :         .tp_new = py_netr_SamInfo6_new,
    4852             : };
    4853             : 
    4854             : 
    4855           0 : static PyObject *py_netr_PacInfo_get_pac_size(PyObject *obj, void *closure)
    4856             : {
    4857           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    4858             :         PyObject *py_pac_size;
    4859           0 :         py_pac_size = PyLong_FromUnsignedLongLong((uint32_t)object->pac_size);
    4860           0 :         return py_pac_size;
    4861             : }
    4862             : 
    4863           0 : static int py_netr_PacInfo_set_pac_size(PyObject *py_obj, PyObject *value, void *closure)
    4864             : {
    4865           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    4866           0 :         if (value == NULL) {
    4867           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pac_size");
    4868           0 :                 return -1;
    4869             :         }
    4870             :         {
    4871           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pac_size));
    4872           0 :                 if (PyLong_Check(value)) {
    4873             :                         unsigned long long test_var;
    4874           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4875           0 :                         if (PyErr_Occurred() != NULL) {
    4876           0 :                                 return -1;
    4877             :                         }
    4878           0 :                         if (test_var > uint_max) {
    4879           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    4880             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4881           0 :                                 return -1;
    4882             :                         }
    4883           0 :                         object->pac_size = test_var;
    4884             :                 } else {
    4885           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    4886             :                           PyLong_Type.tp_name);
    4887           0 :                         return -1;
    4888             :                 }
    4889             :         }
    4890           0 :         return 0;
    4891             : }
    4892             : 
    4893           0 : static PyObject *py_netr_PacInfo_get_pac(PyObject *obj, void *closure)
    4894             : {
    4895           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    4896             :         PyObject *py_pac;
    4897           0 :         if (object->pac == NULL) {
    4898           0 :                 Py_RETURN_NONE;
    4899             :         }
    4900           0 :         if (object->pac == NULL) {
    4901           0 :                 py_pac = Py_None;
    4902           0 :                 Py_INCREF(py_pac);
    4903             :         } else {
    4904           0 :                 py_pac = PyList_New(object->pac_size);
    4905           0 :                 if (py_pac == NULL) {
    4906           0 :                         return NULL;
    4907             :                 }
    4908             :                 {
    4909             :                         int pac_cntr_1;
    4910           0 :                         for (pac_cntr_1 = 0; pac_cntr_1 < (object->pac_size); pac_cntr_1++) {
    4911             :                                 PyObject *py_pac_1;
    4912           0 :                                 py_pac_1 = PyLong_FromLong((uint16_t)object->pac[pac_cntr_1]);
    4913           0 :                                 PyList_SetItem(py_pac, pac_cntr_1, py_pac_1);
    4914             :                         }
    4915             :                 }
    4916             :         }
    4917           0 :         return py_pac;
    4918             : }
    4919             : 
    4920           0 : static int py_netr_PacInfo_set_pac(PyObject *py_obj, PyObject *value, void *closure)
    4921             : {
    4922           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    4923           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->pac));
    4924           0 :         if (value == NULL) {
    4925           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pac");
    4926           0 :                 return -1;
    4927             :         }
    4928           0 :         if (value == Py_None) {
    4929           0 :                 object->pac = NULL;
    4930             :         } else {
    4931           0 :                 object->pac = NULL;
    4932           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4933             :                 {
    4934             :                         int pac_cntr_1;
    4935           0 :                         object->pac = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->pac, PyList_GET_SIZE(value));
    4936           0 :                         if (!object->pac) { return -1;; }
    4937           0 :                         talloc_set_name_const(object->pac, "ARRAY: object->pac");
    4938           0 :                         for (pac_cntr_1 = 0; pac_cntr_1 < PyList_GET_SIZE(value); pac_cntr_1++) {
    4939           0 :                                 if (PyList_GET_ITEM(value, pac_cntr_1) == NULL) {
    4940           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pac[pac_cntr_1]");
    4941           0 :                                         return -1;
    4942             :                                 }
    4943             :                                 {
    4944           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pac[pac_cntr_1]));
    4945           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, pac_cntr_1))) {
    4946             :                                                 unsigned long long test_var;
    4947           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, pac_cntr_1));
    4948           0 :                                                 if (PyErr_Occurred() != NULL) {
    4949           0 :                                                         return -1;
    4950             :                                                 }
    4951           0 :                                                 if (test_var > uint_max) {
    4952           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    4953             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    4954           0 :                                                         return -1;
    4955             :                                                 }
    4956           0 :                                                 object->pac[pac_cntr_1] = test_var;
    4957             :                                         } else {
    4958           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",\
    4959             :                                                   PyLong_Type.tp_name);
    4960           0 :                                                 return -1;
    4961             :                                         }
    4962             :                                 }
    4963             :                         }
    4964             :                 }
    4965             :         }
    4966           0 :         return 0;
    4967             : }
    4968             : 
    4969           0 : static PyObject *py_netr_PacInfo_get_logon_domain(PyObject *obj, void *closure)
    4970             : {
    4971           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    4972             :         PyObject *py_logon_domain;
    4973           0 :         py_logon_domain = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->logon_domain);
    4974           0 :         return py_logon_domain;
    4975             : }
    4976             : 
    4977           0 : static int py_netr_PacInfo_set_logon_domain(PyObject *py_obj, PyObject *value, void *closure)
    4978             : {
    4979           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    4980           0 :         if (value == NULL) {
    4981           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_domain");
    4982           0 :                 return -1;
    4983             :         }
    4984           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    4985           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4986           0 :                 PyErr_NoMemory();
    4987           0 :                 return -1;
    4988             :         }
    4989           0 :         object->logon_domain = *(struct lsa_String *)pytalloc_get_ptr(value);
    4990           0 :         return 0;
    4991             : }
    4992             : 
    4993           0 : static PyObject *py_netr_PacInfo_get_logon_server(PyObject *obj, void *closure)
    4994             : {
    4995           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    4996             :         PyObject *py_logon_server;
    4997           0 :         py_logon_server = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->logon_server);
    4998           0 :         return py_logon_server;
    4999             : }
    5000             : 
    5001           0 : static int py_netr_PacInfo_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
    5002             : {
    5003           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5004           0 :         if (value == NULL) {
    5005           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_server");
    5006           0 :                 return -1;
    5007             :         }
    5008           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    5009           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5010           0 :                 PyErr_NoMemory();
    5011           0 :                 return -1;
    5012             :         }
    5013           0 :         object->logon_server = *(struct lsa_String *)pytalloc_get_ptr(value);
    5014           0 :         return 0;
    5015             : }
    5016             : 
    5017           0 : static PyObject *py_netr_PacInfo_get_principal_name(PyObject *obj, void *closure)
    5018             : {
    5019           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5020             :         PyObject *py_principal_name;
    5021           0 :         py_principal_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->principal_name);
    5022           0 :         return py_principal_name;
    5023             : }
    5024             : 
    5025           0 : static int py_netr_PacInfo_set_principal_name(PyObject *py_obj, PyObject *value, void *closure)
    5026             : {
    5027           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5028           0 :         if (value == NULL) {
    5029           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->principal_name");
    5030           0 :                 return -1;
    5031             :         }
    5032           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    5033           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5034           0 :                 PyErr_NoMemory();
    5035           0 :                 return -1;
    5036             :         }
    5037           0 :         object->principal_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    5038           0 :         return 0;
    5039             : }
    5040             : 
    5041           0 : static PyObject *py_netr_PacInfo_get_auth_size(PyObject *obj, void *closure)
    5042             : {
    5043           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5044             :         PyObject *py_auth_size;
    5045           0 :         py_auth_size = PyLong_FromUnsignedLongLong((uint32_t)object->auth_size);
    5046           0 :         return py_auth_size;
    5047             : }
    5048             : 
    5049           0 : static int py_netr_PacInfo_set_auth_size(PyObject *py_obj, PyObject *value, void *closure)
    5050             : {
    5051           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5052           0 :         if (value == NULL) {
    5053           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auth_size");
    5054           0 :                 return -1;
    5055             :         }
    5056             :         {
    5057           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auth_size));
    5058           0 :                 if (PyLong_Check(value)) {
    5059             :                         unsigned long long test_var;
    5060           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5061           0 :                         if (PyErr_Occurred() != NULL) {
    5062           0 :                                 return -1;
    5063             :                         }
    5064           0 :                         if (test_var > uint_max) {
    5065           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    5066             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5067           0 :                                 return -1;
    5068             :                         }
    5069           0 :                         object->auth_size = test_var;
    5070             :                 } else {
    5071           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    5072             :                           PyLong_Type.tp_name);
    5073           0 :                         return -1;
    5074             :                 }
    5075             :         }
    5076           0 :         return 0;
    5077             : }
    5078             : 
    5079           0 : static PyObject *py_netr_PacInfo_get_auth(PyObject *obj, void *closure)
    5080             : {
    5081           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5082             :         PyObject *py_auth;
    5083           0 :         if (object->auth == NULL) {
    5084           0 :                 Py_RETURN_NONE;
    5085             :         }
    5086           0 :         if (object->auth == NULL) {
    5087           0 :                 py_auth = Py_None;
    5088           0 :                 Py_INCREF(py_auth);
    5089             :         } else {
    5090           0 :                 py_auth = PyList_New(object->auth_size);
    5091           0 :                 if (py_auth == NULL) {
    5092           0 :                         return NULL;
    5093             :                 }
    5094             :                 {
    5095             :                         int auth_cntr_1;
    5096           0 :                         for (auth_cntr_1 = 0; auth_cntr_1 < (object->auth_size); auth_cntr_1++) {
    5097             :                                 PyObject *py_auth_1;
    5098           0 :                                 py_auth_1 = PyLong_FromLong((uint16_t)object->auth[auth_cntr_1]);
    5099           0 :                                 PyList_SetItem(py_auth, auth_cntr_1, py_auth_1);
    5100             :                         }
    5101             :                 }
    5102             :         }
    5103           0 :         return py_auth;
    5104             : }
    5105             : 
    5106           0 : static int py_netr_PacInfo_set_auth(PyObject *py_obj, PyObject *value, void *closure)
    5107             : {
    5108           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5109           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->auth));
    5110           0 :         if (value == NULL) {
    5111           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auth");
    5112           0 :                 return -1;
    5113             :         }
    5114           0 :         if (value == Py_None) {
    5115           0 :                 object->auth = NULL;
    5116             :         } else {
    5117           0 :                 object->auth = NULL;
    5118           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5119             :                 {
    5120             :                         int auth_cntr_1;
    5121           0 :                         object->auth = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->auth, PyList_GET_SIZE(value));
    5122           0 :                         if (!object->auth) { return -1;; }
    5123           0 :                         talloc_set_name_const(object->auth, "ARRAY: object->auth");
    5124           0 :                         for (auth_cntr_1 = 0; auth_cntr_1 < PyList_GET_SIZE(value); auth_cntr_1++) {
    5125           0 :                                 if (PyList_GET_ITEM(value, auth_cntr_1) == NULL) {
    5126           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auth[auth_cntr_1]");
    5127           0 :                                         return -1;
    5128             :                                 }
    5129             :                                 {
    5130           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auth[auth_cntr_1]));
    5131           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, auth_cntr_1))) {
    5132             :                                                 unsigned long long test_var;
    5133           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, auth_cntr_1));
    5134           0 :                                                 if (PyErr_Occurred() != NULL) {
    5135           0 :                                                         return -1;
    5136             :                                                 }
    5137           0 :                                                 if (test_var > uint_max) {
    5138           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    5139             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    5140           0 :                                                         return -1;
    5141             :                                                 }
    5142           0 :                                                 object->auth[auth_cntr_1] = test_var;
    5143             :                                         } else {
    5144           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",\
    5145             :                                                   PyLong_Type.tp_name);
    5146           0 :                                                 return -1;
    5147             :                                         }
    5148             :                                 }
    5149             :                         }
    5150             :                 }
    5151             :         }
    5152           0 :         return 0;
    5153             : }
    5154             : 
    5155           0 : static PyObject *py_netr_PacInfo_get_user_session_key(PyObject *obj, void *closure)
    5156             : {
    5157           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5158             :         PyObject *py_user_session_key;
    5159           0 :         py_user_session_key = pytalloc_reference_ex(&netr_UserSessionKey_Type, pytalloc_get_mem_ctx(obj), &object->user_session_key);
    5160           0 :         return py_user_session_key;
    5161             : }
    5162             : 
    5163           0 : static int py_netr_PacInfo_set_user_session_key(PyObject *py_obj, PyObject *value, void *closure)
    5164             : {
    5165           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5166           0 :         if (value == NULL) {
    5167           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user_session_key");
    5168           0 :                 return -1;
    5169             :         }
    5170           0 :         PY_CHECK_TYPE(&netr_UserSessionKey_Type, value, return -1;);
    5171           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5172           0 :                 PyErr_NoMemory();
    5173           0 :                 return -1;
    5174             :         }
    5175           0 :         object->user_session_key = *(struct netr_UserSessionKey *)pytalloc_get_ptr(value);
    5176           0 :         return 0;
    5177             : }
    5178             : 
    5179           0 : static PyObject *py_netr_PacInfo_get_expansionroom(PyObject *obj, void *closure)
    5180             : {
    5181           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5182             :         PyObject *py_expansionroom;
    5183           0 :         py_expansionroom = PyList_New(10);
    5184           0 :         if (py_expansionroom == NULL) {
    5185           0 :                 return NULL;
    5186             :         }
    5187             :         {
    5188             :                 int expansionroom_cntr_0;
    5189           0 :                 for (expansionroom_cntr_0 = 0; expansionroom_cntr_0 < (10); expansionroom_cntr_0++) {
    5190             :                         PyObject *py_expansionroom_0;
    5191           0 :                         py_expansionroom_0 = PyLong_FromUnsignedLongLong((uint32_t)object->expansionroom[expansionroom_cntr_0]);
    5192           0 :                         PyList_SetItem(py_expansionroom, expansionroom_cntr_0, py_expansionroom_0);
    5193             :                 }
    5194             :         }
    5195           0 :         return py_expansionroom;
    5196             : }
    5197             : 
    5198           0 : static int py_netr_PacInfo_set_expansionroom(PyObject *py_obj, PyObject *value, void *closure)
    5199             : {
    5200           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5201           0 :         if (value == NULL) {
    5202           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->expansionroom");
    5203           0 :                 return -1;
    5204             :         }
    5205           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5206             :         {
    5207             :                 int expansionroom_cntr_0;
    5208           0 :                 if (ARRAY_SIZE(object->expansionroom) != PyList_GET_SIZE(value)) {
    5209           0 :                         PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->expansionroom),  PyList_GET_SIZE(value));
    5210           0 :                         return -1;
    5211             :                 }
    5212           0 :                 for (expansionroom_cntr_0 = 0; expansionroom_cntr_0 < PyList_GET_SIZE(value); expansionroom_cntr_0++) {
    5213           0 :                         if (PyList_GET_ITEM(value, expansionroom_cntr_0) == NULL) {
    5214           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->expansionroom[expansionroom_cntr_0]");
    5215           0 :                                 return -1;
    5216             :                         }
    5217             :                         {
    5218           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->expansionroom[expansionroom_cntr_0]));
    5219           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, expansionroom_cntr_0))) {
    5220             :                                         unsigned long long test_var;
    5221           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, expansionroom_cntr_0));
    5222           0 :                                         if (PyErr_Occurred() != NULL) {
    5223           0 :                                                 return -1;
    5224             :                                         }
    5225           0 :                                         if (test_var > uint_max) {
    5226           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    5227             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    5228           0 :                                                 return -1;
    5229             :                                         }
    5230           0 :                                         object->expansionroom[expansionroom_cntr_0] = test_var;
    5231             :                                 } else {
    5232           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    5233             :                                           PyLong_Type.tp_name);
    5234           0 :                                         return -1;
    5235             :                                 }
    5236             :                         }
    5237             :                 }
    5238             :         }
    5239           0 :         return 0;
    5240             : }
    5241             : 
    5242           0 : static PyObject *py_netr_PacInfo_get_unknown1(PyObject *obj, void *closure)
    5243             : {
    5244           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5245             :         PyObject *py_unknown1;
    5246           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
    5247           0 :         return py_unknown1;
    5248             : }
    5249             : 
    5250           0 : static int py_netr_PacInfo_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
    5251             : {
    5252           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5253           0 :         if (value == NULL) {
    5254           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
    5255           0 :                 return -1;
    5256             :         }
    5257           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    5258           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5259           0 :                 PyErr_NoMemory();
    5260           0 :                 return -1;
    5261             :         }
    5262           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
    5263           0 :         return 0;
    5264             : }
    5265             : 
    5266           0 : static PyObject *py_netr_PacInfo_get_unknown2(PyObject *obj, void *closure)
    5267             : {
    5268           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5269             :         PyObject *py_unknown2;
    5270           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
    5271           0 :         return py_unknown2;
    5272             : }
    5273             : 
    5274           0 : static int py_netr_PacInfo_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
    5275             : {
    5276           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5277           0 :         if (value == NULL) {
    5278           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
    5279           0 :                 return -1;
    5280             :         }
    5281           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    5282           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5283           0 :                 PyErr_NoMemory();
    5284           0 :                 return -1;
    5285             :         }
    5286           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
    5287           0 :         return 0;
    5288             : }
    5289             : 
    5290           0 : static PyObject *py_netr_PacInfo_get_unknown3(PyObject *obj, void *closure)
    5291             : {
    5292           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5293             :         PyObject *py_unknown3;
    5294           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
    5295           0 :         return py_unknown3;
    5296             : }
    5297             : 
    5298           0 : static int py_netr_PacInfo_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
    5299             : {
    5300           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5301           0 :         if (value == NULL) {
    5302           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
    5303           0 :                 return -1;
    5304             :         }
    5305           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    5306           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5307           0 :                 PyErr_NoMemory();
    5308           0 :                 return -1;
    5309             :         }
    5310           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
    5311           0 :         return 0;
    5312             : }
    5313             : 
    5314           0 : static PyObject *py_netr_PacInfo_get_unknown4(PyObject *obj, void *closure)
    5315             : {
    5316           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(obj);
    5317             :         PyObject *py_unknown4;
    5318           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
    5319           0 :         return py_unknown4;
    5320             : }
    5321             : 
    5322           0 : static int py_netr_PacInfo_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
    5323             : {
    5324           0 :         struct netr_PacInfo *object = (struct netr_PacInfo *)pytalloc_get_ptr(py_obj);
    5325           0 :         if (value == NULL) {
    5326           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
    5327           0 :                 return -1;
    5328             :         }
    5329           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    5330           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5331           0 :                 PyErr_NoMemory();
    5332           0 :                 return -1;
    5333             :         }
    5334           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
    5335           0 :         return 0;
    5336             : }
    5337             : 
    5338             : static PyGetSetDef py_netr_PacInfo_getsetters[] = {
    5339             :         {
    5340             :                 .name = discard_const_p(char, "pac_size"),
    5341             :                 .get = py_netr_PacInfo_get_pac_size,
    5342             :                 .set = py_netr_PacInfo_set_pac_size,
    5343             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5344             :         },
    5345             :         {
    5346             :                 .name = discard_const_p(char, "pac"),
    5347             :                 .get = py_netr_PacInfo_get_pac,
    5348             :                 .set = py_netr_PacInfo_set_pac,
    5349             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    5350             :         },
    5351             :         {
    5352             :                 .name = discard_const_p(char, "logon_domain"),
    5353             :                 .get = py_netr_PacInfo_get_logon_domain,
    5354             :                 .set = py_netr_PacInfo_set_logon_domain,
    5355             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5356             :         },
    5357             :         {
    5358             :                 .name = discard_const_p(char, "logon_server"),
    5359             :                 .get = py_netr_PacInfo_get_logon_server,
    5360             :                 .set = py_netr_PacInfo_set_logon_server,
    5361             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5362             :         },
    5363             :         {
    5364             :                 .name = discard_const_p(char, "principal_name"),
    5365             :                 .get = py_netr_PacInfo_get_principal_name,
    5366             :                 .set = py_netr_PacInfo_set_principal_name,
    5367             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5368             :         },
    5369             :         {
    5370             :                 .name = discard_const_p(char, "auth_size"),
    5371             :                 .get = py_netr_PacInfo_get_auth_size,
    5372             :                 .set = py_netr_PacInfo_set_auth_size,
    5373             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5374             :         },
    5375             :         {
    5376             :                 .name = discard_const_p(char, "auth"),
    5377             :                 .get = py_netr_PacInfo_get_auth,
    5378             :                 .set = py_netr_PacInfo_set_auth,
    5379             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    5380             :         },
    5381             :         {
    5382             :                 .name = discard_const_p(char, "user_session_key"),
    5383             :                 .get = py_netr_PacInfo_get_user_session_key,
    5384             :                 .set = py_netr_PacInfo_set_user_session_key,
    5385             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UserSessionKey")
    5386             :         },
    5387             :         {
    5388             :                 .name = discard_const_p(char, "expansionroom"),
    5389             :                 .get = py_netr_PacInfo_get_expansionroom,
    5390             :                 .set = py_netr_PacInfo_set_expansionroom,
    5391             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5392             :         },
    5393             :         {
    5394             :                 .name = discard_const_p(char, "unknown1"),
    5395             :                 .get = py_netr_PacInfo_get_unknown1,
    5396             :                 .set = py_netr_PacInfo_set_unknown1,
    5397             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5398             :         },
    5399             :         {
    5400             :                 .name = discard_const_p(char, "unknown2"),
    5401             :                 .get = py_netr_PacInfo_get_unknown2,
    5402             :                 .set = py_netr_PacInfo_set_unknown2,
    5403             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5404             :         },
    5405             :         {
    5406             :                 .name = discard_const_p(char, "unknown3"),
    5407             :                 .get = py_netr_PacInfo_get_unknown3,
    5408             :                 .set = py_netr_PacInfo_set_unknown3,
    5409             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5410             :         },
    5411             :         {
    5412             :                 .name = discard_const_p(char, "unknown4"),
    5413             :                 .get = py_netr_PacInfo_get_unknown4,
    5414             :                 .set = py_netr_PacInfo_set_unknown4,
    5415             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    5416             :         },
    5417             :         { .name = NULL }
    5418             : };
    5419             : 
    5420           0 : static PyObject *py_netr_PacInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5421             : {
    5422           0 :         return pytalloc_new(struct netr_PacInfo, type);
    5423             : }
    5424             : 
    5425             : 
    5426             : static PyTypeObject netr_PacInfo_Type = {
    5427             :         PyVarObject_HEAD_INIT(NULL, 0)
    5428             :         .tp_name = "netlogon.netr_PacInfo",
    5429             :         .tp_getset = py_netr_PacInfo_getsetters,
    5430             :         .tp_methods = NULL,
    5431             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5432             :         .tp_new = py_netr_PacInfo_new,
    5433             : };
    5434             : 
    5435             : 
    5436           0 : static PyObject *py_netr_GenericInfo2_get_length(PyObject *obj, void *closure)
    5437             : {
    5438           0 :         struct netr_GenericInfo2 *object = (struct netr_GenericInfo2 *)pytalloc_get_ptr(obj);
    5439             :         PyObject *py_length;
    5440           0 :         py_length = PyLong_FromUnsignedLongLong((uint32_t)object->length);
    5441           0 :         return py_length;
    5442             : }
    5443             : 
    5444           0 : static int py_netr_GenericInfo2_set_length(PyObject *py_obj, PyObject *value, void *closure)
    5445             : {
    5446           0 :         struct netr_GenericInfo2 *object = (struct netr_GenericInfo2 *)pytalloc_get_ptr(py_obj);
    5447           0 :         if (value == NULL) {
    5448           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
    5449           0 :                 return -1;
    5450             :         }
    5451             :         {
    5452           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
    5453           0 :                 if (PyLong_Check(value)) {
    5454             :                         unsigned long long test_var;
    5455           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5456           0 :                         if (PyErr_Occurred() != NULL) {
    5457           0 :                                 return -1;
    5458             :                         }
    5459           0 :                         if (test_var > uint_max) {
    5460           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    5461             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5462           0 :                                 return -1;
    5463             :                         }
    5464           0 :                         object->length = test_var;
    5465             :                 } else {
    5466           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    5467             :                           PyLong_Type.tp_name);
    5468           0 :                         return -1;
    5469             :                 }
    5470             :         }
    5471           0 :         return 0;
    5472             : }
    5473             : 
    5474           0 : static PyObject *py_netr_GenericInfo2_get_data(PyObject *obj, void *closure)
    5475             : {
    5476           0 :         struct netr_GenericInfo2 *object = (struct netr_GenericInfo2 *)pytalloc_get_ptr(obj);
    5477             :         PyObject *py_data;
    5478           0 :         if (object->data == NULL) {
    5479           0 :                 Py_RETURN_NONE;
    5480             :         }
    5481           0 :         if (object->data == NULL) {
    5482           0 :                 py_data = Py_None;
    5483           0 :                 Py_INCREF(py_data);
    5484             :         } else {
    5485           0 :                 py_data = PyList_New(object->length);
    5486           0 :                 if (py_data == NULL) {
    5487           0 :                         return NULL;
    5488             :                 }
    5489             :                 {
    5490             :                         int data_cntr_1;
    5491           0 :                         for (data_cntr_1 = 0; data_cntr_1 < (object->length); data_cntr_1++) {
    5492             :                                 PyObject *py_data_1;
    5493           0 :                                 py_data_1 = PyLong_FromLong((uint16_t)object->data[data_cntr_1]);
    5494           0 :                                 PyList_SetItem(py_data, data_cntr_1, py_data_1);
    5495             :                         }
    5496             :                 }
    5497             :         }
    5498           0 :         return py_data;
    5499             : }
    5500             : 
    5501           0 : static int py_netr_GenericInfo2_set_data(PyObject *py_obj, PyObject *value, void *closure)
    5502             : {
    5503           0 :         struct netr_GenericInfo2 *object = (struct netr_GenericInfo2 *)pytalloc_get_ptr(py_obj);
    5504           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->data));
    5505           0 :         if (value == NULL) {
    5506           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data");
    5507           0 :                 return -1;
    5508             :         }
    5509           0 :         if (value == Py_None) {
    5510           0 :                 object->data = NULL;
    5511             :         } else {
    5512           0 :                 object->data = NULL;
    5513           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5514             :                 {
    5515             :                         int data_cntr_1;
    5516           0 :                         object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
    5517           0 :                         if (!object->data) { return -1;; }
    5518           0 :                         talloc_set_name_const(object->data, "ARRAY: object->data");
    5519           0 :                         for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
    5520           0 :                                 if (PyList_GET_ITEM(value, data_cntr_1) == NULL) {
    5521           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data[data_cntr_1]");
    5522           0 :                                         return -1;
    5523             :                                 }
    5524             :                                 {
    5525           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->data[data_cntr_1]));
    5526           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_1))) {
    5527             :                                                 unsigned long long test_var;
    5528           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_1));
    5529           0 :                                                 if (PyErr_Occurred() != NULL) {
    5530           0 :                                                         return -1;
    5531             :                                                 }
    5532           0 :                                                 if (test_var > uint_max) {
    5533           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    5534             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    5535           0 :                                                         return -1;
    5536             :                                                 }
    5537           0 :                                                 object->data[data_cntr_1] = test_var;
    5538             :                                         } else {
    5539           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",\
    5540             :                                                   PyLong_Type.tp_name);
    5541           0 :                                                 return -1;
    5542             :                                         }
    5543             :                                 }
    5544             :                         }
    5545             :                 }
    5546             :         }
    5547           0 :         return 0;
    5548             : }
    5549             : 
    5550             : static PyGetSetDef py_netr_GenericInfo2_getsetters[] = {
    5551             :         {
    5552             :                 .name = discard_const_p(char, "length"),
    5553             :                 .get = py_netr_GenericInfo2_get_length,
    5554             :                 .set = py_netr_GenericInfo2_set_length,
    5555             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5556             :         },
    5557             :         {
    5558             :                 .name = discard_const_p(char, "data"),
    5559             :                 .get = py_netr_GenericInfo2_get_data,
    5560             :                 .set = py_netr_GenericInfo2_set_data,
    5561             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    5562             :         },
    5563             :         { .name = NULL }
    5564             : };
    5565             : 
    5566           0 : static PyObject *py_netr_GenericInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5567             : {
    5568           0 :         return pytalloc_new(struct netr_GenericInfo2, type);
    5569             : }
    5570             : 
    5571             : 
    5572             : static PyTypeObject netr_GenericInfo2_Type = {
    5573             :         PyVarObject_HEAD_INIT(NULL, 0)
    5574             :         .tp_name = "netlogon.netr_GenericInfo2",
    5575             :         .tp_getset = py_netr_GenericInfo2_getsetters,
    5576             :         .tp_methods = NULL,
    5577             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5578             :         .tp_new = py_netr_GenericInfo2_new,
    5579             : };
    5580             : 
    5581          19 : static PyObject *py_import_netr_Validation(TALLOC_CTX *mem_ctx, int level, union netr_Validation *in)
    5582             : {
    5583             :         PyObject *ret;
    5584             : 
    5585          19 :         switch (level) {
    5586           0 :                 case NetlogonValidationSamInfo:
    5587           0 :                         if (in->sam2 == NULL) {
    5588           0 :                                 ret = Py_None;
    5589           0 :                                 Py_INCREF(ret);
    5590             :                         } else {
    5591           0 :                                 ret = pytalloc_reference_ex(&netr_SamInfo2_Type, in->sam2, in->sam2);
    5592             :                         }
    5593           0 :                         return ret;
    5594             : 
    5595           0 :                 case NetlogonValidationSamInfo2:
    5596           0 :                         if (in->sam3 == NULL) {
    5597           0 :                                 ret = Py_None;
    5598           0 :                                 Py_INCREF(ret);
    5599             :                         } else {
    5600           0 :                                 ret = pytalloc_reference_ex(&netr_SamInfo3_Type, in->sam3, in->sam3);
    5601             :                         }
    5602           0 :                         return ret;
    5603             : 
    5604           0 :                 case 4:
    5605           0 :                         if (in->pac == NULL) {
    5606           0 :                                 ret = Py_None;
    5607           0 :                                 Py_INCREF(ret);
    5608             :                         } else {
    5609           0 :                                 ret = pytalloc_reference_ex(&netr_PacInfo_Type, in->pac, in->pac);
    5610             :                         }
    5611           0 :                         return ret;
    5612             : 
    5613           0 :                 case NetlogonValidationGenericInfo2:
    5614           0 :                         if (in->generic == NULL) {
    5615           0 :                                 ret = Py_None;
    5616           0 :                                 Py_INCREF(ret);
    5617             :                         } else {
    5618           0 :                                 ret = pytalloc_reference_ex(&netr_GenericInfo2_Type, in->generic, in->generic);
    5619             :                         }
    5620           0 :                         return ret;
    5621             : 
    5622          19 :                 case NetlogonValidationSamInfo4:
    5623          19 :                         if (in->sam6 == NULL) {
    5624           3 :                                 ret = Py_None;
    5625           3 :                                 Py_INCREF(ret);
    5626             :                         } else {
    5627          16 :                                 ret = pytalloc_reference_ex(&netr_SamInfo6_Type, in->sam6, in->sam6);
    5628             :                         }
    5629          19 :                         return ret;
    5630             : 
    5631           0 :                 default:
    5632           0 :                         ret = Py_None;
    5633           0 :                         Py_INCREF(ret);
    5634           0 :                         return ret;
    5635             : 
    5636             :         }
    5637             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    5638             :         return NULL;
    5639             : }
    5640             : 
    5641           0 : static union netr_Validation *py_export_netr_Validation(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    5642             : {
    5643           0 :         union netr_Validation *ret = talloc_zero(mem_ctx, union netr_Validation);
    5644           0 :         switch (level) {
    5645           0 :                 case NetlogonValidationSamInfo:
    5646           0 :                         if (in == NULL) {
    5647           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->sam2");
    5648           0 :                                 talloc_free(ret); return NULL;
    5649             :                         }
    5650           0 :                         if (in == Py_None) {
    5651           0 :                                 ret->sam2 = NULL;
    5652             :                         } else {
    5653           0 :                                 ret->sam2 = NULL;
    5654           0 :                                 PY_CHECK_TYPE(&netr_SamInfo2_Type, in, talloc_free(ret); return NULL;);
    5655           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    5656           0 :                                         PyErr_NoMemory();
    5657           0 :                                         talloc_free(ret); return NULL;
    5658             :                                 }
    5659           0 :                                 ret->sam2 = (struct netr_SamInfo2 *)pytalloc_get_ptr(in);
    5660             :                         }
    5661           0 :                         break;
    5662             : 
    5663           0 :                 case NetlogonValidationSamInfo2:
    5664           0 :                         if (in == NULL) {
    5665           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->sam3");
    5666           0 :                                 talloc_free(ret); return NULL;
    5667             :                         }
    5668           0 :                         if (in == Py_None) {
    5669           0 :                                 ret->sam3 = NULL;
    5670             :                         } else {
    5671           0 :                                 ret->sam3 = NULL;
    5672           0 :                                 PY_CHECK_TYPE(&netr_SamInfo3_Type, in, talloc_free(ret); return NULL;);
    5673           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    5674           0 :                                         PyErr_NoMemory();
    5675           0 :                                         talloc_free(ret); return NULL;
    5676             :                                 }
    5677           0 :                                 ret->sam3 = (struct netr_SamInfo3 *)pytalloc_get_ptr(in);
    5678             :                         }
    5679           0 :                         break;
    5680             : 
    5681           0 :                 case 4:
    5682           0 :                         if (in == NULL) {
    5683           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->pac");
    5684           0 :                                 talloc_free(ret); return NULL;
    5685             :                         }
    5686           0 :                         if (in == Py_None) {
    5687           0 :                                 ret->pac = NULL;
    5688             :                         } else {
    5689           0 :                                 ret->pac = NULL;
    5690           0 :                                 PY_CHECK_TYPE(&netr_PacInfo_Type, in, talloc_free(ret); return NULL;);
    5691           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    5692           0 :                                         PyErr_NoMemory();
    5693           0 :                                         talloc_free(ret); return NULL;
    5694             :                                 }
    5695           0 :                                 ret->pac = (struct netr_PacInfo *)pytalloc_get_ptr(in);
    5696             :                         }
    5697           0 :                         break;
    5698             : 
    5699           0 :                 case NetlogonValidationGenericInfo2:
    5700           0 :                         if (in == NULL) {
    5701           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->generic");
    5702           0 :                                 talloc_free(ret); return NULL;
    5703             :                         }
    5704           0 :                         if (in == Py_None) {
    5705           0 :                                 ret->generic = NULL;
    5706             :                         } else {
    5707           0 :                                 ret->generic = NULL;
    5708           0 :                                 PY_CHECK_TYPE(&netr_GenericInfo2_Type, in, talloc_free(ret); return NULL;);
    5709           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    5710           0 :                                         PyErr_NoMemory();
    5711           0 :                                         talloc_free(ret); return NULL;
    5712             :                                 }
    5713           0 :                                 ret->generic = (struct netr_GenericInfo2 *)pytalloc_get_ptr(in);
    5714             :                         }
    5715           0 :                         break;
    5716             : 
    5717           0 :                 case NetlogonValidationSamInfo4:
    5718           0 :                         if (in == NULL) {
    5719           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->sam6");
    5720           0 :                                 talloc_free(ret); return NULL;
    5721             :                         }
    5722           0 :                         if (in == Py_None) {
    5723           0 :                                 ret->sam6 = NULL;
    5724             :                         } else {
    5725           0 :                                 ret->sam6 = NULL;
    5726           0 :                                 PY_CHECK_TYPE(&netr_SamInfo6_Type, in, talloc_free(ret); return NULL;);
    5727           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    5728           0 :                                         PyErr_NoMemory();
    5729           0 :                                         talloc_free(ret); return NULL;
    5730             :                                 }
    5731           0 :                                 ret->sam6 = (struct netr_SamInfo6 *)pytalloc_get_ptr(in);
    5732             :                         }
    5733           0 :                         break;
    5734             : 
    5735           0 :                 default:
    5736           0 :                         break;
    5737             : 
    5738             :         }
    5739             : 
    5740           0 :         return ret;
    5741             : }
    5742             : 
    5743          19 : static PyObject *py_netr_Validation_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5744             : {
    5745          19 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    5746          19 :         PyObject *mem_ctx_obj = NULL;
    5747          19 :         TALLOC_CTX *mem_ctx = NULL;
    5748          19 :         int level = 0;
    5749          19 :         PyObject *in_obj = NULL;
    5750          19 :         union netr_Validation *in = NULL;
    5751             : 
    5752          19 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    5753             :                 discard_const_p(char *, kwnames),
    5754             :                 &mem_ctx_obj,
    5755             :                 &level,
    5756             :                 &in_obj)) {
    5757           0 :                 return NULL;
    5758             :         }
    5759          19 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    5760          19 :         if (mem_ctx == NULL) {
    5761           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    5762           0 :                 return NULL;
    5763             :         }
    5764          19 :         in = (union netr_Validation *)pytalloc_get_ptr(in_obj);
    5765          19 :         if (in == NULL) {
    5766           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_Validation!");
    5767           0 :                 return NULL;
    5768             :         }
    5769             : 
    5770          19 :         return py_import_netr_Validation(mem_ctx, level, in);
    5771             : }
    5772             : 
    5773           0 : static PyObject *py_netr_Validation_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5774             : {
    5775           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    5776           0 :         PyObject *mem_ctx_obj = NULL;
    5777           0 :         TALLOC_CTX *mem_ctx = NULL;
    5778           0 :         int level = 0;
    5779           0 :         PyObject *in = NULL;
    5780           0 :         union netr_Validation *out = NULL;
    5781             : 
    5782           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    5783             :                 discard_const_p(char *, kwnames),
    5784             :                 &mem_ctx_obj,
    5785             :                 &level,
    5786             :                 &in)) {
    5787           0 :                 return NULL;
    5788             :         }
    5789           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    5790           0 :         if (mem_ctx == NULL) {
    5791           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    5792           0 :                 return NULL;
    5793             :         }
    5794             : 
    5795           0 :         out = py_export_netr_Validation(mem_ctx, level, in);
    5796           0 :         if (out == NULL) {
    5797           0 :                 return NULL;
    5798             :         }
    5799             : 
    5800           0 :         return pytalloc_GenericObject_reference(out);
    5801             : }
    5802             : 
    5803             : static PyMethodDef py_netr_Validation_methods[] = {
    5804             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Validation_import),
    5805             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    5806             :                 "T.__import__(mem_ctx, level, in) => ret." },
    5807             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Validation_export),
    5808             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    5809             :                 "T.__export__(mem_ctx, level, in) => ret." },
    5810             :         { NULL, NULL, 0, NULL }
    5811             : };
    5812             : 
    5813           0 : static PyObject *py_netr_Validation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5814             : {
    5815           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    5816           0 :         return NULL;
    5817             : }
    5818             : 
    5819             : 
    5820             : static PyTypeObject netr_Validation_Type = {
    5821             :         PyVarObject_HEAD_INIT(NULL, 0)
    5822             :         .tp_name = "netlogon.netr_Validation",
    5823             :         .tp_getset = NULL,
    5824             :         .tp_methods = py_netr_Validation_methods,
    5825             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5826             :         .tp_new = py_netr_Validation_new,
    5827             : };
    5828             : 
    5829             : 
    5830           0 : static PyObject *py_netr_Credential_get_data(PyObject *obj, void *closure)
    5831             : {
    5832           0 :         struct netr_Credential *object = (struct netr_Credential *)pytalloc_get_ptr(obj);
    5833             :         PyObject *py_data;
    5834           0 :         py_data = PyList_New(8);
    5835           0 :         if (py_data == NULL) {
    5836           0 :                 return NULL;
    5837             :         }
    5838             :         {
    5839             :                 int data_cntr_0;
    5840           0 :                 for (data_cntr_0 = 0; data_cntr_0 < (8); data_cntr_0++) {
    5841             :                         PyObject *py_data_0;
    5842           0 :                         py_data_0 = PyLong_FromLong((uint16_t)object->data[data_cntr_0]);
    5843           0 :                         PyList_SetItem(py_data, data_cntr_0, py_data_0);
    5844             :                 }
    5845             :         }
    5846           0 :         return py_data;
    5847             : }
    5848             : 
    5849          19 : static int py_netr_Credential_set_data(PyObject *py_obj, PyObject *value, void *closure)
    5850             : {
    5851          19 :         struct netr_Credential *object = (struct netr_Credential *)pytalloc_get_ptr(py_obj);
    5852          19 :         if (value == NULL) {
    5853           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data");
    5854           0 :                 return -1;
    5855             :         }
    5856          19 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    5857             :         {
    5858             :                 int data_cntr_0;
    5859          19 :                 if (ARRAY_SIZE(object->data) != PyList_GET_SIZE(value)) {
    5860           0 :                         PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->data),  PyList_GET_SIZE(value));
    5861           0 :                         return -1;
    5862             :                 }
    5863         171 :                 for (data_cntr_0 = 0; data_cntr_0 < PyList_GET_SIZE(value); data_cntr_0++) {
    5864         152 :                         if (PyList_GET_ITEM(value, data_cntr_0) == NULL) {
    5865           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data[data_cntr_0]");
    5866           0 :                                 return -1;
    5867             :                         }
    5868             :                         {
    5869         152 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->data[data_cntr_0]));
    5870         152 :                                 if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_0))) {
    5871             :                                         unsigned long long test_var;
    5872         152 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_0));
    5873         152 :                                         if (PyErr_Occurred() != NULL) {
    5874           0 :                                                 return -1;
    5875             :                                         }
    5876         152 :                                         if (test_var > uint_max) {
    5877           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    5878             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    5879           0 :                                                 return -1;
    5880             :                                         }
    5881         152 :                                         object->data[data_cntr_0] = test_var;
    5882             :                                 } else {
    5883           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    5884             :                                           PyLong_Type.tp_name);
    5885           0 :                                         return -1;
    5886             :                                 }
    5887             :                         }
    5888             :                 }
    5889             :         }
    5890          19 :         return 0;
    5891             : }
    5892             : 
    5893             : static PyGetSetDef py_netr_Credential_getsetters[] = {
    5894             :         {
    5895             :                 .name = discard_const_p(char, "data"),
    5896             :                 .get = py_netr_Credential_get_data,
    5897             :                 .set = py_netr_Credential_set_data,
    5898             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    5899             :         },
    5900             :         { .name = NULL }
    5901             : };
    5902             : 
    5903           4 : static PyObject *py_netr_Credential_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5904             : {
    5905           4 :         return pytalloc_new(struct netr_Credential, type);
    5906             : }
    5907             : 
    5908           0 : static PyObject *py_netr_Credential_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    5909             : {
    5910           0 :         struct netr_Credential *object = (struct netr_Credential *)pytalloc_get_ptr(py_obj);
    5911           0 :         PyObject *ret = NULL;
    5912             :         DATA_BLOB blob;
    5913             :         enum ndr_err_code err;
    5914           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    5915           0 :         if (tmp_ctx == NULL) {
    5916           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    5917           0 :                 return NULL;
    5918             :         }
    5919           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_Credential);
    5920           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5921           0 :                 TALLOC_FREE(tmp_ctx);
    5922           0 :                 PyErr_SetNdrError(err);
    5923           0 :                 return NULL;
    5924             :         }
    5925             : 
    5926           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    5927           0 :         TALLOC_FREE(tmp_ctx);
    5928           0 :         return ret;
    5929             : }
    5930             : 
    5931           0 : static PyObject *py_netr_Credential_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    5932             : {
    5933           0 :         struct netr_Credential *object = (struct netr_Credential *)pytalloc_get_ptr(py_obj);
    5934           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    5935           0 :         Py_ssize_t blob_length = 0;
    5936             :         enum ndr_err_code err;
    5937           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    5938           0 :         PyObject *allow_remaining_obj = NULL;
    5939           0 :         bool allow_remaining = false;
    5940             : 
    5941           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    5942             :                 discard_const_p(char *, kwnames),
    5943             :                 &blob.data, &blob_length,
    5944             :                 &allow_remaining_obj)) {
    5945           0 :                 return NULL;
    5946             :         }
    5947           0 :         blob.length = blob_length;
    5948             : 
    5949           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    5950           0 :                 allow_remaining = true;
    5951             :         }
    5952             : 
    5953           0 :         if (allow_remaining) {
    5954           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_Credential);
    5955             :         } else {
    5956           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_Credential);
    5957             :         }
    5958           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5959           0 :                 PyErr_SetNdrError(err);
    5960           0 :                 return NULL;
    5961             :         }
    5962             : 
    5963           0 :         Py_RETURN_NONE;
    5964             : }
    5965             : 
    5966           0 : static PyObject *py_netr_Credential_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    5967             : {
    5968           0 :         struct netr_Credential *object = (struct netr_Credential *)pytalloc_get_ptr(py_obj);
    5969             :         PyObject *ret;
    5970             :         char *retstr;
    5971             : 
    5972           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_Credential, "netr_Credential", object);
    5973           0 :         ret = PyUnicode_FromString(retstr);
    5974           0 :         talloc_free(retstr);
    5975             : 
    5976           0 :         return ret;
    5977             : }
    5978             : 
    5979             : static PyMethodDef py_netr_Credential_methods[] = {
    5980             :         { "__ndr_pack__", (PyCFunction)py_netr_Credential_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    5981             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Credential_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    5982             :         { "__ndr_print__", (PyCFunction)py_netr_Credential_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    5983             :         { NULL, NULL, 0, NULL }
    5984             : };
    5985             : 
    5986             : 
    5987             : static PyTypeObject netr_Credential_Type = {
    5988             :         PyVarObject_HEAD_INIT(NULL, 0)
    5989             :         .tp_name = "netlogon.netr_Credential",
    5990             :         .tp_getset = py_netr_Credential_getsetters,
    5991             :         .tp_methods = py_netr_Credential_methods,
    5992             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5993             :         .tp_new = py_netr_Credential_new,
    5994             : };
    5995             : 
    5996             : 
    5997          19 : static PyObject *py_netr_Authenticator_get_cred(PyObject *obj, void *closure)
    5998             : {
    5999          19 :         struct netr_Authenticator *object = (struct netr_Authenticator *)pytalloc_get_ptr(obj);
    6000             :         PyObject *py_cred;
    6001          19 :         py_cred = pytalloc_reference_ex(&netr_Credential_Type, pytalloc_get_mem_ctx(obj), &object->cred);
    6002          19 :         return py_cred;
    6003             : }
    6004             : 
    6005           0 : static int py_netr_Authenticator_set_cred(PyObject *py_obj, PyObject *value, void *closure)
    6006             : {
    6007           0 :         struct netr_Authenticator *object = (struct netr_Authenticator *)pytalloc_get_ptr(py_obj);
    6008           0 :         if (value == NULL) {
    6009           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->cred");
    6010           0 :                 return -1;
    6011             :         }
    6012           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
    6013           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6014           0 :                 PyErr_NoMemory();
    6015           0 :                 return -1;
    6016             :         }
    6017           0 :         object->cred = *(struct netr_Credential *)pytalloc_get_ptr(value);
    6018           0 :         return 0;
    6019             : }
    6020             : 
    6021           0 : static PyObject *py_netr_Authenticator_get_timestamp(PyObject *obj, void *closure)
    6022             : {
    6023           0 :         struct netr_Authenticator *object = (struct netr_Authenticator *)pytalloc_get_ptr(obj);
    6024             :         PyObject *py_timestamp;
    6025           0 :         py_timestamp = PyLong_FromLong(object->timestamp);
    6026           0 :         return py_timestamp;
    6027             : }
    6028             : 
    6029          19 : static int py_netr_Authenticator_set_timestamp(PyObject *py_obj, PyObject *value, void *closure)
    6030             : {
    6031          19 :         struct netr_Authenticator *object = (struct netr_Authenticator *)pytalloc_get_ptr(py_obj);
    6032          19 :         if (value == NULL) {
    6033           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->timestamp");
    6034           0 :                 return -1;
    6035             :         }
    6036             :         {
    6037          19 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->timestamp));
    6038          19 :                 const long long int_min = -int_max - 1;
    6039          19 :                 if (PyLong_Check(value)) {
    6040             :                         long long test_var;
    6041          19 :                         test_var = PyLong_AsLongLong(value);
    6042          19 :                         if (PyErr_Occurred() != NULL) {
    6043           0 :                                 return -1;
    6044             :                         }
    6045          19 :                         if (test_var < int_min || test_var > int_max) {
    6046           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",\
    6047             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
    6048           0 :                                 return -1;
    6049             :                         }
    6050          19 :                         object->timestamp = test_var;
    6051             :                 } else {
    6052           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6053             :                           PyLong_Type.tp_name);
    6054           0 :                         return -1;
    6055             :                 }
    6056             :         }
    6057          19 :         return 0;
    6058             : }
    6059             : 
    6060             : static PyGetSetDef py_netr_Authenticator_getsetters[] = {
    6061             :         {
    6062             :                 .name = discard_const_p(char, "cred"),
    6063             :                 .get = py_netr_Authenticator_get_cred,
    6064             :                 .set = py_netr_Authenticator_set_cred,
    6065             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
    6066             :         },
    6067             :         {
    6068             :                 .name = discard_const_p(char, "timestamp"),
    6069             :                 .get = py_netr_Authenticator_get_timestamp,
    6070             :                 .set = py_netr_Authenticator_set_timestamp,
    6071             :                 .doc = discard_const_p(char, "PIDL-generated element of base type time_t")
    6072             :         },
    6073             :         { .name = NULL }
    6074             : };
    6075             : 
    6076          38 : static PyObject *py_netr_Authenticator_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6077             : {
    6078          38 :         return pytalloc_new(struct netr_Authenticator, type);
    6079             : }
    6080             : 
    6081           0 : static PyObject *py_netr_Authenticator_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    6082             : {
    6083           0 :         struct netr_Authenticator *object = (struct netr_Authenticator *)pytalloc_get_ptr(py_obj);
    6084           0 :         PyObject *ret = NULL;
    6085             :         DATA_BLOB blob;
    6086             :         enum ndr_err_code err;
    6087           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    6088           0 :         if (tmp_ctx == NULL) {
    6089           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6090           0 :                 return NULL;
    6091             :         }
    6092           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_Authenticator);
    6093           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6094           0 :                 TALLOC_FREE(tmp_ctx);
    6095           0 :                 PyErr_SetNdrError(err);
    6096           0 :                 return NULL;
    6097             :         }
    6098             : 
    6099           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    6100           0 :         TALLOC_FREE(tmp_ctx);
    6101           0 :         return ret;
    6102             : }
    6103             : 
    6104           0 : static PyObject *py_netr_Authenticator_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6105             : {
    6106           0 :         struct netr_Authenticator *object = (struct netr_Authenticator *)pytalloc_get_ptr(py_obj);
    6107           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    6108           0 :         Py_ssize_t blob_length = 0;
    6109             :         enum ndr_err_code err;
    6110           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    6111           0 :         PyObject *allow_remaining_obj = NULL;
    6112           0 :         bool allow_remaining = false;
    6113             : 
    6114           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    6115             :                 discard_const_p(char *, kwnames),
    6116             :                 &blob.data, &blob_length,
    6117             :                 &allow_remaining_obj)) {
    6118           0 :                 return NULL;
    6119             :         }
    6120           0 :         blob.length = blob_length;
    6121             : 
    6122           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6123           0 :                 allow_remaining = true;
    6124             :         }
    6125             : 
    6126           0 :         if (allow_remaining) {
    6127           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_Authenticator);
    6128             :         } else {
    6129           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_Authenticator);
    6130             :         }
    6131           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6132           0 :                 PyErr_SetNdrError(err);
    6133           0 :                 return NULL;
    6134             :         }
    6135             : 
    6136           0 :         Py_RETURN_NONE;
    6137             : }
    6138             : 
    6139           0 : static PyObject *py_netr_Authenticator_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6140             : {
    6141           0 :         struct netr_Authenticator *object = (struct netr_Authenticator *)pytalloc_get_ptr(py_obj);
    6142             :         PyObject *ret;
    6143             :         char *retstr;
    6144             : 
    6145           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_Authenticator, "netr_Authenticator", object);
    6146           0 :         ret = PyUnicode_FromString(retstr);
    6147           0 :         talloc_free(retstr);
    6148             : 
    6149           0 :         return ret;
    6150             : }
    6151             : 
    6152             : static PyMethodDef py_netr_Authenticator_methods[] = {
    6153             :         { "__ndr_pack__", (PyCFunction)py_netr_Authenticator_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    6154             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Authenticator_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    6155             :         { "__ndr_print__", (PyCFunction)py_netr_Authenticator_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    6156             :         { NULL, NULL, 0, NULL }
    6157             : };
    6158             : 
    6159             : 
    6160             : static PyTypeObject netr_Authenticator_Type = {
    6161             :         PyVarObject_HEAD_INIT(NULL, 0)
    6162             :         .tp_name = "netlogon.netr_Authenticator",
    6163             :         .tp_getset = py_netr_Authenticator_getsetters,
    6164             :         .tp_methods = py_netr_Authenticator_methods,
    6165             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6166             :         .tp_new = py_netr_Authenticator_new,
    6167             : };
    6168             : 
    6169             : 
    6170           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_account_name(PyObject *obj, void *closure)
    6171             : {
    6172           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6173             :         PyObject *py_account_name;
    6174           0 :         if (object->account_name == NULL) {
    6175           0 :                 Py_RETURN_NONE;
    6176             :         }
    6177           0 :         if (object->account_name == NULL) {
    6178           0 :                 py_account_name = Py_None;
    6179           0 :                 Py_INCREF(py_account_name);
    6180             :         } else {
    6181           0 :                 if (object->account_name == NULL) {
    6182           0 :                         py_account_name = Py_None;
    6183           0 :                         Py_INCREF(py_account_name);
    6184             :                 } else {
    6185           0 :                         py_account_name = PyUnicode_Decode(object->account_name, strlen(object->account_name), "utf-8", "ignore");
    6186             :                 }
    6187             :         }
    6188           0 :         return py_account_name;
    6189             : }
    6190             : 
    6191           0 : static int py_netr_DELTA_DELETE_USER_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
    6192             : {
    6193           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6194           0 :         if (value == NULL) {
    6195           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->account_name");
    6196           0 :                 return -1;
    6197             :         }
    6198           0 :         if (value == Py_None) {
    6199           0 :                 object->account_name = NULL;
    6200             :         } else {
    6201           0 :                 object->account_name = NULL;
    6202             :                 {
    6203             :                         const char *test_str;
    6204             :                         const char *talloc_str;
    6205           0 :                         PyObject *unicode = NULL;
    6206           0 :                         if (PyUnicode_Check(value)) {
    6207           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    6208           0 :                                 if (unicode == NULL) {
    6209           0 :                                         PyErr_NoMemory();
    6210           0 :                                         return -1;
    6211             :                                 }
    6212           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    6213           0 :                         } else if (PyBytes_Check(value)) {
    6214           0 :                                 test_str = PyBytes_AS_STRING(value);
    6215             :                         } else {
    6216           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    6217           0 :                                 return -1;
    6218             :                         }
    6219           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    6220           0 :                         if (unicode != NULL) {
    6221           0 :                                 Py_DECREF(unicode);
    6222             :                         }
    6223           0 :                         if (talloc_str == NULL) {
    6224           0 :                                 PyErr_NoMemory();
    6225           0 :                                 return -1;
    6226             :                         }
    6227           0 :                         object->account_name = talloc_str;
    6228             :                 }
    6229             :         }
    6230           0 :         return 0;
    6231             : }
    6232             : 
    6233           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown1(PyObject *obj, void *closure)
    6234             : {
    6235           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6236             :         PyObject *py_unknown1;
    6237           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
    6238           0 :         return py_unknown1;
    6239             : }
    6240             : 
    6241           0 : static int py_netr_DELTA_DELETE_USER_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
    6242             : {
    6243           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6244           0 :         if (value == NULL) {
    6245           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
    6246           0 :                 return -1;
    6247             :         }
    6248           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    6249           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6250           0 :                 PyErr_NoMemory();
    6251           0 :                 return -1;
    6252             :         }
    6253           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
    6254           0 :         return 0;
    6255             : }
    6256             : 
    6257           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown2(PyObject *obj, void *closure)
    6258             : {
    6259           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6260             :         PyObject *py_unknown2;
    6261           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
    6262           0 :         return py_unknown2;
    6263             : }
    6264             : 
    6265           0 : static int py_netr_DELTA_DELETE_USER_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
    6266             : {
    6267           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6268           0 :         if (value == NULL) {
    6269           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
    6270           0 :                 return -1;
    6271             :         }
    6272           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    6273           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6274           0 :                 PyErr_NoMemory();
    6275           0 :                 return -1;
    6276             :         }
    6277           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
    6278           0 :         return 0;
    6279             : }
    6280             : 
    6281           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown3(PyObject *obj, void *closure)
    6282             : {
    6283           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6284             :         PyObject *py_unknown3;
    6285           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
    6286           0 :         return py_unknown3;
    6287             : }
    6288             : 
    6289           0 : static int py_netr_DELTA_DELETE_USER_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
    6290             : {
    6291           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6292           0 :         if (value == NULL) {
    6293           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
    6294           0 :                 return -1;
    6295             :         }
    6296           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    6297           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6298           0 :                 PyErr_NoMemory();
    6299           0 :                 return -1;
    6300             :         }
    6301           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
    6302           0 :         return 0;
    6303             : }
    6304             : 
    6305           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown4(PyObject *obj, void *closure)
    6306             : {
    6307           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6308             :         PyObject *py_unknown4;
    6309           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
    6310           0 :         return py_unknown4;
    6311             : }
    6312             : 
    6313           0 : static int py_netr_DELTA_DELETE_USER_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
    6314             : {
    6315           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6316           0 :         if (value == NULL) {
    6317           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
    6318           0 :                 return -1;
    6319             :         }
    6320           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    6321           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6322           0 :                 PyErr_NoMemory();
    6323           0 :                 return -1;
    6324             :         }
    6325           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
    6326           0 :         return 0;
    6327             : }
    6328             : 
    6329           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown5(PyObject *obj, void *closure)
    6330             : {
    6331           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6332             :         PyObject *py_unknown5;
    6333           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown5);
    6334           0 :         return py_unknown5;
    6335             : }
    6336             : 
    6337           0 : static int py_netr_DELTA_DELETE_USER_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
    6338             : {
    6339           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6340           0 :         if (value == NULL) {
    6341           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown5");
    6342           0 :                 return -1;
    6343             :         }
    6344             :         {
    6345           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
    6346           0 :                 if (PyLong_Check(value)) {
    6347             :                         unsigned long long test_var;
    6348           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6349           0 :                         if (PyErr_Occurred() != NULL) {
    6350           0 :                                 return -1;
    6351             :                         }
    6352           0 :                         if (test_var > uint_max) {
    6353           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6354             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6355           0 :                                 return -1;
    6356             :                         }
    6357           0 :                         object->unknown5 = test_var;
    6358             :                 } else {
    6359           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6360             :                           PyLong_Type.tp_name);
    6361           0 :                         return -1;
    6362             :                 }
    6363             :         }
    6364           0 :         return 0;
    6365             : }
    6366             : 
    6367           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown6(PyObject *obj, void *closure)
    6368             : {
    6369           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6370             :         PyObject *py_unknown6;
    6371           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown6);
    6372           0 :         return py_unknown6;
    6373             : }
    6374             : 
    6375           0 : static int py_netr_DELTA_DELETE_USER_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
    6376             : {
    6377           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6378           0 :         if (value == NULL) {
    6379           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown6");
    6380           0 :                 return -1;
    6381             :         }
    6382             :         {
    6383           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
    6384           0 :                 if (PyLong_Check(value)) {
    6385             :                         unsigned long long test_var;
    6386           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6387           0 :                         if (PyErr_Occurred() != NULL) {
    6388           0 :                                 return -1;
    6389             :                         }
    6390           0 :                         if (test_var > uint_max) {
    6391           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6392             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6393           0 :                                 return -1;
    6394             :                         }
    6395           0 :                         object->unknown6 = test_var;
    6396             :                 } else {
    6397           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6398             :                           PyLong_Type.tp_name);
    6399           0 :                         return -1;
    6400             :                 }
    6401             :         }
    6402           0 :         return 0;
    6403             : }
    6404             : 
    6405           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown7(PyObject *obj, void *closure)
    6406             : {
    6407           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6408             :         PyObject *py_unknown7;
    6409           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown7);
    6410           0 :         return py_unknown7;
    6411             : }
    6412             : 
    6413           0 : static int py_netr_DELTA_DELETE_USER_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
    6414             : {
    6415           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6416           0 :         if (value == NULL) {
    6417           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown7");
    6418           0 :                 return -1;
    6419             :         }
    6420             :         {
    6421           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
    6422           0 :                 if (PyLong_Check(value)) {
    6423             :                         unsigned long long test_var;
    6424           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6425           0 :                         if (PyErr_Occurred() != NULL) {
    6426           0 :                                 return -1;
    6427             :                         }
    6428           0 :                         if (test_var > uint_max) {
    6429           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6430             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6431           0 :                                 return -1;
    6432             :                         }
    6433           0 :                         object->unknown7 = test_var;
    6434             :                 } else {
    6435           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6436             :                           PyLong_Type.tp_name);
    6437           0 :                         return -1;
    6438             :                 }
    6439             :         }
    6440           0 :         return 0;
    6441             : }
    6442             : 
    6443           0 : static PyObject *py_netr_DELTA_DELETE_USER_get_unknown8(PyObject *obj, void *closure)
    6444             : {
    6445           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(obj);
    6446             :         PyObject *py_unknown8;
    6447           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown8);
    6448           0 :         return py_unknown8;
    6449             : }
    6450             : 
    6451           0 : static int py_netr_DELTA_DELETE_USER_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
    6452             : {
    6453           0 :         struct netr_DELTA_DELETE_USER *object = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(py_obj);
    6454           0 :         if (value == NULL) {
    6455           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown8");
    6456           0 :                 return -1;
    6457             :         }
    6458             :         {
    6459           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
    6460           0 :                 if (PyLong_Check(value)) {
    6461             :                         unsigned long long test_var;
    6462           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6463           0 :                         if (PyErr_Occurred() != NULL) {
    6464           0 :                                 return -1;
    6465             :                         }
    6466           0 :                         if (test_var > uint_max) {
    6467           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6468             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6469           0 :                                 return -1;
    6470             :                         }
    6471           0 :                         object->unknown8 = test_var;
    6472             :                 } else {
    6473           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6474             :                           PyLong_Type.tp_name);
    6475           0 :                         return -1;
    6476             :                 }
    6477             :         }
    6478           0 :         return 0;
    6479             : }
    6480             : 
    6481             : static PyGetSetDef py_netr_DELTA_DELETE_USER_getsetters[] = {
    6482             :         {
    6483             :                 .name = discard_const_p(char, "account_name"),
    6484             :                 .get = py_netr_DELTA_DELETE_USER_get_account_name,
    6485             :                 .set = py_netr_DELTA_DELETE_USER_set_account_name,
    6486             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    6487             :         },
    6488             :         {
    6489             :                 .name = discard_const_p(char, "unknown1"),
    6490             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown1,
    6491             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown1,
    6492             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    6493             :         },
    6494             :         {
    6495             :                 .name = discard_const_p(char, "unknown2"),
    6496             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown2,
    6497             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown2,
    6498             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    6499             :         },
    6500             :         {
    6501             :                 .name = discard_const_p(char, "unknown3"),
    6502             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown3,
    6503             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown3,
    6504             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    6505             :         },
    6506             :         {
    6507             :                 .name = discard_const_p(char, "unknown4"),
    6508             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown4,
    6509             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown4,
    6510             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    6511             :         },
    6512             :         {
    6513             :                 .name = discard_const_p(char, "unknown5"),
    6514             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown5,
    6515             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown5,
    6516             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6517             :         },
    6518             :         {
    6519             :                 .name = discard_const_p(char, "unknown6"),
    6520             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown6,
    6521             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown6,
    6522             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6523             :         },
    6524             :         {
    6525             :                 .name = discard_const_p(char, "unknown7"),
    6526             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown7,
    6527             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown7,
    6528             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6529             :         },
    6530             :         {
    6531             :                 .name = discard_const_p(char, "unknown8"),
    6532             :                 .get = py_netr_DELTA_DELETE_USER_get_unknown8,
    6533             :                 .set = py_netr_DELTA_DELETE_USER_set_unknown8,
    6534             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6535             :         },
    6536             :         { .name = NULL }
    6537             : };
    6538             : 
    6539           0 : static PyObject *py_netr_DELTA_DELETE_USER_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6540             : {
    6541           0 :         return pytalloc_new(struct netr_DELTA_DELETE_USER, type);
    6542             : }
    6543             : 
    6544             : 
    6545             : static PyTypeObject netr_DELTA_DELETE_USER_Type = {
    6546             :         PyVarObject_HEAD_INIT(NULL, 0)
    6547             :         .tp_name = "netlogon.netr_DELTA_DELETE_USER",
    6548             :         .tp_getset = py_netr_DELTA_DELETE_USER_getsetters,
    6549             :         .tp_methods = NULL,
    6550             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6551             :         .tp_new = py_netr_DELTA_DELETE_USER_new,
    6552             : };
    6553             : 
    6554             : 
    6555           0 : static PyObject *py_netr_USER_KEY16_get_length(PyObject *obj, void *closure)
    6556             : {
    6557           0 :         struct netr_USER_KEY16 *object = (struct netr_USER_KEY16 *)pytalloc_get_ptr(obj);
    6558             :         PyObject *py_length;
    6559           0 :         py_length = PyLong_FromLong((uint16_t)object->length);
    6560           0 :         return py_length;
    6561             : }
    6562             : 
    6563           0 : static int py_netr_USER_KEY16_set_length(PyObject *py_obj, PyObject *value, void *closure)
    6564             : {
    6565           0 :         struct netr_USER_KEY16 *object = (struct netr_USER_KEY16 *)pytalloc_get_ptr(py_obj);
    6566           0 :         if (value == NULL) {
    6567           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
    6568           0 :                 return -1;
    6569             :         }
    6570             :         {
    6571           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
    6572           0 :                 if (PyLong_Check(value)) {
    6573             :                         unsigned long long test_var;
    6574           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6575           0 :                         if (PyErr_Occurred() != NULL) {
    6576           0 :                                 return -1;
    6577             :                         }
    6578           0 :                         if (test_var > uint_max) {
    6579           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6580             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6581           0 :                                 return -1;
    6582             :                         }
    6583           0 :                         object->length = test_var;
    6584             :                 } else {
    6585           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6586             :                           PyLong_Type.tp_name);
    6587           0 :                         return -1;
    6588             :                 }
    6589             :         }
    6590           0 :         return 0;
    6591             : }
    6592             : 
    6593           0 : static PyObject *py_netr_USER_KEY16_get_size(PyObject *obj, void *closure)
    6594             : {
    6595           0 :         struct netr_USER_KEY16 *object = (struct netr_USER_KEY16 *)pytalloc_get_ptr(obj);
    6596             :         PyObject *py_size;
    6597           0 :         py_size = PyLong_FromLong((uint16_t)object->size);
    6598           0 :         return py_size;
    6599             : }
    6600             : 
    6601           0 : static int py_netr_USER_KEY16_set_size(PyObject *py_obj, PyObject *value, void *closure)
    6602             : {
    6603           0 :         struct netr_USER_KEY16 *object = (struct netr_USER_KEY16 *)pytalloc_get_ptr(py_obj);
    6604           0 :         if (value == NULL) {
    6605           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->size");
    6606           0 :                 return -1;
    6607             :         }
    6608             :         {
    6609           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
    6610           0 :                 if (PyLong_Check(value)) {
    6611             :                         unsigned long long test_var;
    6612           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6613           0 :                         if (PyErr_Occurred() != NULL) {
    6614           0 :                                 return -1;
    6615             :                         }
    6616           0 :                         if (test_var > uint_max) {
    6617           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6618             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6619           0 :                                 return -1;
    6620             :                         }
    6621           0 :                         object->size = test_var;
    6622             :                 } else {
    6623           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6624             :                           PyLong_Type.tp_name);
    6625           0 :                         return -1;
    6626             :                 }
    6627             :         }
    6628           0 :         return 0;
    6629             : }
    6630             : 
    6631           0 : static PyObject *py_netr_USER_KEY16_get_flags(PyObject *obj, void *closure)
    6632             : {
    6633           0 :         struct netr_USER_KEY16 *object = (struct netr_USER_KEY16 *)pytalloc_get_ptr(obj);
    6634             :         PyObject *py_flags;
    6635           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->flags);
    6636           0 :         return py_flags;
    6637             : }
    6638             : 
    6639           0 : static int py_netr_USER_KEY16_set_flags(PyObject *py_obj, PyObject *value, void *closure)
    6640             : {
    6641           0 :         struct netr_USER_KEY16 *object = (struct netr_USER_KEY16 *)pytalloc_get_ptr(py_obj);
    6642           0 :         if (value == NULL) {
    6643           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
    6644           0 :                 return -1;
    6645             :         }
    6646             :         {
    6647           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
    6648           0 :                 if (PyLong_Check(value)) {
    6649             :                         unsigned long long test_var;
    6650           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6651           0 :                         if (PyErr_Occurred() != NULL) {
    6652           0 :                                 return -1;
    6653             :                         }
    6654           0 :                         if (test_var > uint_max) {
    6655           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6656             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6657           0 :                                 return -1;
    6658             :                         }
    6659           0 :                         object->flags = test_var;
    6660             :                 } else {
    6661           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6662             :                           PyLong_Type.tp_name);
    6663           0 :                         return -1;
    6664             :                 }
    6665             :         }
    6666           0 :         return 0;
    6667             : }
    6668             : 
    6669           0 : static PyObject *py_netr_USER_KEY16_get_pwd(PyObject *obj, void *closure)
    6670             : {
    6671           0 :         struct netr_USER_KEY16 *object = (struct netr_USER_KEY16 *)pytalloc_get_ptr(obj);
    6672             :         PyObject *py_pwd;
    6673           0 :         py_pwd = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->pwd);
    6674           0 :         return py_pwd;
    6675             : }
    6676             : 
    6677           0 : static int py_netr_USER_KEY16_set_pwd(PyObject *py_obj, PyObject *value, void *closure)
    6678             : {
    6679           0 :         struct netr_USER_KEY16 *object = (struct netr_USER_KEY16 *)pytalloc_get_ptr(py_obj);
    6680           0 :         if (value == NULL) {
    6681           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pwd");
    6682           0 :                 return -1;
    6683             :         }
    6684           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
    6685           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6686           0 :                 PyErr_NoMemory();
    6687           0 :                 return -1;
    6688             :         }
    6689           0 :         object->pwd = *(struct samr_Password *)pytalloc_get_ptr(value);
    6690           0 :         return 0;
    6691             : }
    6692             : 
    6693             : static PyGetSetDef py_netr_USER_KEY16_getsetters[] = {
    6694             :         {
    6695             :                 .name = discard_const_p(char, "length"),
    6696             :                 .get = py_netr_USER_KEY16_get_length,
    6697             :                 .set = py_netr_USER_KEY16_set_length,
    6698             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    6699             :         },
    6700             :         {
    6701             :                 .name = discard_const_p(char, "size"),
    6702             :                 .get = py_netr_USER_KEY16_get_size,
    6703             :                 .set = py_netr_USER_KEY16_set_size,
    6704             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    6705             :         },
    6706             :         {
    6707             :                 .name = discard_const_p(char, "flags"),
    6708             :                 .get = py_netr_USER_KEY16_get_flags,
    6709             :                 .set = py_netr_USER_KEY16_set_flags,
    6710             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6711             :         },
    6712             :         {
    6713             :                 .name = discard_const_p(char, "pwd"),
    6714             :                 .get = py_netr_USER_KEY16_get_pwd,
    6715             :                 .set = py_netr_USER_KEY16_set_pwd,
    6716             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
    6717             :         },
    6718             :         { .name = NULL }
    6719             : };
    6720             : 
    6721           0 : static PyObject *py_netr_USER_KEY16_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6722             : {
    6723           0 :         return pytalloc_new(struct netr_USER_KEY16, type);
    6724             : }
    6725             : 
    6726             : 
    6727             : static PyTypeObject netr_USER_KEY16_Type = {
    6728             :         PyVarObject_HEAD_INIT(NULL, 0)
    6729             :         .tp_name = "netlogon.netr_USER_KEY16",
    6730             :         .tp_getset = py_netr_USER_KEY16_getsetters,
    6731             :         .tp_methods = NULL,
    6732             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6733             :         .tp_new = py_netr_USER_KEY16_new,
    6734             : };
    6735             : 
    6736             : 
    6737           0 : static PyObject *py_netr_PasswordHistory_get_nt_length(PyObject *obj, void *closure)
    6738             : {
    6739           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(obj);
    6740             :         PyObject *py_nt_length;
    6741           0 :         py_nt_length = PyLong_FromLong((uint16_t)object->nt_length);
    6742           0 :         return py_nt_length;
    6743             : }
    6744             : 
    6745           0 : static int py_netr_PasswordHistory_set_nt_length(PyObject *py_obj, PyObject *value, void *closure)
    6746             : {
    6747           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(py_obj);
    6748           0 :         if (value == NULL) {
    6749           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nt_length");
    6750           0 :                 return -1;
    6751             :         }
    6752             :         {
    6753           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nt_length));
    6754           0 :                 if (PyLong_Check(value)) {
    6755             :                         unsigned long long test_var;
    6756           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6757           0 :                         if (PyErr_Occurred() != NULL) {
    6758           0 :                                 return -1;
    6759             :                         }
    6760           0 :                         if (test_var > uint_max) {
    6761           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6762             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6763           0 :                                 return -1;
    6764             :                         }
    6765           0 :                         object->nt_length = test_var;
    6766             :                 } else {
    6767           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6768             :                           PyLong_Type.tp_name);
    6769           0 :                         return -1;
    6770             :                 }
    6771             :         }
    6772           0 :         return 0;
    6773             : }
    6774             : 
    6775           0 : static PyObject *py_netr_PasswordHistory_get_nt_size(PyObject *obj, void *closure)
    6776             : {
    6777           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(obj);
    6778             :         PyObject *py_nt_size;
    6779           0 :         py_nt_size = PyLong_FromLong((uint16_t)object->nt_size);
    6780           0 :         return py_nt_size;
    6781             : }
    6782             : 
    6783           0 : static int py_netr_PasswordHistory_set_nt_size(PyObject *py_obj, PyObject *value, void *closure)
    6784             : {
    6785           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(py_obj);
    6786           0 :         if (value == NULL) {
    6787           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nt_size");
    6788           0 :                 return -1;
    6789             :         }
    6790             :         {
    6791           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nt_size));
    6792           0 :                 if (PyLong_Check(value)) {
    6793             :                         unsigned long long test_var;
    6794           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6795           0 :                         if (PyErr_Occurred() != NULL) {
    6796           0 :                                 return -1;
    6797             :                         }
    6798           0 :                         if (test_var > uint_max) {
    6799           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6800             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6801           0 :                                 return -1;
    6802             :                         }
    6803           0 :                         object->nt_size = test_var;
    6804             :                 } else {
    6805           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6806             :                           PyLong_Type.tp_name);
    6807           0 :                         return -1;
    6808             :                 }
    6809             :         }
    6810           0 :         return 0;
    6811             : }
    6812             : 
    6813           0 : static PyObject *py_netr_PasswordHistory_get_nt_flags(PyObject *obj, void *closure)
    6814             : {
    6815           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(obj);
    6816             :         PyObject *py_nt_flags;
    6817           0 :         py_nt_flags = PyLong_FromUnsignedLongLong((uint32_t)object->nt_flags);
    6818           0 :         return py_nt_flags;
    6819             : }
    6820             : 
    6821           0 : static int py_netr_PasswordHistory_set_nt_flags(PyObject *py_obj, PyObject *value, void *closure)
    6822             : {
    6823           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(py_obj);
    6824           0 :         if (value == NULL) {
    6825           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nt_flags");
    6826           0 :                 return -1;
    6827             :         }
    6828             :         {
    6829           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nt_flags));
    6830           0 :                 if (PyLong_Check(value)) {
    6831             :                         unsigned long long test_var;
    6832           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6833           0 :                         if (PyErr_Occurred() != NULL) {
    6834           0 :                                 return -1;
    6835             :                         }
    6836           0 :                         if (test_var > uint_max) {
    6837           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6838             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6839           0 :                                 return -1;
    6840             :                         }
    6841           0 :                         object->nt_flags = test_var;
    6842             :                 } else {
    6843           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6844             :                           PyLong_Type.tp_name);
    6845           0 :                         return -1;
    6846             :                 }
    6847             :         }
    6848           0 :         return 0;
    6849             : }
    6850             : 
    6851           0 : static PyObject *py_netr_PasswordHistory_get_lm_length(PyObject *obj, void *closure)
    6852             : {
    6853           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(obj);
    6854             :         PyObject *py_lm_length;
    6855           0 :         py_lm_length = PyLong_FromLong((uint16_t)object->lm_length);
    6856           0 :         return py_lm_length;
    6857             : }
    6858             : 
    6859           0 : static int py_netr_PasswordHistory_set_lm_length(PyObject *py_obj, PyObject *value, void *closure)
    6860             : {
    6861           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(py_obj);
    6862           0 :         if (value == NULL) {
    6863           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lm_length");
    6864           0 :                 return -1;
    6865             :         }
    6866             :         {
    6867           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lm_length));
    6868           0 :                 if (PyLong_Check(value)) {
    6869             :                         unsigned long long test_var;
    6870           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6871           0 :                         if (PyErr_Occurred() != NULL) {
    6872           0 :                                 return -1;
    6873             :                         }
    6874           0 :                         if (test_var > uint_max) {
    6875           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6876             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6877           0 :                                 return -1;
    6878             :                         }
    6879           0 :                         object->lm_length = test_var;
    6880             :                 } else {
    6881           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6882             :                           PyLong_Type.tp_name);
    6883           0 :                         return -1;
    6884             :                 }
    6885             :         }
    6886           0 :         return 0;
    6887             : }
    6888             : 
    6889           0 : static PyObject *py_netr_PasswordHistory_get_lm_size(PyObject *obj, void *closure)
    6890             : {
    6891           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(obj);
    6892             :         PyObject *py_lm_size;
    6893           0 :         py_lm_size = PyLong_FromLong((uint16_t)object->lm_size);
    6894           0 :         return py_lm_size;
    6895             : }
    6896             : 
    6897           0 : static int py_netr_PasswordHistory_set_lm_size(PyObject *py_obj, PyObject *value, void *closure)
    6898             : {
    6899           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(py_obj);
    6900           0 :         if (value == NULL) {
    6901           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lm_size");
    6902           0 :                 return -1;
    6903             :         }
    6904             :         {
    6905           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lm_size));
    6906           0 :                 if (PyLong_Check(value)) {
    6907             :                         unsigned long long test_var;
    6908           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6909           0 :                         if (PyErr_Occurred() != NULL) {
    6910           0 :                                 return -1;
    6911             :                         }
    6912           0 :                         if (test_var > uint_max) {
    6913           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6914             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6915           0 :                                 return -1;
    6916             :                         }
    6917           0 :                         object->lm_size = test_var;
    6918             :                 } else {
    6919           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6920             :                           PyLong_Type.tp_name);
    6921           0 :                         return -1;
    6922             :                 }
    6923             :         }
    6924           0 :         return 0;
    6925             : }
    6926             : 
    6927           0 : static PyObject *py_netr_PasswordHistory_get_lm_flags(PyObject *obj, void *closure)
    6928             : {
    6929           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(obj);
    6930             :         PyObject *py_lm_flags;
    6931           0 :         py_lm_flags = PyLong_FromUnsignedLongLong((uint32_t)object->lm_flags);
    6932           0 :         return py_lm_flags;
    6933             : }
    6934             : 
    6935           0 : static int py_netr_PasswordHistory_set_lm_flags(PyObject *py_obj, PyObject *value, void *closure)
    6936             : {
    6937           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(py_obj);
    6938           0 :         if (value == NULL) {
    6939           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lm_flags");
    6940           0 :                 return -1;
    6941             :         }
    6942             :         {
    6943           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lm_flags));
    6944           0 :                 if (PyLong_Check(value)) {
    6945             :                         unsigned long long test_var;
    6946           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6947           0 :                         if (PyErr_Occurred() != NULL) {
    6948           0 :                                 return -1;
    6949             :                         }
    6950           0 :                         if (test_var > uint_max) {
    6951           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    6952             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6953           0 :                                 return -1;
    6954             :                         }
    6955           0 :                         object->lm_flags = test_var;
    6956             :                 } else {
    6957           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    6958             :                           PyLong_Type.tp_name);
    6959           0 :                         return -1;
    6960             :                 }
    6961             :         }
    6962           0 :         return 0;
    6963             : }
    6964             : 
    6965           0 : static PyObject *py_netr_PasswordHistory_get_nt_history(PyObject *obj, void *closure)
    6966             : {
    6967           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(obj);
    6968             :         PyObject *py_nt_history;
    6969           0 :         py_nt_history = PyList_New(object->nt_length);
    6970           0 :         if (py_nt_history == NULL) {
    6971           0 :                 return NULL;
    6972             :         }
    6973             :         {
    6974             :                 int nt_history_cntr_0;
    6975           0 :                 for (nt_history_cntr_0 = 0; nt_history_cntr_0 < (object->nt_length); nt_history_cntr_0++) {
    6976             :                         PyObject *py_nt_history_0;
    6977           0 :                         py_nt_history_0 = PyLong_FromLong((uint16_t)object->nt_history[nt_history_cntr_0]);
    6978           0 :                         PyList_SetItem(py_nt_history, nt_history_cntr_0, py_nt_history_0);
    6979             :                 }
    6980             :         }
    6981           0 :         return py_nt_history;
    6982             : }
    6983             : 
    6984           0 : static int py_netr_PasswordHistory_set_nt_history(PyObject *py_obj, PyObject *value, void *closure)
    6985             : {
    6986           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(py_obj);
    6987           0 :         if (value == NULL) {
    6988           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nt_history");
    6989           0 :                 return -1;
    6990             :         }
    6991           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    6992             :         {
    6993             :                 int nt_history_cntr_0;
    6994           0 :                 object->nt_history = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->nt_history, PyList_GET_SIZE(value));
    6995           0 :                 if (!object->nt_history) { return -1;; }
    6996           0 :                 talloc_set_name_const(object->nt_history, "ARRAY: object->nt_history");
    6997           0 :                 for (nt_history_cntr_0 = 0; nt_history_cntr_0 < PyList_GET_SIZE(value); nt_history_cntr_0++) {
    6998           0 :                         if (PyList_GET_ITEM(value, nt_history_cntr_0) == NULL) {
    6999           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nt_history[nt_history_cntr_0]");
    7000           0 :                                 return -1;
    7001             :                         }
    7002             :                         {
    7003           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nt_history[nt_history_cntr_0]));
    7004           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, nt_history_cntr_0))) {
    7005             :                                         unsigned long long test_var;
    7006           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, nt_history_cntr_0));
    7007           0 :                                         if (PyErr_Occurred() != NULL) {
    7008           0 :                                                 return -1;
    7009             :                                         }
    7010           0 :                                         if (test_var > uint_max) {
    7011           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    7012             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    7013           0 :                                                 return -1;
    7014             :                                         }
    7015           0 :                                         object->nt_history[nt_history_cntr_0] = test_var;
    7016             :                                 } else {
    7017           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    7018             :                                           PyLong_Type.tp_name);
    7019           0 :                                         return -1;
    7020             :                                 }
    7021             :                         }
    7022             :                 }
    7023             :         }
    7024           0 :         return 0;
    7025             : }
    7026             : 
    7027           0 : static PyObject *py_netr_PasswordHistory_get_lm_history(PyObject *obj, void *closure)
    7028             : {
    7029           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(obj);
    7030             :         PyObject *py_lm_history;
    7031           0 :         py_lm_history = PyList_New(object->lm_length);
    7032           0 :         if (py_lm_history == NULL) {
    7033           0 :                 return NULL;
    7034             :         }
    7035             :         {
    7036             :                 int lm_history_cntr_0;
    7037           0 :                 for (lm_history_cntr_0 = 0; lm_history_cntr_0 < (object->lm_length); lm_history_cntr_0++) {
    7038             :                         PyObject *py_lm_history_0;
    7039           0 :                         py_lm_history_0 = PyLong_FromLong((uint16_t)object->lm_history[lm_history_cntr_0]);
    7040           0 :                         PyList_SetItem(py_lm_history, lm_history_cntr_0, py_lm_history_0);
    7041             :                 }
    7042             :         }
    7043           0 :         return py_lm_history;
    7044             : }
    7045             : 
    7046           0 : static int py_netr_PasswordHistory_set_lm_history(PyObject *py_obj, PyObject *value, void *closure)
    7047             : {
    7048           0 :         struct netr_PasswordHistory *object = (struct netr_PasswordHistory *)pytalloc_get_ptr(py_obj);
    7049           0 :         if (value == NULL) {
    7050           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lm_history");
    7051           0 :                 return -1;
    7052             :         }
    7053           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    7054             :         {
    7055             :                 int lm_history_cntr_0;
    7056           0 :                 object->lm_history = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->lm_history, PyList_GET_SIZE(value));
    7057           0 :                 if (!object->lm_history) { return -1;; }
    7058           0 :                 talloc_set_name_const(object->lm_history, "ARRAY: object->lm_history");
    7059           0 :                 for (lm_history_cntr_0 = 0; lm_history_cntr_0 < PyList_GET_SIZE(value); lm_history_cntr_0++) {
    7060           0 :                         if (PyList_GET_ITEM(value, lm_history_cntr_0) == NULL) {
    7061           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lm_history[lm_history_cntr_0]");
    7062           0 :                                 return -1;
    7063             :                         }
    7064             :                         {
    7065           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lm_history[lm_history_cntr_0]));
    7066           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, lm_history_cntr_0))) {
    7067             :                                         unsigned long long test_var;
    7068           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, lm_history_cntr_0));
    7069           0 :                                         if (PyErr_Occurred() != NULL) {
    7070           0 :                                                 return -1;
    7071             :                                         }
    7072           0 :                                         if (test_var > uint_max) {
    7073           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    7074             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    7075           0 :                                                 return -1;
    7076             :                                         }
    7077           0 :                                         object->lm_history[lm_history_cntr_0] = test_var;
    7078             :                                 } else {
    7079           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    7080             :                                           PyLong_Type.tp_name);
    7081           0 :                                         return -1;
    7082             :                                 }
    7083             :                         }
    7084             :                 }
    7085             :         }
    7086           0 :         return 0;
    7087             : }
    7088             : 
    7089             : static PyGetSetDef py_netr_PasswordHistory_getsetters[] = {
    7090             :         {
    7091             :                 .name = discard_const_p(char, "nt_length"),
    7092             :                 .get = py_netr_PasswordHistory_get_nt_length,
    7093             :                 .set = py_netr_PasswordHistory_set_nt_length,
    7094             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7095             :         },
    7096             :         {
    7097             :                 .name = discard_const_p(char, "nt_size"),
    7098             :                 .get = py_netr_PasswordHistory_get_nt_size,
    7099             :                 .set = py_netr_PasswordHistory_set_nt_size,
    7100             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7101             :         },
    7102             :         {
    7103             :                 .name = discard_const_p(char, "nt_flags"),
    7104             :                 .get = py_netr_PasswordHistory_get_nt_flags,
    7105             :                 .set = py_netr_PasswordHistory_set_nt_flags,
    7106             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7107             :         },
    7108             :         {
    7109             :                 .name = discard_const_p(char, "lm_length"),
    7110             :                 .get = py_netr_PasswordHistory_get_lm_length,
    7111             :                 .set = py_netr_PasswordHistory_set_lm_length,
    7112             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7113             :         },
    7114             :         {
    7115             :                 .name = discard_const_p(char, "lm_size"),
    7116             :                 .get = py_netr_PasswordHistory_get_lm_size,
    7117             :                 .set = py_netr_PasswordHistory_set_lm_size,
    7118             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7119             :         },
    7120             :         {
    7121             :                 .name = discard_const_p(char, "lm_flags"),
    7122             :                 .get = py_netr_PasswordHistory_get_lm_flags,
    7123             :                 .set = py_netr_PasswordHistory_set_lm_flags,
    7124             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7125             :         },
    7126             :         {
    7127             :                 .name = discard_const_p(char, "nt_history"),
    7128             :                 .get = py_netr_PasswordHistory_get_nt_history,
    7129             :                 .set = py_netr_PasswordHistory_set_nt_history,
    7130             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    7131             :         },
    7132             :         {
    7133             :                 .name = discard_const_p(char, "lm_history"),
    7134             :                 .get = py_netr_PasswordHistory_get_lm_history,
    7135             :                 .set = py_netr_PasswordHistory_set_lm_history,
    7136             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    7137             :         },
    7138             :         { .name = NULL }
    7139             : };
    7140             : 
    7141           0 : static PyObject *py_netr_PasswordHistory_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7142             : {
    7143           0 :         return pytalloc_new(struct netr_PasswordHistory, type);
    7144             : }
    7145             : 
    7146             : 
    7147             : static PyTypeObject netr_PasswordHistory_Type = {
    7148             :         PyVarObject_HEAD_INIT(NULL, 0)
    7149             :         .tp_name = "netlogon.netr_PasswordHistory",
    7150             :         .tp_getset = py_netr_PasswordHistory_getsetters,
    7151             :         .tp_methods = NULL,
    7152             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7153             :         .tp_new = py_netr_PasswordHistory_new,
    7154             : };
    7155             : 
    7156             : 
    7157           0 : static PyObject *py_netr_USER_KEYS2_get_lmpassword(PyObject *obj, void *closure)
    7158             : {
    7159           0 :         struct netr_USER_KEYS2 *object = (struct netr_USER_KEYS2 *)pytalloc_get_ptr(obj);
    7160             :         PyObject *py_lmpassword;
    7161           0 :         py_lmpassword = pytalloc_reference_ex(&netr_USER_KEY16_Type, pytalloc_get_mem_ctx(obj), &object->lmpassword);
    7162           0 :         return py_lmpassword;
    7163             : }
    7164             : 
    7165           0 : static int py_netr_USER_KEYS2_set_lmpassword(PyObject *py_obj, PyObject *value, void *closure)
    7166             : {
    7167           0 :         struct netr_USER_KEYS2 *object = (struct netr_USER_KEYS2 *)pytalloc_get_ptr(py_obj);
    7168           0 :         if (value == NULL) {
    7169           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lmpassword");
    7170           0 :                 return -1;
    7171             :         }
    7172           0 :         PY_CHECK_TYPE(&netr_USER_KEY16_Type, value, return -1;);
    7173           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7174           0 :                 PyErr_NoMemory();
    7175           0 :                 return -1;
    7176             :         }
    7177           0 :         object->lmpassword = *(struct netr_USER_KEY16 *)pytalloc_get_ptr(value);
    7178           0 :         return 0;
    7179             : }
    7180             : 
    7181           0 : static PyObject *py_netr_USER_KEYS2_get_ntpassword(PyObject *obj, void *closure)
    7182             : {
    7183           0 :         struct netr_USER_KEYS2 *object = (struct netr_USER_KEYS2 *)pytalloc_get_ptr(obj);
    7184             :         PyObject *py_ntpassword;
    7185           0 :         py_ntpassword = pytalloc_reference_ex(&netr_USER_KEY16_Type, pytalloc_get_mem_ctx(obj), &object->ntpassword);
    7186           0 :         return py_ntpassword;
    7187             : }
    7188             : 
    7189           0 : static int py_netr_USER_KEYS2_set_ntpassword(PyObject *py_obj, PyObject *value, void *closure)
    7190             : {
    7191           0 :         struct netr_USER_KEYS2 *object = (struct netr_USER_KEYS2 *)pytalloc_get_ptr(py_obj);
    7192           0 :         if (value == NULL) {
    7193           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ntpassword");
    7194           0 :                 return -1;
    7195             :         }
    7196           0 :         PY_CHECK_TYPE(&netr_USER_KEY16_Type, value, return -1;);
    7197           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7198           0 :                 PyErr_NoMemory();
    7199           0 :                 return -1;
    7200             :         }
    7201           0 :         object->ntpassword = *(struct netr_USER_KEY16 *)pytalloc_get_ptr(value);
    7202           0 :         return 0;
    7203             : }
    7204             : 
    7205           0 : static PyObject *py_netr_USER_KEYS2_get_history(PyObject *obj, void *closure)
    7206             : {
    7207           0 :         struct netr_USER_KEYS2 *object = (struct netr_USER_KEYS2 *)pytalloc_get_ptr(obj);
    7208             :         PyObject *py_history;
    7209           0 :         py_history = pytalloc_reference_ex(&netr_PasswordHistory_Type, pytalloc_get_mem_ctx(obj), &object->history);
    7210           0 :         return py_history;
    7211             : }
    7212             : 
    7213           0 : static int py_netr_USER_KEYS2_set_history(PyObject *py_obj, PyObject *value, void *closure)
    7214             : {
    7215           0 :         struct netr_USER_KEYS2 *object = (struct netr_USER_KEYS2 *)pytalloc_get_ptr(py_obj);
    7216           0 :         if (value == NULL) {
    7217           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->history");
    7218           0 :                 return -1;
    7219             :         }
    7220           0 :         PY_CHECK_TYPE(&netr_PasswordHistory_Type, value, return -1;);
    7221           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7222           0 :                 PyErr_NoMemory();
    7223           0 :                 return -1;
    7224             :         }
    7225           0 :         object->history = *(struct netr_PasswordHistory *)pytalloc_get_ptr(value);
    7226           0 :         return 0;
    7227             : }
    7228             : 
    7229             : static PyGetSetDef py_netr_USER_KEYS2_getsetters[] = {
    7230             :         {
    7231             :                 .name = discard_const_p(char, "lmpassword"),
    7232             :                 .get = py_netr_USER_KEYS2_get_lmpassword,
    7233             :                 .set = py_netr_USER_KEYS2_set_lmpassword,
    7234             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_KEY16")
    7235             :         },
    7236             :         {
    7237             :                 .name = discard_const_p(char, "ntpassword"),
    7238             :                 .get = py_netr_USER_KEYS2_get_ntpassword,
    7239             :                 .set = py_netr_USER_KEYS2_set_ntpassword,
    7240             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_KEY16")
    7241             :         },
    7242             :         {
    7243             :                 .name = discard_const_p(char, "history"),
    7244             :                 .get = py_netr_USER_KEYS2_get_history,
    7245             :                 .set = py_netr_USER_KEYS2_set_history,
    7246             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_PasswordHistory")
    7247             :         },
    7248             :         { .name = NULL }
    7249             : };
    7250             : 
    7251           0 : static PyObject *py_netr_USER_KEYS2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7252             : {
    7253           0 :         return pytalloc_new(struct netr_USER_KEYS2, type);
    7254             : }
    7255             : 
    7256             : 
    7257             : static PyTypeObject netr_USER_KEYS2_Type = {
    7258             :         PyVarObject_HEAD_INIT(NULL, 0)
    7259             :         .tp_name = "netlogon.netr_USER_KEYS2",
    7260             :         .tp_getset = py_netr_USER_KEYS2_getsetters,
    7261             :         .tp_methods = NULL,
    7262             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7263             :         .tp_new = py_netr_USER_KEYS2_new,
    7264             : };
    7265             : 
    7266             : 
    7267           0 : static PyObject *py_netr_USER_KEY_UNION_get_keys2(PyObject *obj, void *closure)
    7268             : {
    7269           0 :         struct netr_USER_KEY_UNION *object = (struct netr_USER_KEY_UNION *)pytalloc_get_ptr(obj);
    7270             :         PyObject *py_keys2;
    7271           0 :         py_keys2 = pytalloc_reference_ex(&netr_USER_KEYS2_Type, pytalloc_get_mem_ctx(obj), &object->keys2);
    7272           0 :         return py_keys2;
    7273             : }
    7274             : 
    7275           0 : static int py_netr_USER_KEY_UNION_set_keys2(PyObject *py_obj, PyObject *value, void *closure)
    7276             : {
    7277           0 :         struct netr_USER_KEY_UNION *object = (struct netr_USER_KEY_UNION *)pytalloc_get_ptr(py_obj);
    7278           0 :         if (value == NULL) {
    7279           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->keys2");
    7280           0 :                 return -1;
    7281             :         }
    7282           0 :         PY_CHECK_TYPE(&netr_USER_KEYS2_Type, value, return -1;);
    7283           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7284           0 :                 PyErr_NoMemory();
    7285           0 :                 return -1;
    7286             :         }
    7287           0 :         object->keys2 = *(struct netr_USER_KEYS2 *)pytalloc_get_ptr(value);
    7288           0 :         return 0;
    7289             : }
    7290             : 
    7291             : static PyGetSetDef py_netr_USER_KEY_UNION_getsetters[] = {
    7292             :         {
    7293             :                 .name = discard_const_p(char, "keys2"),
    7294             :                 .get = py_netr_USER_KEY_UNION_get_keys2,
    7295             :                 .set = py_netr_USER_KEY_UNION_set_keys2,
    7296             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_KEYS2")
    7297             :         },
    7298             :         { .name = NULL }
    7299             : };
    7300             : 
    7301           0 : static PyObject *py_netr_USER_KEY_UNION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7302             : {
    7303           0 :         return pytalloc_new(struct netr_USER_KEY_UNION, type);
    7304             : }
    7305             : 
    7306             : 
    7307             : static PyTypeObject netr_USER_KEY_UNION_Type = {
    7308             :         PyVarObject_HEAD_INIT(NULL, 0)
    7309             :         .tp_name = "netlogon.netr_USER_KEY_UNION",
    7310             :         .tp_getset = py_netr_USER_KEY_UNION_getsetters,
    7311             :         .tp_methods = NULL,
    7312             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7313             :         .tp_new = py_netr_USER_KEY_UNION_new,
    7314             : };
    7315             : 
    7316             : 
    7317           0 : static PyObject *py_netr_USER_KEYS_get_version(PyObject *obj, void *closure)
    7318             : {
    7319           0 :         struct netr_USER_KEYS *object = (struct netr_USER_KEYS *)pytalloc_get_ptr(obj);
    7320             :         PyObject *py_version;
    7321           0 :         py_version = PyLong_FromUnsignedLongLong((uint32_t)object->version);
    7322           0 :         return py_version;
    7323             : }
    7324             : 
    7325           0 : static int py_netr_USER_KEYS_set_version(PyObject *py_obj, PyObject *value, void *closure)
    7326             : {
    7327           0 :         struct netr_USER_KEYS *object = (struct netr_USER_KEYS *)pytalloc_get_ptr(py_obj);
    7328           0 :         if (value == NULL) {
    7329           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
    7330           0 :                 return -1;
    7331             :         }
    7332             :         {
    7333           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
    7334           0 :                 if (PyLong_Check(value)) {
    7335             :                         unsigned long long test_var;
    7336           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7337           0 :                         if (PyErr_Occurred() != NULL) {
    7338           0 :                                 return -1;
    7339             :                         }
    7340           0 :                         if (test_var > uint_max) {
    7341           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    7342             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7343           0 :                                 return -1;
    7344             :                         }
    7345           0 :                         object->version = test_var;
    7346             :                 } else {
    7347           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    7348             :                           PyLong_Type.tp_name);
    7349           0 :                         return -1;
    7350             :                 }
    7351             :         }
    7352           0 :         return 0;
    7353             : }
    7354             : 
    7355           0 : static PyObject *py_netr_USER_KEYS_get_keys(PyObject *obj, void *closure)
    7356             : {
    7357           0 :         struct netr_USER_KEYS *object = (struct netr_USER_KEYS *)pytalloc_get_ptr(obj);
    7358             :         PyObject *py_keys;
    7359           0 :         py_keys = pytalloc_reference_ex(&netr_USER_KEY_UNION_Type, pytalloc_get_mem_ctx(obj), &object->keys);
    7360           0 :         return py_keys;
    7361             : }
    7362             : 
    7363           0 : static int py_netr_USER_KEYS_set_keys(PyObject *py_obj, PyObject *value, void *closure)
    7364             : {
    7365           0 :         struct netr_USER_KEYS *object = (struct netr_USER_KEYS *)pytalloc_get_ptr(py_obj);
    7366           0 :         if (value == NULL) {
    7367           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->keys");
    7368           0 :                 return -1;
    7369             :         }
    7370           0 :         PY_CHECK_TYPE(&netr_USER_KEY_UNION_Type, value, return -1;);
    7371           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7372           0 :                 PyErr_NoMemory();
    7373           0 :                 return -1;
    7374             :         }
    7375           0 :         object->keys = *(struct netr_USER_KEY_UNION *)pytalloc_get_ptr(value);
    7376           0 :         return 0;
    7377             : }
    7378             : 
    7379             : static PyGetSetDef py_netr_USER_KEYS_getsetters[] = {
    7380             :         {
    7381             :                 .name = discard_const_p(char, "version"),
    7382             :                 .get = py_netr_USER_KEYS_get_version,
    7383             :                 .set = py_netr_USER_KEYS_set_version,
    7384             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7385             :         },
    7386             :         {
    7387             :                 .name = discard_const_p(char, "keys"),
    7388             :                 .get = py_netr_USER_KEYS_get_keys,
    7389             :                 .set = py_netr_USER_KEYS_set_keys,
    7390             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_KEY_UNION")
    7391             :         },
    7392             :         { .name = NULL }
    7393             : };
    7394             : 
    7395           0 : static PyObject *py_netr_USER_KEYS_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7396             : {
    7397           0 :         return pytalloc_new(struct netr_USER_KEYS, type);
    7398             : }
    7399             : 
    7400           0 : static PyObject *py_netr_USER_KEYS_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    7401             : {
    7402           0 :         struct netr_USER_KEYS *object = (struct netr_USER_KEYS *)pytalloc_get_ptr(py_obj);
    7403           0 :         PyObject *ret = NULL;
    7404             :         DATA_BLOB blob;
    7405             :         enum ndr_err_code err;
    7406           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    7407           0 :         if (tmp_ctx == NULL) {
    7408           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    7409           0 :                 return NULL;
    7410             :         }
    7411           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_USER_KEYS);
    7412           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7413           0 :                 TALLOC_FREE(tmp_ctx);
    7414           0 :                 PyErr_SetNdrError(err);
    7415           0 :                 return NULL;
    7416             :         }
    7417             : 
    7418           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    7419           0 :         TALLOC_FREE(tmp_ctx);
    7420           0 :         return ret;
    7421             : }
    7422             : 
    7423           0 : static PyObject *py_netr_USER_KEYS_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7424             : {
    7425           0 :         struct netr_USER_KEYS *object = (struct netr_USER_KEYS *)pytalloc_get_ptr(py_obj);
    7426           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    7427           0 :         Py_ssize_t blob_length = 0;
    7428             :         enum ndr_err_code err;
    7429           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    7430           0 :         PyObject *allow_remaining_obj = NULL;
    7431           0 :         bool allow_remaining = false;
    7432             : 
    7433           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    7434             :                 discard_const_p(char *, kwnames),
    7435             :                 &blob.data, &blob_length,
    7436             :                 &allow_remaining_obj)) {
    7437           0 :                 return NULL;
    7438             :         }
    7439           0 :         blob.length = blob_length;
    7440             : 
    7441           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7442           0 :                 allow_remaining = true;
    7443             :         }
    7444             : 
    7445           0 :         if (allow_remaining) {
    7446           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_USER_KEYS);
    7447             :         } else {
    7448           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_USER_KEYS);
    7449             :         }
    7450           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7451           0 :                 PyErr_SetNdrError(err);
    7452           0 :                 return NULL;
    7453             :         }
    7454             : 
    7455           0 :         Py_RETURN_NONE;
    7456             : }
    7457             : 
    7458           0 : static PyObject *py_netr_USER_KEYS_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7459             : {
    7460           0 :         struct netr_USER_KEYS *object = (struct netr_USER_KEYS *)pytalloc_get_ptr(py_obj);
    7461             :         PyObject *ret;
    7462             :         char *retstr;
    7463             : 
    7464           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_USER_KEYS, "netr_USER_KEYS", object);
    7465           0 :         ret = PyUnicode_FromString(retstr);
    7466           0 :         talloc_free(retstr);
    7467             : 
    7468           0 :         return ret;
    7469             : }
    7470             : 
    7471             : static PyMethodDef py_netr_USER_KEYS_methods[] = {
    7472             :         { "__ndr_pack__", (PyCFunction)py_netr_USER_KEYS_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    7473             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_USER_KEYS_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    7474             :         { "__ndr_print__", (PyCFunction)py_netr_USER_KEYS_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    7475             :         { NULL, NULL, 0, NULL }
    7476             : };
    7477             : 
    7478             : 
    7479             : static PyTypeObject netr_USER_KEYS_Type = {
    7480             :         PyVarObject_HEAD_INIT(NULL, 0)
    7481             :         .tp_name = "netlogon.netr_USER_KEYS",
    7482             :         .tp_getset = py_netr_USER_KEYS_getsetters,
    7483             :         .tp_methods = py_netr_USER_KEYS_methods,
    7484             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7485             :         .tp_new = py_netr_USER_KEYS_new,
    7486             : };
    7487             : 
    7488             : 
    7489           0 : static PyObject *py_netr_USER_PRIVATE_INFO_get_SensitiveDataFlag(PyObject *obj, void *closure)
    7490             : {
    7491           0 :         struct netr_USER_PRIVATE_INFO *object = (struct netr_USER_PRIVATE_INFO *)pytalloc_get_ptr(obj);
    7492             :         PyObject *py_SensitiveDataFlag;
    7493           0 :         py_SensitiveDataFlag = PyLong_FromLong((uint16_t)object->SensitiveDataFlag);
    7494           0 :         return py_SensitiveDataFlag;
    7495             : }
    7496             : 
    7497           0 : static int py_netr_USER_PRIVATE_INFO_set_SensitiveDataFlag(PyObject *py_obj, PyObject *value, void *closure)
    7498             : {
    7499           0 :         struct netr_USER_PRIVATE_INFO *object = (struct netr_USER_PRIVATE_INFO *)pytalloc_get_ptr(py_obj);
    7500           0 :         if (value == NULL) {
    7501           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SensitiveDataFlag");
    7502           0 :                 return -1;
    7503             :         }
    7504             :         {
    7505           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SensitiveDataFlag));
    7506           0 :                 if (PyLong_Check(value)) {
    7507             :                         unsigned long long test_var;
    7508           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7509           0 :                         if (PyErr_Occurred() != NULL) {
    7510           0 :                                 return -1;
    7511             :                         }
    7512           0 :                         if (test_var > uint_max) {
    7513           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    7514             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7515           0 :                                 return -1;
    7516             :                         }
    7517           0 :                         object->SensitiveDataFlag = test_var;
    7518             :                 } else {
    7519           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    7520             :                           PyLong_Type.tp_name);
    7521           0 :                         return -1;
    7522             :                 }
    7523             :         }
    7524           0 :         return 0;
    7525             : }
    7526             : 
    7527           0 : static PyObject *py_netr_USER_PRIVATE_INFO_get_DataLength(PyObject *obj, void *closure)
    7528             : {
    7529           0 :         struct netr_USER_PRIVATE_INFO *object = (struct netr_USER_PRIVATE_INFO *)pytalloc_get_ptr(obj);
    7530             :         PyObject *py_DataLength;
    7531           0 :         py_DataLength = PyLong_FromUnsignedLongLong((uint32_t)object->DataLength);
    7532           0 :         return py_DataLength;
    7533             : }
    7534             : 
    7535           0 : static int py_netr_USER_PRIVATE_INFO_set_DataLength(PyObject *py_obj, PyObject *value, void *closure)
    7536             : {
    7537           0 :         struct netr_USER_PRIVATE_INFO *object = (struct netr_USER_PRIVATE_INFO *)pytalloc_get_ptr(py_obj);
    7538           0 :         if (value == NULL) {
    7539           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->DataLength");
    7540           0 :                 return -1;
    7541             :         }
    7542             :         {
    7543           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->DataLength));
    7544           0 :                 if (PyLong_Check(value)) {
    7545             :                         unsigned long long test_var;
    7546           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7547           0 :                         if (PyErr_Occurred() != NULL) {
    7548           0 :                                 return -1;
    7549             :                         }
    7550           0 :                         if (test_var > uint_max) {
    7551           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    7552             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7553           0 :                                 return -1;
    7554             :                         }
    7555           0 :                         object->DataLength = test_var;
    7556             :                 } else {
    7557           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    7558             :                           PyLong_Type.tp_name);
    7559           0 :                         return -1;
    7560             :                 }
    7561             :         }
    7562           0 :         return 0;
    7563             : }
    7564             : 
    7565           0 : static PyObject *py_netr_USER_PRIVATE_INFO_get_SensitiveData(PyObject *obj, void *closure)
    7566             : {
    7567           0 :         struct netr_USER_PRIVATE_INFO *object = (struct netr_USER_PRIVATE_INFO *)pytalloc_get_ptr(obj);
    7568             :         PyObject *py_SensitiveData;
    7569           0 :         if (object->SensitiveData == NULL) {
    7570           0 :                 Py_RETURN_NONE;
    7571             :         }
    7572           0 :         if (object->SensitiveData == NULL) {
    7573           0 :                 py_SensitiveData = Py_None;
    7574           0 :                 Py_INCREF(py_SensitiveData);
    7575             :         } else {
    7576           0 :                 py_SensitiveData = PyList_New(object->DataLength);
    7577           0 :                 if (py_SensitiveData == NULL) {
    7578           0 :                         return NULL;
    7579             :                 }
    7580             :                 {
    7581             :                         int SensitiveData_cntr_1;
    7582           0 :                         for (SensitiveData_cntr_1 = 0; SensitiveData_cntr_1 < (object->DataLength); SensitiveData_cntr_1++) {
    7583             :                                 PyObject *py_SensitiveData_1;
    7584           0 :                                 py_SensitiveData_1 = PyLong_FromLong((uint16_t)object->SensitiveData[SensitiveData_cntr_1]);
    7585           0 :                                 PyList_SetItem(py_SensitiveData, SensitiveData_cntr_1, py_SensitiveData_1);
    7586             :                         }
    7587             :                 }
    7588             :         }
    7589           0 :         return py_SensitiveData;
    7590             : }
    7591             : 
    7592           0 : static int py_netr_USER_PRIVATE_INFO_set_SensitiveData(PyObject *py_obj, PyObject *value, void *closure)
    7593             : {
    7594           0 :         struct netr_USER_PRIVATE_INFO *object = (struct netr_USER_PRIVATE_INFO *)pytalloc_get_ptr(py_obj);
    7595           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->SensitiveData));
    7596           0 :         if (value == NULL) {
    7597           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SensitiveData");
    7598           0 :                 return -1;
    7599             :         }
    7600           0 :         if (value == Py_None) {
    7601           0 :                 object->SensitiveData = NULL;
    7602             :         } else {
    7603           0 :                 object->SensitiveData = NULL;
    7604           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    7605             :                 {
    7606             :                         int SensitiveData_cntr_1;
    7607           0 :                         object->SensitiveData = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->SensitiveData, PyList_GET_SIZE(value));
    7608           0 :                         if (!object->SensitiveData) { return -1;; }
    7609           0 :                         talloc_set_name_const(object->SensitiveData, "ARRAY: object->SensitiveData");
    7610           0 :                         for (SensitiveData_cntr_1 = 0; SensitiveData_cntr_1 < PyList_GET_SIZE(value); SensitiveData_cntr_1++) {
    7611           0 :                                 if (PyList_GET_ITEM(value, SensitiveData_cntr_1) == NULL) {
    7612           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SensitiveData[SensitiveData_cntr_1]");
    7613           0 :                                         return -1;
    7614             :                                 }
    7615             :                                 {
    7616           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SensitiveData[SensitiveData_cntr_1]));
    7617           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, SensitiveData_cntr_1))) {
    7618             :                                                 unsigned long long test_var;
    7619           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, SensitiveData_cntr_1));
    7620           0 :                                                 if (PyErr_Occurred() != NULL) {
    7621           0 :                                                         return -1;
    7622             :                                                 }
    7623           0 :                                                 if (test_var > uint_max) {
    7624           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    7625             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    7626           0 :                                                         return -1;
    7627             :                                                 }
    7628           0 :                                                 object->SensitiveData[SensitiveData_cntr_1] = test_var;
    7629             :                                         } else {
    7630           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",\
    7631             :                                                   PyLong_Type.tp_name);
    7632           0 :                                                 return -1;
    7633             :                                         }
    7634             :                                 }
    7635             :                         }
    7636             :                 }
    7637             :         }
    7638           0 :         return 0;
    7639             : }
    7640             : 
    7641             : static PyGetSetDef py_netr_USER_PRIVATE_INFO_getsetters[] = {
    7642             :         {
    7643             :                 .name = discard_const_p(char, "SensitiveDataFlag"),
    7644             :                 .get = py_netr_USER_PRIVATE_INFO_get_SensitiveDataFlag,
    7645             :                 .set = py_netr_USER_PRIVATE_INFO_set_SensitiveDataFlag,
    7646             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    7647             :         },
    7648             :         {
    7649             :                 .name = discard_const_p(char, "DataLength"),
    7650             :                 .get = py_netr_USER_PRIVATE_INFO_get_DataLength,
    7651             :                 .set = py_netr_USER_PRIVATE_INFO_set_DataLength,
    7652             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7653             :         },
    7654             :         {
    7655             :                 .name = discard_const_p(char, "SensitiveData"),
    7656             :                 .get = py_netr_USER_PRIVATE_INFO_get_SensitiveData,
    7657             :                 .set = py_netr_USER_PRIVATE_INFO_set_SensitiveData,
    7658             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    7659             :         },
    7660             :         { .name = NULL }
    7661             : };
    7662             : 
    7663           0 : static PyObject *py_netr_USER_PRIVATE_INFO_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7664             : {
    7665           0 :         return pytalloc_new(struct netr_USER_PRIVATE_INFO, type);
    7666             : }
    7667             : 
    7668             : 
    7669             : static PyTypeObject netr_USER_PRIVATE_INFO_Type = {
    7670             :         PyVarObject_HEAD_INIT(NULL, 0)
    7671             :         .tp_name = "netlogon.netr_USER_PRIVATE_INFO",
    7672             :         .tp_getset = py_netr_USER_PRIVATE_INFO_getsetters,
    7673             :         .tp_methods = NULL,
    7674             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7675             :         .tp_new = py_netr_USER_PRIVATE_INFO_new,
    7676             : };
    7677             : 
    7678             : 
    7679           0 : static PyObject *py_netr_DELTA_USER_get_account_name(PyObject *obj, void *closure)
    7680             : {
    7681           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7682             :         PyObject *py_account_name;
    7683           0 :         py_account_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->account_name);
    7684           0 :         return py_account_name;
    7685             : }
    7686             : 
    7687           0 : static int py_netr_DELTA_USER_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
    7688             : {
    7689           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7690           0 :         if (value == NULL) {
    7691           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->account_name");
    7692           0 :                 return -1;
    7693             :         }
    7694           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    7695           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7696           0 :                 PyErr_NoMemory();
    7697           0 :                 return -1;
    7698             :         }
    7699           0 :         object->account_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    7700           0 :         return 0;
    7701             : }
    7702             : 
    7703           0 : static PyObject *py_netr_DELTA_USER_get_full_name(PyObject *obj, void *closure)
    7704             : {
    7705           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7706             :         PyObject *py_full_name;
    7707           0 :         py_full_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->full_name);
    7708           0 :         return py_full_name;
    7709             : }
    7710             : 
    7711           0 : static int py_netr_DELTA_USER_set_full_name(PyObject *py_obj, PyObject *value, void *closure)
    7712             : {
    7713           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7714           0 :         if (value == NULL) {
    7715           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->full_name");
    7716           0 :                 return -1;
    7717             :         }
    7718           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    7719           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7720           0 :                 PyErr_NoMemory();
    7721           0 :                 return -1;
    7722             :         }
    7723           0 :         object->full_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    7724           0 :         return 0;
    7725             : }
    7726             : 
    7727           0 : static PyObject *py_netr_DELTA_USER_get_rid(PyObject *obj, void *closure)
    7728             : {
    7729           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7730             :         PyObject *py_rid;
    7731           0 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)object->rid);
    7732           0 :         return py_rid;
    7733             : }
    7734             : 
    7735           0 : static int py_netr_DELTA_USER_set_rid(PyObject *py_obj, PyObject *value, void *closure)
    7736             : {
    7737           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7738           0 :         if (value == NULL) {
    7739           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rid");
    7740           0 :                 return -1;
    7741             :         }
    7742             :         {
    7743           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rid));
    7744           0 :                 if (PyLong_Check(value)) {
    7745             :                         unsigned long long test_var;
    7746           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7747           0 :                         if (PyErr_Occurred() != NULL) {
    7748           0 :                                 return -1;
    7749             :                         }
    7750           0 :                         if (test_var > uint_max) {
    7751           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    7752             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7753           0 :                                 return -1;
    7754             :                         }
    7755           0 :                         object->rid = test_var;
    7756             :                 } else {
    7757           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    7758             :                           PyLong_Type.tp_name);
    7759           0 :                         return -1;
    7760             :                 }
    7761             :         }
    7762           0 :         return 0;
    7763             : }
    7764             : 
    7765           0 : static PyObject *py_netr_DELTA_USER_get_primary_gid(PyObject *obj, void *closure)
    7766             : {
    7767           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7768             :         PyObject *py_primary_gid;
    7769           0 :         py_primary_gid = PyLong_FromUnsignedLongLong((uint32_t)object->primary_gid);
    7770           0 :         return py_primary_gid;
    7771             : }
    7772             : 
    7773           0 : static int py_netr_DELTA_USER_set_primary_gid(PyObject *py_obj, PyObject *value, void *closure)
    7774             : {
    7775           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7776           0 :         if (value == NULL) {
    7777           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->primary_gid");
    7778           0 :                 return -1;
    7779             :         }
    7780             :         {
    7781           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->primary_gid));
    7782           0 :                 if (PyLong_Check(value)) {
    7783             :                         unsigned long long test_var;
    7784           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7785           0 :                         if (PyErr_Occurred() != NULL) {
    7786           0 :                                 return -1;
    7787             :                         }
    7788           0 :                         if (test_var > uint_max) {
    7789           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    7790             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7791           0 :                                 return -1;
    7792             :                         }
    7793           0 :                         object->primary_gid = test_var;
    7794             :                 } else {
    7795           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    7796             :                           PyLong_Type.tp_name);
    7797           0 :                         return -1;
    7798             :                 }
    7799             :         }
    7800           0 :         return 0;
    7801             : }
    7802             : 
    7803           0 : static PyObject *py_netr_DELTA_USER_get_home_directory(PyObject *obj, void *closure)
    7804             : {
    7805           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7806             :         PyObject *py_home_directory;
    7807           0 :         py_home_directory = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->home_directory);
    7808           0 :         return py_home_directory;
    7809             : }
    7810             : 
    7811           0 : static int py_netr_DELTA_USER_set_home_directory(PyObject *py_obj, PyObject *value, void *closure)
    7812             : {
    7813           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7814           0 :         if (value == NULL) {
    7815           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->home_directory");
    7816           0 :                 return -1;
    7817             :         }
    7818           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    7819           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7820           0 :                 PyErr_NoMemory();
    7821           0 :                 return -1;
    7822             :         }
    7823           0 :         object->home_directory = *(struct lsa_String *)pytalloc_get_ptr(value);
    7824           0 :         return 0;
    7825             : }
    7826             : 
    7827           0 : static PyObject *py_netr_DELTA_USER_get_home_drive(PyObject *obj, void *closure)
    7828             : {
    7829           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7830             :         PyObject *py_home_drive;
    7831           0 :         py_home_drive = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->home_drive);
    7832           0 :         return py_home_drive;
    7833             : }
    7834             : 
    7835           0 : static int py_netr_DELTA_USER_set_home_drive(PyObject *py_obj, PyObject *value, void *closure)
    7836             : {
    7837           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7838           0 :         if (value == NULL) {
    7839           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->home_drive");
    7840           0 :                 return -1;
    7841             :         }
    7842           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    7843           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7844           0 :                 PyErr_NoMemory();
    7845           0 :                 return -1;
    7846             :         }
    7847           0 :         object->home_drive = *(struct lsa_String *)pytalloc_get_ptr(value);
    7848           0 :         return 0;
    7849             : }
    7850             : 
    7851           0 : static PyObject *py_netr_DELTA_USER_get_logon_script(PyObject *obj, void *closure)
    7852             : {
    7853           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7854             :         PyObject *py_logon_script;
    7855           0 :         py_logon_script = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->logon_script);
    7856           0 :         return py_logon_script;
    7857             : }
    7858             : 
    7859           0 : static int py_netr_DELTA_USER_set_logon_script(PyObject *py_obj, PyObject *value, void *closure)
    7860             : {
    7861           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7862           0 :         if (value == NULL) {
    7863           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_script");
    7864           0 :                 return -1;
    7865             :         }
    7866           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    7867           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7868           0 :                 PyErr_NoMemory();
    7869           0 :                 return -1;
    7870             :         }
    7871           0 :         object->logon_script = *(struct lsa_String *)pytalloc_get_ptr(value);
    7872           0 :         return 0;
    7873             : }
    7874             : 
    7875           0 : static PyObject *py_netr_DELTA_USER_get_description(PyObject *obj, void *closure)
    7876             : {
    7877           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7878             :         PyObject *py_description;
    7879           0 :         py_description = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->description);
    7880           0 :         return py_description;
    7881             : }
    7882             : 
    7883           0 : static int py_netr_DELTA_USER_set_description(PyObject *py_obj, PyObject *value, void *closure)
    7884             : {
    7885           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7886           0 :         if (value == NULL) {
    7887           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->description");
    7888           0 :                 return -1;
    7889             :         }
    7890           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    7891           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7892           0 :                 PyErr_NoMemory();
    7893           0 :                 return -1;
    7894             :         }
    7895           0 :         object->description = *(struct lsa_String *)pytalloc_get_ptr(value);
    7896           0 :         return 0;
    7897             : }
    7898             : 
    7899           0 : static PyObject *py_netr_DELTA_USER_get_workstations(PyObject *obj, void *closure)
    7900             : {
    7901           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7902             :         PyObject *py_workstations;
    7903           0 :         py_workstations = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->workstations);
    7904           0 :         return py_workstations;
    7905             : }
    7906             : 
    7907           0 : static int py_netr_DELTA_USER_set_workstations(PyObject *py_obj, PyObject *value, void *closure)
    7908             : {
    7909           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7910           0 :         if (value == NULL) {
    7911           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->workstations");
    7912           0 :                 return -1;
    7913             :         }
    7914           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    7915           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7916           0 :                 PyErr_NoMemory();
    7917           0 :                 return -1;
    7918             :         }
    7919           0 :         object->workstations = *(struct lsa_String *)pytalloc_get_ptr(value);
    7920           0 :         return 0;
    7921             : }
    7922             : 
    7923           0 : static PyObject *py_netr_DELTA_USER_get_last_logon(PyObject *obj, void *closure)
    7924             : {
    7925           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7926             :         PyObject *py_last_logon;
    7927           0 :         py_last_logon = PyLong_FromUnsignedLongLong(object->last_logon);
    7928           0 :         return py_last_logon;
    7929             : }
    7930             : 
    7931           0 : static int py_netr_DELTA_USER_set_last_logon(PyObject *py_obj, PyObject *value, void *closure)
    7932             : {
    7933           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7934           0 :         if (value == NULL) {
    7935           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_logon");
    7936           0 :                 return -1;
    7937             :         }
    7938             :         {
    7939           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_logon));
    7940           0 :                 if (PyLong_Check(value)) {
    7941             :                         unsigned long long test_var;
    7942           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7943           0 :                         if (PyErr_Occurred() != NULL) {
    7944           0 :                                 return -1;
    7945             :                         }
    7946           0 :                         if (test_var > uint_max) {
    7947           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    7948             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7949           0 :                                 return -1;
    7950             :                         }
    7951           0 :                         object->last_logon = test_var;
    7952             :                 } else {
    7953           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    7954             :                           PyLong_Type.tp_name);
    7955           0 :                         return -1;
    7956             :                 }
    7957             :         }
    7958           0 :         return 0;
    7959             : }
    7960             : 
    7961           0 : static PyObject *py_netr_DELTA_USER_get_last_logoff(PyObject *obj, void *closure)
    7962             : {
    7963           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    7964             :         PyObject *py_last_logoff;
    7965           0 :         py_last_logoff = PyLong_FromUnsignedLongLong(object->last_logoff);
    7966           0 :         return py_last_logoff;
    7967             : }
    7968             : 
    7969           0 : static int py_netr_DELTA_USER_set_last_logoff(PyObject *py_obj, PyObject *value, void *closure)
    7970             : {
    7971           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    7972           0 :         if (value == NULL) {
    7973           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_logoff");
    7974           0 :                 return -1;
    7975             :         }
    7976             :         {
    7977           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_logoff));
    7978           0 :                 if (PyLong_Check(value)) {
    7979             :                         unsigned long long test_var;
    7980           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7981           0 :                         if (PyErr_Occurred() != NULL) {
    7982           0 :                                 return -1;
    7983             :                         }
    7984           0 :                         if (test_var > uint_max) {
    7985           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    7986             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7987           0 :                                 return -1;
    7988             :                         }
    7989           0 :                         object->last_logoff = test_var;
    7990             :                 } else {
    7991           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    7992             :                           PyLong_Type.tp_name);
    7993           0 :                         return -1;
    7994             :                 }
    7995             :         }
    7996           0 :         return 0;
    7997             : }
    7998             : 
    7999           0 : static PyObject *py_netr_DELTA_USER_get_logon_hours(PyObject *obj, void *closure)
    8000             : {
    8001           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8002             :         PyObject *py_logon_hours;
    8003           0 :         py_logon_hours = pytalloc_reference_ex(samr_LogonHours_Type, pytalloc_get_mem_ctx(obj), &object->logon_hours);
    8004           0 :         return py_logon_hours;
    8005             : }
    8006             : 
    8007           0 : static int py_netr_DELTA_USER_set_logon_hours(PyObject *py_obj, PyObject *value, void *closure)
    8008             : {
    8009           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8010           0 :         if (value == NULL) {
    8011           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_hours");
    8012           0 :                 return -1;
    8013             :         }
    8014           0 :         PY_CHECK_TYPE(samr_LogonHours_Type, value, return -1;);
    8015           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8016           0 :                 PyErr_NoMemory();
    8017           0 :                 return -1;
    8018             :         }
    8019           0 :         object->logon_hours = *(struct samr_LogonHours *)pytalloc_get_ptr(value);
    8020           0 :         return 0;
    8021             : }
    8022             : 
    8023           0 : static PyObject *py_netr_DELTA_USER_get_bad_password_count(PyObject *obj, void *closure)
    8024             : {
    8025           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8026             :         PyObject *py_bad_password_count;
    8027           0 :         py_bad_password_count = PyLong_FromLong((uint16_t)object->bad_password_count);
    8028           0 :         return py_bad_password_count;
    8029             : }
    8030             : 
    8031           0 : static int py_netr_DELTA_USER_set_bad_password_count(PyObject *py_obj, PyObject *value, void *closure)
    8032             : {
    8033           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8034           0 :         if (value == NULL) {
    8035           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bad_password_count");
    8036           0 :                 return -1;
    8037             :         }
    8038             :         {
    8039           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bad_password_count));
    8040           0 :                 if (PyLong_Check(value)) {
    8041             :                         unsigned long long test_var;
    8042           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8043           0 :                         if (PyErr_Occurred() != NULL) {
    8044           0 :                                 return -1;
    8045             :                         }
    8046           0 :                         if (test_var > uint_max) {
    8047           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8048             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8049           0 :                                 return -1;
    8050             :                         }
    8051           0 :                         object->bad_password_count = test_var;
    8052             :                 } else {
    8053           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8054             :                           PyLong_Type.tp_name);
    8055           0 :                         return -1;
    8056             :                 }
    8057             :         }
    8058           0 :         return 0;
    8059             : }
    8060             : 
    8061           0 : static PyObject *py_netr_DELTA_USER_get_logon_count(PyObject *obj, void *closure)
    8062             : {
    8063           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8064             :         PyObject *py_logon_count;
    8065           0 :         py_logon_count = PyLong_FromLong((uint16_t)object->logon_count);
    8066           0 :         return py_logon_count;
    8067             : }
    8068             : 
    8069           0 : static int py_netr_DELTA_USER_set_logon_count(PyObject *py_obj, PyObject *value, void *closure)
    8070             : {
    8071           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8072           0 :         if (value == NULL) {
    8073           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_count");
    8074           0 :                 return -1;
    8075             :         }
    8076             :         {
    8077           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_count));
    8078           0 :                 if (PyLong_Check(value)) {
    8079             :                         unsigned long long test_var;
    8080           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8081           0 :                         if (PyErr_Occurred() != NULL) {
    8082           0 :                                 return -1;
    8083             :                         }
    8084           0 :                         if (test_var > uint_max) {
    8085           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8086             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8087           0 :                                 return -1;
    8088             :                         }
    8089           0 :                         object->logon_count = test_var;
    8090             :                 } else {
    8091           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8092             :                           PyLong_Type.tp_name);
    8093           0 :                         return -1;
    8094             :                 }
    8095             :         }
    8096           0 :         return 0;
    8097             : }
    8098             : 
    8099           0 : static PyObject *py_netr_DELTA_USER_get_last_password_change(PyObject *obj, void *closure)
    8100             : {
    8101           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8102             :         PyObject *py_last_password_change;
    8103           0 :         py_last_password_change = PyLong_FromUnsignedLongLong(object->last_password_change);
    8104           0 :         return py_last_password_change;
    8105             : }
    8106             : 
    8107           0 : static int py_netr_DELTA_USER_set_last_password_change(PyObject *py_obj, PyObject *value, void *closure)
    8108             : {
    8109           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8110           0 :         if (value == NULL) {
    8111           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_password_change");
    8112           0 :                 return -1;
    8113             :         }
    8114             :         {
    8115           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_password_change));
    8116           0 :                 if (PyLong_Check(value)) {
    8117             :                         unsigned long long test_var;
    8118           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8119           0 :                         if (PyErr_Occurred() != NULL) {
    8120           0 :                                 return -1;
    8121             :                         }
    8122           0 :                         if (test_var > uint_max) {
    8123           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8124             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8125           0 :                                 return -1;
    8126             :                         }
    8127           0 :                         object->last_password_change = test_var;
    8128             :                 } else {
    8129           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8130             :                           PyLong_Type.tp_name);
    8131           0 :                         return -1;
    8132             :                 }
    8133             :         }
    8134           0 :         return 0;
    8135             : }
    8136             : 
    8137           0 : static PyObject *py_netr_DELTA_USER_get_acct_expiry(PyObject *obj, void *closure)
    8138             : {
    8139           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8140             :         PyObject *py_acct_expiry;
    8141           0 :         py_acct_expiry = PyLong_FromUnsignedLongLong(object->acct_expiry);
    8142           0 :         return py_acct_expiry;
    8143             : }
    8144             : 
    8145           0 : static int py_netr_DELTA_USER_set_acct_expiry(PyObject *py_obj, PyObject *value, void *closure)
    8146             : {
    8147           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8148           0 :         if (value == NULL) {
    8149           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->acct_expiry");
    8150           0 :                 return -1;
    8151             :         }
    8152             :         {
    8153           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acct_expiry));
    8154           0 :                 if (PyLong_Check(value)) {
    8155             :                         unsigned long long test_var;
    8156           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8157           0 :                         if (PyErr_Occurred() != NULL) {
    8158           0 :                                 return -1;
    8159             :                         }
    8160           0 :                         if (test_var > uint_max) {
    8161           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8162             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8163           0 :                                 return -1;
    8164             :                         }
    8165           0 :                         object->acct_expiry = test_var;
    8166             :                 } else {
    8167           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8168             :                           PyLong_Type.tp_name);
    8169           0 :                         return -1;
    8170             :                 }
    8171             :         }
    8172           0 :         return 0;
    8173             : }
    8174             : 
    8175           0 : static PyObject *py_netr_DELTA_USER_get_acct_flags(PyObject *obj, void *closure)
    8176             : {
    8177           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8178             :         PyObject *py_acct_flags;
    8179           0 :         py_acct_flags = PyLong_FromUnsignedLongLong((uint32_t)object->acct_flags);
    8180           0 :         return py_acct_flags;
    8181             : }
    8182             : 
    8183           0 : static int py_netr_DELTA_USER_set_acct_flags(PyObject *py_obj, PyObject *value, void *closure)
    8184             : {
    8185           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8186           0 :         if (value == NULL) {
    8187           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->acct_flags");
    8188           0 :                 return -1;
    8189             :         }
    8190             :         {
    8191           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->acct_flags));
    8192           0 :                 if (PyLong_Check(value)) {
    8193             :                         unsigned long long test_var;
    8194           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8195           0 :                         if (PyErr_Occurred() != NULL) {
    8196           0 :                                 return -1;
    8197             :                         }
    8198           0 :                         if (test_var > uint_max) {
    8199           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8200             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8201           0 :                                 return -1;
    8202             :                         }
    8203           0 :                         object->acct_flags = test_var;
    8204             :                 } else {
    8205           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8206             :                           PyLong_Type.tp_name);
    8207           0 :                         return -1;
    8208             :                 }
    8209             :         }
    8210           0 :         return 0;
    8211             : }
    8212             : 
    8213           0 : static PyObject *py_netr_DELTA_USER_get_lmpassword(PyObject *obj, void *closure)
    8214             : {
    8215           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8216             :         PyObject *py_lmpassword;
    8217           0 :         py_lmpassword = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->lmpassword);
    8218           0 :         return py_lmpassword;
    8219             : }
    8220             : 
    8221           0 : static int py_netr_DELTA_USER_set_lmpassword(PyObject *py_obj, PyObject *value, void *closure)
    8222             : {
    8223           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8224           0 :         if (value == NULL) {
    8225           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lmpassword");
    8226           0 :                 return -1;
    8227             :         }
    8228           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
    8229           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8230           0 :                 PyErr_NoMemory();
    8231           0 :                 return -1;
    8232             :         }
    8233           0 :         object->lmpassword = *(struct samr_Password *)pytalloc_get_ptr(value);
    8234           0 :         return 0;
    8235             : }
    8236             : 
    8237           0 : static PyObject *py_netr_DELTA_USER_get_ntpassword(PyObject *obj, void *closure)
    8238             : {
    8239           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8240             :         PyObject *py_ntpassword;
    8241           0 :         py_ntpassword = pytalloc_reference_ex(samr_Password_Type, pytalloc_get_mem_ctx(obj), &object->ntpassword);
    8242           0 :         return py_ntpassword;
    8243             : }
    8244             : 
    8245           0 : static int py_netr_DELTA_USER_set_ntpassword(PyObject *py_obj, PyObject *value, void *closure)
    8246             : {
    8247           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8248           0 :         if (value == NULL) {
    8249           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ntpassword");
    8250           0 :                 return -1;
    8251             :         }
    8252           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
    8253           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8254           0 :                 PyErr_NoMemory();
    8255           0 :                 return -1;
    8256             :         }
    8257           0 :         object->ntpassword = *(struct samr_Password *)pytalloc_get_ptr(value);
    8258           0 :         return 0;
    8259             : }
    8260             : 
    8261           0 : static PyObject *py_netr_DELTA_USER_get_nt_password_present(PyObject *obj, void *closure)
    8262             : {
    8263           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8264             :         PyObject *py_nt_password_present;
    8265           0 :         py_nt_password_present = PyLong_FromLong((uint16_t)object->nt_password_present);
    8266           0 :         return py_nt_password_present;
    8267             : }
    8268             : 
    8269           0 : static int py_netr_DELTA_USER_set_nt_password_present(PyObject *py_obj, PyObject *value, void *closure)
    8270             : {
    8271           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8272           0 :         if (value == NULL) {
    8273           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nt_password_present");
    8274           0 :                 return -1;
    8275             :         }
    8276             :         {
    8277           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nt_password_present));
    8278           0 :                 if (PyLong_Check(value)) {
    8279             :                         unsigned long long test_var;
    8280           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8281           0 :                         if (PyErr_Occurred() != NULL) {
    8282           0 :                                 return -1;
    8283             :                         }
    8284           0 :                         if (test_var > uint_max) {
    8285           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8286             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8287           0 :                                 return -1;
    8288             :                         }
    8289           0 :                         object->nt_password_present = test_var;
    8290             :                 } else {
    8291           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8292             :                           PyLong_Type.tp_name);
    8293           0 :                         return -1;
    8294             :                 }
    8295             :         }
    8296           0 :         return 0;
    8297             : }
    8298             : 
    8299           0 : static PyObject *py_netr_DELTA_USER_get_lm_password_present(PyObject *obj, void *closure)
    8300             : {
    8301           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8302             :         PyObject *py_lm_password_present;
    8303           0 :         py_lm_password_present = PyLong_FromLong((uint16_t)object->lm_password_present);
    8304           0 :         return py_lm_password_present;
    8305             : }
    8306             : 
    8307           0 : static int py_netr_DELTA_USER_set_lm_password_present(PyObject *py_obj, PyObject *value, void *closure)
    8308             : {
    8309           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8310           0 :         if (value == NULL) {
    8311           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lm_password_present");
    8312           0 :                 return -1;
    8313             :         }
    8314             :         {
    8315           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lm_password_present));
    8316           0 :                 if (PyLong_Check(value)) {
    8317             :                         unsigned long long test_var;
    8318           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8319           0 :                         if (PyErr_Occurred() != NULL) {
    8320           0 :                                 return -1;
    8321             :                         }
    8322           0 :                         if (test_var > uint_max) {
    8323           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8324             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8325           0 :                                 return -1;
    8326             :                         }
    8327           0 :                         object->lm_password_present = test_var;
    8328             :                 } else {
    8329           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8330             :                           PyLong_Type.tp_name);
    8331           0 :                         return -1;
    8332             :                 }
    8333             :         }
    8334           0 :         return 0;
    8335             : }
    8336             : 
    8337           0 : static PyObject *py_netr_DELTA_USER_get_password_expired(PyObject *obj, void *closure)
    8338             : {
    8339           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8340             :         PyObject *py_password_expired;
    8341           0 :         py_password_expired = PyLong_FromLong((uint16_t)object->password_expired);
    8342           0 :         return py_password_expired;
    8343             : }
    8344             : 
    8345           0 : static int py_netr_DELTA_USER_set_password_expired(PyObject *py_obj, PyObject *value, void *closure)
    8346             : {
    8347           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8348           0 :         if (value == NULL) {
    8349           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->password_expired");
    8350           0 :                 return -1;
    8351             :         }
    8352             :         {
    8353           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->password_expired));
    8354           0 :                 if (PyLong_Check(value)) {
    8355             :                         unsigned long long test_var;
    8356           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8357           0 :                         if (PyErr_Occurred() != NULL) {
    8358           0 :                                 return -1;
    8359             :                         }
    8360           0 :                         if (test_var > uint_max) {
    8361           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8362             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8363           0 :                                 return -1;
    8364             :                         }
    8365           0 :                         object->password_expired = test_var;
    8366             :                 } else {
    8367           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8368             :                           PyLong_Type.tp_name);
    8369           0 :                         return -1;
    8370             :                 }
    8371             :         }
    8372           0 :         return 0;
    8373             : }
    8374             : 
    8375           0 : static PyObject *py_netr_DELTA_USER_get_comment(PyObject *obj, void *closure)
    8376             : {
    8377           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8378             :         PyObject *py_comment;
    8379           0 :         py_comment = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->comment);
    8380           0 :         return py_comment;
    8381             : }
    8382             : 
    8383           0 : static int py_netr_DELTA_USER_set_comment(PyObject *py_obj, PyObject *value, void *closure)
    8384             : {
    8385           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8386           0 :         if (value == NULL) {
    8387           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->comment");
    8388           0 :                 return -1;
    8389             :         }
    8390           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8391           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8392           0 :                 PyErr_NoMemory();
    8393           0 :                 return -1;
    8394             :         }
    8395           0 :         object->comment = *(struct lsa_String *)pytalloc_get_ptr(value);
    8396           0 :         return 0;
    8397             : }
    8398             : 
    8399           0 : static PyObject *py_netr_DELTA_USER_get_parameters(PyObject *obj, void *closure)
    8400             : {
    8401           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8402             :         PyObject *py_parameters;
    8403           0 :         py_parameters = pytalloc_reference_ex(lsa_BinaryString_Type, pytalloc_get_mem_ctx(obj), &object->parameters);
    8404           0 :         return py_parameters;
    8405             : }
    8406             : 
    8407           0 : static int py_netr_DELTA_USER_set_parameters(PyObject *py_obj, PyObject *value, void *closure)
    8408             : {
    8409           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8410           0 :         if (value == NULL) {
    8411           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->parameters");
    8412           0 :                 return -1;
    8413             :         }
    8414           0 :         PY_CHECK_TYPE(lsa_BinaryString_Type, value, return -1;);
    8415           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8416           0 :                 PyErr_NoMemory();
    8417           0 :                 return -1;
    8418             :         }
    8419           0 :         object->parameters = *(struct lsa_BinaryString *)pytalloc_get_ptr(value);
    8420           0 :         return 0;
    8421             : }
    8422             : 
    8423           0 : static PyObject *py_netr_DELTA_USER_get_country_code(PyObject *obj, void *closure)
    8424             : {
    8425           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8426             :         PyObject *py_country_code;
    8427           0 :         py_country_code = PyLong_FromLong((uint16_t)object->country_code);
    8428           0 :         return py_country_code;
    8429             : }
    8430             : 
    8431           0 : static int py_netr_DELTA_USER_set_country_code(PyObject *py_obj, PyObject *value, void *closure)
    8432             : {
    8433           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8434           0 :         if (value == NULL) {
    8435           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->country_code");
    8436           0 :                 return -1;
    8437             :         }
    8438             :         {
    8439           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->country_code));
    8440           0 :                 if (PyLong_Check(value)) {
    8441             :                         unsigned long long test_var;
    8442           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8443           0 :                         if (PyErr_Occurred() != NULL) {
    8444           0 :                                 return -1;
    8445             :                         }
    8446           0 :                         if (test_var > uint_max) {
    8447           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8448             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8449           0 :                                 return -1;
    8450             :                         }
    8451           0 :                         object->country_code = test_var;
    8452             :                 } else {
    8453           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8454             :                           PyLong_Type.tp_name);
    8455           0 :                         return -1;
    8456             :                 }
    8457             :         }
    8458           0 :         return 0;
    8459             : }
    8460             : 
    8461           0 : static PyObject *py_netr_DELTA_USER_get_code_page(PyObject *obj, void *closure)
    8462             : {
    8463           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8464             :         PyObject *py_code_page;
    8465           0 :         py_code_page = PyLong_FromLong((uint16_t)object->code_page);
    8466           0 :         return py_code_page;
    8467             : }
    8468             : 
    8469           0 : static int py_netr_DELTA_USER_set_code_page(PyObject *py_obj, PyObject *value, void *closure)
    8470             : {
    8471           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8472           0 :         if (value == NULL) {
    8473           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->code_page");
    8474           0 :                 return -1;
    8475             :         }
    8476             :         {
    8477           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->code_page));
    8478           0 :                 if (PyLong_Check(value)) {
    8479             :                         unsigned long long test_var;
    8480           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8481           0 :                         if (PyErr_Occurred() != NULL) {
    8482           0 :                                 return -1;
    8483             :                         }
    8484           0 :                         if (test_var > uint_max) {
    8485           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8486             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8487           0 :                                 return -1;
    8488             :                         }
    8489           0 :                         object->code_page = test_var;
    8490             :                 } else {
    8491           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8492             :                           PyLong_Type.tp_name);
    8493           0 :                         return -1;
    8494             :                 }
    8495             :         }
    8496           0 :         return 0;
    8497             : }
    8498             : 
    8499           0 : static PyObject *py_netr_DELTA_USER_get_user_private_info(PyObject *obj, void *closure)
    8500             : {
    8501           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8502             :         PyObject *py_user_private_info;
    8503           0 :         py_user_private_info = pytalloc_reference_ex(&netr_USER_PRIVATE_INFO_Type, pytalloc_get_mem_ctx(obj), &object->user_private_info);
    8504           0 :         return py_user_private_info;
    8505             : }
    8506             : 
    8507           0 : static int py_netr_DELTA_USER_set_user_private_info(PyObject *py_obj, PyObject *value, void *closure)
    8508             : {
    8509           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8510           0 :         if (value == NULL) {
    8511           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->user_private_info");
    8512           0 :                 return -1;
    8513             :         }
    8514           0 :         PY_CHECK_TYPE(&netr_USER_PRIVATE_INFO_Type, value, return -1;);
    8515           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8516           0 :                 PyErr_NoMemory();
    8517           0 :                 return -1;
    8518             :         }
    8519           0 :         object->user_private_info = *(struct netr_USER_PRIVATE_INFO *)pytalloc_get_ptr(value);
    8520           0 :         return 0;
    8521             : }
    8522             : 
    8523           0 : static PyObject *py_netr_DELTA_USER_get_SecurityInformation(PyObject *obj, void *closure)
    8524             : {
    8525           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8526             :         PyObject *py_SecurityInformation;
    8527           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)object->SecurityInformation);
    8528           0 :         return py_SecurityInformation;
    8529             : }
    8530             : 
    8531           0 : static int py_netr_DELTA_USER_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
    8532             : {
    8533           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8534           0 :         if (value == NULL) {
    8535           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SecurityInformation");
    8536           0 :                 return -1;
    8537             :         }
    8538             :         {
    8539           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
    8540           0 :                 if (PyLong_Check(value)) {
    8541             :                         unsigned long long test_var;
    8542           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8543           0 :                         if (PyErr_Occurred() != NULL) {
    8544           0 :                                 return -1;
    8545             :                         }
    8546           0 :                         if (test_var > uint_max) {
    8547           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8548             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8549           0 :                                 return -1;
    8550             :                         }
    8551           0 :                         object->SecurityInformation = test_var;
    8552             :                 } else {
    8553           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8554             :                           PyLong_Type.tp_name);
    8555           0 :                         return -1;
    8556             :                 }
    8557             :         }
    8558           0 :         return 0;
    8559             : }
    8560             : 
    8561           0 : static PyObject *py_netr_DELTA_USER_get_sdbuf(PyObject *obj, void *closure)
    8562             : {
    8563           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8564             :         PyObject *py_sdbuf;
    8565           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
    8566           0 :         return py_sdbuf;
    8567             : }
    8568             : 
    8569           0 : static int py_netr_DELTA_USER_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
    8570             : {
    8571           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8572           0 :         if (value == NULL) {
    8573           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sdbuf");
    8574           0 :                 return -1;
    8575             :         }
    8576           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
    8577           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8578           0 :                 PyErr_NoMemory();
    8579           0 :                 return -1;
    8580             :         }
    8581           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
    8582           0 :         return 0;
    8583             : }
    8584             : 
    8585           0 : static PyObject *py_netr_DELTA_USER_get_profile_path(PyObject *obj, void *closure)
    8586             : {
    8587           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8588             :         PyObject *py_profile_path;
    8589           0 :         py_profile_path = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->profile_path);
    8590           0 :         return py_profile_path;
    8591             : }
    8592             : 
    8593           0 : static int py_netr_DELTA_USER_set_profile_path(PyObject *py_obj, PyObject *value, void *closure)
    8594             : {
    8595           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8596           0 :         if (value == NULL) {
    8597           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->profile_path");
    8598           0 :                 return -1;
    8599             :         }
    8600           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8601           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8602           0 :                 PyErr_NoMemory();
    8603           0 :                 return -1;
    8604             :         }
    8605           0 :         object->profile_path = *(struct lsa_String *)pytalloc_get_ptr(value);
    8606           0 :         return 0;
    8607             : }
    8608             : 
    8609           0 : static PyObject *py_netr_DELTA_USER_get_unknown2(PyObject *obj, void *closure)
    8610             : {
    8611           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8612             :         PyObject *py_unknown2;
    8613           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
    8614           0 :         return py_unknown2;
    8615             : }
    8616             : 
    8617           0 : static int py_netr_DELTA_USER_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
    8618             : {
    8619           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8620           0 :         if (value == NULL) {
    8621           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
    8622           0 :                 return -1;
    8623             :         }
    8624           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8625           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8626           0 :                 PyErr_NoMemory();
    8627           0 :                 return -1;
    8628             :         }
    8629           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
    8630           0 :         return 0;
    8631             : }
    8632             : 
    8633           0 : static PyObject *py_netr_DELTA_USER_get_unknown3(PyObject *obj, void *closure)
    8634             : {
    8635           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8636             :         PyObject *py_unknown3;
    8637           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
    8638           0 :         return py_unknown3;
    8639             : }
    8640             : 
    8641           0 : static int py_netr_DELTA_USER_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
    8642             : {
    8643           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8644           0 :         if (value == NULL) {
    8645           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
    8646           0 :                 return -1;
    8647             :         }
    8648           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8649           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8650           0 :                 PyErr_NoMemory();
    8651           0 :                 return -1;
    8652             :         }
    8653           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
    8654           0 :         return 0;
    8655             : }
    8656             : 
    8657           0 : static PyObject *py_netr_DELTA_USER_get_unknown4(PyObject *obj, void *closure)
    8658             : {
    8659           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8660             :         PyObject *py_unknown4;
    8661           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
    8662           0 :         return py_unknown4;
    8663             : }
    8664             : 
    8665           0 : static int py_netr_DELTA_USER_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
    8666             : {
    8667           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8668           0 :         if (value == NULL) {
    8669           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
    8670           0 :                 return -1;
    8671             :         }
    8672           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    8673           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8674           0 :                 PyErr_NoMemory();
    8675           0 :                 return -1;
    8676             :         }
    8677           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
    8678           0 :         return 0;
    8679             : }
    8680             : 
    8681           0 : static PyObject *py_netr_DELTA_USER_get_unknown5(PyObject *obj, void *closure)
    8682             : {
    8683           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8684             :         PyObject *py_unknown5;
    8685           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown5);
    8686           0 :         return py_unknown5;
    8687             : }
    8688             : 
    8689           0 : static int py_netr_DELTA_USER_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
    8690             : {
    8691           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8692           0 :         if (value == NULL) {
    8693           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown5");
    8694           0 :                 return -1;
    8695             :         }
    8696             :         {
    8697           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
    8698           0 :                 if (PyLong_Check(value)) {
    8699             :                         unsigned long long test_var;
    8700           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8701           0 :                         if (PyErr_Occurred() != NULL) {
    8702           0 :                                 return -1;
    8703             :                         }
    8704           0 :                         if (test_var > uint_max) {
    8705           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8706             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8707           0 :                                 return -1;
    8708             :                         }
    8709           0 :                         object->unknown5 = test_var;
    8710             :                 } else {
    8711           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8712             :                           PyLong_Type.tp_name);
    8713           0 :                         return -1;
    8714             :                 }
    8715             :         }
    8716           0 :         return 0;
    8717             : }
    8718             : 
    8719           0 : static PyObject *py_netr_DELTA_USER_get_unknown6(PyObject *obj, void *closure)
    8720             : {
    8721           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8722             :         PyObject *py_unknown6;
    8723           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown6);
    8724           0 :         return py_unknown6;
    8725             : }
    8726             : 
    8727           0 : static int py_netr_DELTA_USER_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
    8728             : {
    8729           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8730           0 :         if (value == NULL) {
    8731           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown6");
    8732           0 :                 return -1;
    8733             :         }
    8734             :         {
    8735           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
    8736           0 :                 if (PyLong_Check(value)) {
    8737             :                         unsigned long long test_var;
    8738           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8739           0 :                         if (PyErr_Occurred() != NULL) {
    8740           0 :                                 return -1;
    8741             :                         }
    8742           0 :                         if (test_var > uint_max) {
    8743           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8744             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8745           0 :                                 return -1;
    8746             :                         }
    8747           0 :                         object->unknown6 = test_var;
    8748             :                 } else {
    8749           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8750             :                           PyLong_Type.tp_name);
    8751           0 :                         return -1;
    8752             :                 }
    8753             :         }
    8754           0 :         return 0;
    8755             : }
    8756             : 
    8757           0 : static PyObject *py_netr_DELTA_USER_get_unknown7(PyObject *obj, void *closure)
    8758             : {
    8759           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8760             :         PyObject *py_unknown7;
    8761           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown7);
    8762           0 :         return py_unknown7;
    8763             : }
    8764             : 
    8765           0 : static int py_netr_DELTA_USER_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
    8766             : {
    8767           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8768           0 :         if (value == NULL) {
    8769           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown7");
    8770           0 :                 return -1;
    8771             :         }
    8772             :         {
    8773           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
    8774           0 :                 if (PyLong_Check(value)) {
    8775             :                         unsigned long long test_var;
    8776           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8777           0 :                         if (PyErr_Occurred() != NULL) {
    8778           0 :                                 return -1;
    8779             :                         }
    8780           0 :                         if (test_var > uint_max) {
    8781           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8782             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8783           0 :                                 return -1;
    8784             :                         }
    8785           0 :                         object->unknown7 = test_var;
    8786             :                 } else {
    8787           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8788             :                           PyLong_Type.tp_name);
    8789           0 :                         return -1;
    8790             :                 }
    8791             :         }
    8792           0 :         return 0;
    8793             : }
    8794             : 
    8795           0 : static PyObject *py_netr_DELTA_USER_get_unknown8(PyObject *obj, void *closure)
    8796             : {
    8797           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(obj);
    8798             :         PyObject *py_unknown8;
    8799           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown8);
    8800           0 :         return py_unknown8;
    8801             : }
    8802             : 
    8803           0 : static int py_netr_DELTA_USER_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
    8804             : {
    8805           0 :         struct netr_DELTA_USER *object = (struct netr_DELTA_USER *)pytalloc_get_ptr(py_obj);
    8806           0 :         if (value == NULL) {
    8807           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown8");
    8808           0 :                 return -1;
    8809             :         }
    8810             :         {
    8811           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
    8812           0 :                 if (PyLong_Check(value)) {
    8813             :                         unsigned long long test_var;
    8814           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8815           0 :                         if (PyErr_Occurred() != NULL) {
    8816           0 :                                 return -1;
    8817             :                         }
    8818           0 :                         if (test_var > uint_max) {
    8819           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    8820             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8821           0 :                                 return -1;
    8822             :                         }
    8823           0 :                         object->unknown8 = test_var;
    8824             :                 } else {
    8825           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    8826             :                           PyLong_Type.tp_name);
    8827           0 :                         return -1;
    8828             :                 }
    8829             :         }
    8830           0 :         return 0;
    8831             : }
    8832             : 
    8833             : static PyGetSetDef py_netr_DELTA_USER_getsetters[] = {
    8834             :         {
    8835             :                 .name = discard_const_p(char, "account_name"),
    8836             :                 .get = py_netr_DELTA_USER_get_account_name,
    8837             :                 .set = py_netr_DELTA_USER_set_account_name,
    8838             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    8839             :         },
    8840             :         {
    8841             :                 .name = discard_const_p(char, "full_name"),
    8842             :                 .get = py_netr_DELTA_USER_get_full_name,
    8843             :                 .set = py_netr_DELTA_USER_set_full_name,
    8844             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    8845             :         },
    8846             :         {
    8847             :                 .name = discard_const_p(char, "rid"),
    8848             :                 .get = py_netr_DELTA_USER_get_rid,
    8849             :                 .set = py_netr_DELTA_USER_set_rid,
    8850             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8851             :         },
    8852             :         {
    8853             :                 .name = discard_const_p(char, "primary_gid"),
    8854             :                 .get = py_netr_DELTA_USER_get_primary_gid,
    8855             :                 .set = py_netr_DELTA_USER_set_primary_gid,
    8856             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8857             :         },
    8858             :         {
    8859             :                 .name = discard_const_p(char, "home_directory"),
    8860             :                 .get = py_netr_DELTA_USER_get_home_directory,
    8861             :                 .set = py_netr_DELTA_USER_set_home_directory,
    8862             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    8863             :         },
    8864             :         {
    8865             :                 .name = discard_const_p(char, "home_drive"),
    8866             :                 .get = py_netr_DELTA_USER_get_home_drive,
    8867             :                 .set = py_netr_DELTA_USER_set_home_drive,
    8868             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    8869             :         },
    8870             :         {
    8871             :                 .name = discard_const_p(char, "logon_script"),
    8872             :                 .get = py_netr_DELTA_USER_get_logon_script,
    8873             :                 .set = py_netr_DELTA_USER_set_logon_script,
    8874             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    8875             :         },
    8876             :         {
    8877             :                 .name = discard_const_p(char, "description"),
    8878             :                 .get = py_netr_DELTA_USER_get_description,
    8879             :                 .set = py_netr_DELTA_USER_set_description,
    8880             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    8881             :         },
    8882             :         {
    8883             :                 .name = discard_const_p(char, "workstations"),
    8884             :                 .get = py_netr_DELTA_USER_get_workstations,
    8885             :                 .set = py_netr_DELTA_USER_set_workstations,
    8886             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    8887             :         },
    8888             :         {
    8889             :                 .name = discard_const_p(char, "last_logon"),
    8890             :                 .get = py_netr_DELTA_USER_get_last_logon,
    8891             :                 .set = py_netr_DELTA_USER_set_last_logon,
    8892             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    8893             :         },
    8894             :         {
    8895             :                 .name = discard_const_p(char, "last_logoff"),
    8896             :                 .get = py_netr_DELTA_USER_get_last_logoff,
    8897             :                 .set = py_netr_DELTA_USER_set_last_logoff,
    8898             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    8899             :         },
    8900             :         {
    8901             :                 .name = discard_const_p(char, "logon_hours"),
    8902             :                 .get = py_netr_DELTA_USER_get_logon_hours,
    8903             :                 .set = py_netr_DELTA_USER_set_logon_hours,
    8904             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_LogonHours")
    8905             :         },
    8906             :         {
    8907             :                 .name = discard_const_p(char, "bad_password_count"),
    8908             :                 .get = py_netr_DELTA_USER_get_bad_password_count,
    8909             :                 .set = py_netr_DELTA_USER_set_bad_password_count,
    8910             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8911             :         },
    8912             :         {
    8913             :                 .name = discard_const_p(char, "logon_count"),
    8914             :                 .get = py_netr_DELTA_USER_get_logon_count,
    8915             :                 .set = py_netr_DELTA_USER_set_logon_count,
    8916             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8917             :         },
    8918             :         {
    8919             :                 .name = discard_const_p(char, "last_password_change"),
    8920             :                 .get = py_netr_DELTA_USER_get_last_password_change,
    8921             :                 .set = py_netr_DELTA_USER_set_last_password_change,
    8922             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    8923             :         },
    8924             :         {
    8925             :                 .name = discard_const_p(char, "acct_expiry"),
    8926             :                 .get = py_netr_DELTA_USER_get_acct_expiry,
    8927             :                 .set = py_netr_DELTA_USER_set_acct_expiry,
    8928             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    8929             :         },
    8930             :         {
    8931             :                 .name = discard_const_p(char, "acct_flags"),
    8932             :                 .get = py_netr_DELTA_USER_get_acct_flags,
    8933             :                 .set = py_netr_DELTA_USER_set_acct_flags,
    8934             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_AcctFlags")
    8935             :         },
    8936             :         {
    8937             :                 .name = discard_const_p(char, "lmpassword"),
    8938             :                 .get = py_netr_DELTA_USER_get_lmpassword,
    8939             :                 .set = py_netr_DELTA_USER_set_lmpassword,
    8940             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
    8941             :         },
    8942             :         {
    8943             :                 .name = discard_const_p(char, "ntpassword"),
    8944             :                 .get = py_netr_DELTA_USER_get_ntpassword,
    8945             :                 .set = py_netr_DELTA_USER_set_ntpassword,
    8946             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
    8947             :         },
    8948             :         {
    8949             :                 .name = discard_const_p(char, "nt_password_present"),
    8950             :                 .get = py_netr_DELTA_USER_get_nt_password_present,
    8951             :                 .set = py_netr_DELTA_USER_set_nt_password_present,
    8952             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    8953             :         },
    8954             :         {
    8955             :                 .name = discard_const_p(char, "lm_password_present"),
    8956             :                 .get = py_netr_DELTA_USER_get_lm_password_present,
    8957             :                 .set = py_netr_DELTA_USER_set_lm_password_present,
    8958             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    8959             :         },
    8960             :         {
    8961             :                 .name = discard_const_p(char, "password_expired"),
    8962             :                 .get = py_netr_DELTA_USER_get_password_expired,
    8963             :                 .set = py_netr_DELTA_USER_set_password_expired,
    8964             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    8965             :         },
    8966             :         {
    8967             :                 .name = discard_const_p(char, "comment"),
    8968             :                 .get = py_netr_DELTA_USER_get_comment,
    8969             :                 .set = py_netr_DELTA_USER_set_comment,
    8970             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    8971             :         },
    8972             :         {
    8973             :                 .name = discard_const_p(char, "parameters"),
    8974             :                 .get = py_netr_DELTA_USER_get_parameters,
    8975             :                 .set = py_netr_DELTA_USER_set_parameters,
    8976             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_BinaryString")
    8977             :         },
    8978             :         {
    8979             :                 .name = discard_const_p(char, "country_code"),
    8980             :                 .get = py_netr_DELTA_USER_get_country_code,
    8981             :                 .set = py_netr_DELTA_USER_set_country_code,
    8982             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8983             :         },
    8984             :         {
    8985             :                 .name = discard_const_p(char, "code_page"),
    8986             :                 .get = py_netr_DELTA_USER_get_code_page,
    8987             :                 .set = py_netr_DELTA_USER_set_code_page,
    8988             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    8989             :         },
    8990             :         {
    8991             :                 .name = discard_const_p(char, "user_private_info"),
    8992             :                 .get = py_netr_DELTA_USER_get_user_private_info,
    8993             :                 .set = py_netr_DELTA_USER_set_user_private_info,
    8994             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_USER_PRIVATE_INFO")
    8995             :         },
    8996             :         {
    8997             :                 .name = discard_const_p(char, "SecurityInformation"),
    8998             :                 .get = py_netr_DELTA_USER_get_SecurityInformation,
    8999             :                 .set = py_netr_DELTA_USER_set_SecurityInformation,
    9000             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9001             :         },
    9002             :         {
    9003             :                 .name = discard_const_p(char, "sdbuf"),
    9004             :                 .get = py_netr_DELTA_USER_get_sdbuf,
    9005             :                 .set = py_netr_DELTA_USER_set_sdbuf,
    9006             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
    9007             :         },
    9008             :         {
    9009             :                 .name = discard_const_p(char, "profile_path"),
    9010             :                 .get = py_netr_DELTA_USER_get_profile_path,
    9011             :                 .set = py_netr_DELTA_USER_set_profile_path,
    9012             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9013             :         },
    9014             :         {
    9015             :                 .name = discard_const_p(char, "unknown2"),
    9016             :                 .get = py_netr_DELTA_USER_get_unknown2,
    9017             :                 .set = py_netr_DELTA_USER_set_unknown2,
    9018             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9019             :         },
    9020             :         {
    9021             :                 .name = discard_const_p(char, "unknown3"),
    9022             :                 .get = py_netr_DELTA_USER_get_unknown3,
    9023             :                 .set = py_netr_DELTA_USER_set_unknown3,
    9024             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9025             :         },
    9026             :         {
    9027             :                 .name = discard_const_p(char, "unknown4"),
    9028             :                 .get = py_netr_DELTA_USER_get_unknown4,
    9029             :                 .set = py_netr_DELTA_USER_set_unknown4,
    9030             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9031             :         },
    9032             :         {
    9033             :                 .name = discard_const_p(char, "unknown5"),
    9034             :                 .get = py_netr_DELTA_USER_get_unknown5,
    9035             :                 .set = py_netr_DELTA_USER_set_unknown5,
    9036             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9037             :         },
    9038             :         {
    9039             :                 .name = discard_const_p(char, "unknown6"),
    9040             :                 .get = py_netr_DELTA_USER_get_unknown6,
    9041             :                 .set = py_netr_DELTA_USER_set_unknown6,
    9042             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9043             :         },
    9044             :         {
    9045             :                 .name = discard_const_p(char, "unknown7"),
    9046             :                 .get = py_netr_DELTA_USER_get_unknown7,
    9047             :                 .set = py_netr_DELTA_USER_set_unknown7,
    9048             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9049             :         },
    9050             :         {
    9051             :                 .name = discard_const_p(char, "unknown8"),
    9052             :                 .get = py_netr_DELTA_USER_get_unknown8,
    9053             :                 .set = py_netr_DELTA_USER_set_unknown8,
    9054             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9055             :         },
    9056             :         { .name = NULL }
    9057             : };
    9058             : 
    9059           0 : static PyObject *py_netr_DELTA_USER_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9060             : {
    9061           0 :         return pytalloc_new(struct netr_DELTA_USER, type);
    9062             : }
    9063             : 
    9064             : 
    9065             : static PyTypeObject netr_DELTA_USER_Type = {
    9066             :         PyVarObject_HEAD_INIT(NULL, 0)
    9067             :         .tp_name = "netlogon.netr_DELTA_USER",
    9068             :         .tp_getset = py_netr_DELTA_USER_getsetters,
    9069             :         .tp_methods = NULL,
    9070             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9071             :         .tp_new = py_netr_DELTA_USER_new,
    9072             : };
    9073             : 
    9074             : 
    9075           0 : static PyObject *py_netr_DELTA_DOMAIN_get_domain_name(PyObject *obj, void *closure)
    9076             : {
    9077           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9078             :         PyObject *py_domain_name;
    9079           0 :         py_domain_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->domain_name);
    9080           0 :         return py_domain_name;
    9081             : }
    9082             : 
    9083           0 : static int py_netr_DELTA_DOMAIN_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
    9084             : {
    9085           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9086           0 :         if (value == NULL) {
    9087           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_name");
    9088           0 :                 return -1;
    9089             :         }
    9090           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    9091           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9092           0 :                 PyErr_NoMemory();
    9093           0 :                 return -1;
    9094             :         }
    9095           0 :         object->domain_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    9096           0 :         return 0;
    9097             : }
    9098             : 
    9099           0 : static PyObject *py_netr_DELTA_DOMAIN_get_oem_information(PyObject *obj, void *closure)
    9100             : {
    9101           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9102             :         PyObject *py_oem_information;
    9103           0 :         py_oem_information = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->oem_information);
    9104           0 :         return py_oem_information;
    9105             : }
    9106             : 
    9107           0 : static int py_netr_DELTA_DOMAIN_set_oem_information(PyObject *py_obj, PyObject *value, void *closure)
    9108             : {
    9109           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9110           0 :         if (value == NULL) {
    9111           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->oem_information");
    9112           0 :                 return -1;
    9113             :         }
    9114           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    9115           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9116           0 :                 PyErr_NoMemory();
    9117           0 :                 return -1;
    9118             :         }
    9119           0 :         object->oem_information = *(struct lsa_String *)pytalloc_get_ptr(value);
    9120           0 :         return 0;
    9121             : }
    9122             : 
    9123           0 : static PyObject *py_netr_DELTA_DOMAIN_get_force_logoff_time(PyObject *obj, void *closure)
    9124             : {
    9125           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9126             :         PyObject *py_force_logoff_time;
    9127           0 :         py_force_logoff_time = PyLong_FromLongLong(object->force_logoff_time);
    9128           0 :         return py_force_logoff_time;
    9129             : }
    9130             : 
    9131           0 : static int py_netr_DELTA_DOMAIN_set_force_logoff_time(PyObject *py_obj, PyObject *value, void *closure)
    9132             : {
    9133           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9134           0 :         if (value == NULL) {
    9135           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->force_logoff_time");
    9136           0 :                 return -1;
    9137             :         }
    9138             :         {
    9139           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->force_logoff_time));
    9140           0 :                 const long long int_min = -int_max - 1;
    9141           0 :                 if (PyLong_Check(value)) {
    9142             :                         long long test_var;
    9143           0 :                         test_var = PyLong_AsLongLong(value);
    9144           0 :                         if (PyErr_Occurred() != NULL) {
    9145           0 :                                 return -1;
    9146             :                         }
    9147           0 :                         if (test_var < int_min || test_var > int_max) {
    9148           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",\
    9149             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
    9150           0 :                                 return -1;
    9151             :                         }
    9152           0 :                         object->force_logoff_time = test_var;
    9153             :                 } else {
    9154           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    9155             :                           PyLong_Type.tp_name);
    9156           0 :                         return -1;
    9157             :                 }
    9158             :         }
    9159           0 :         return 0;
    9160             : }
    9161             : 
    9162           0 : static PyObject *py_netr_DELTA_DOMAIN_get_min_password_length(PyObject *obj, void *closure)
    9163             : {
    9164           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9165             :         PyObject *py_min_password_length;
    9166           0 :         py_min_password_length = PyLong_FromLong((uint16_t)object->min_password_length);
    9167           0 :         return py_min_password_length;
    9168             : }
    9169             : 
    9170           0 : static int py_netr_DELTA_DOMAIN_set_min_password_length(PyObject *py_obj, PyObject *value, void *closure)
    9171             : {
    9172           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9173           0 :         if (value == NULL) {
    9174           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->min_password_length");
    9175           0 :                 return -1;
    9176             :         }
    9177             :         {
    9178           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->min_password_length));
    9179           0 :                 if (PyLong_Check(value)) {
    9180             :                         unsigned long long test_var;
    9181           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9182           0 :                         if (PyErr_Occurred() != NULL) {
    9183           0 :                                 return -1;
    9184             :                         }
    9185           0 :                         if (test_var > uint_max) {
    9186           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    9187             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9188           0 :                                 return -1;
    9189             :                         }
    9190           0 :                         object->min_password_length = test_var;
    9191             :                 } else {
    9192           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    9193             :                           PyLong_Type.tp_name);
    9194           0 :                         return -1;
    9195             :                 }
    9196             :         }
    9197           0 :         return 0;
    9198             : }
    9199             : 
    9200           0 : static PyObject *py_netr_DELTA_DOMAIN_get_password_history_length(PyObject *obj, void *closure)
    9201             : {
    9202           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9203             :         PyObject *py_password_history_length;
    9204           0 :         py_password_history_length = PyLong_FromLong((uint16_t)object->password_history_length);
    9205           0 :         return py_password_history_length;
    9206             : }
    9207             : 
    9208           0 : static int py_netr_DELTA_DOMAIN_set_password_history_length(PyObject *py_obj, PyObject *value, void *closure)
    9209             : {
    9210           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9211           0 :         if (value == NULL) {
    9212           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->password_history_length");
    9213           0 :                 return -1;
    9214             :         }
    9215             :         {
    9216           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->password_history_length));
    9217           0 :                 if (PyLong_Check(value)) {
    9218             :                         unsigned long long test_var;
    9219           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9220           0 :                         if (PyErr_Occurred() != NULL) {
    9221           0 :                                 return -1;
    9222             :                         }
    9223           0 :                         if (test_var > uint_max) {
    9224           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    9225             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9226           0 :                                 return -1;
    9227             :                         }
    9228           0 :                         object->password_history_length = test_var;
    9229             :                 } else {
    9230           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    9231             :                           PyLong_Type.tp_name);
    9232           0 :                         return -1;
    9233             :                 }
    9234             :         }
    9235           0 :         return 0;
    9236             : }
    9237             : 
    9238           0 : static PyObject *py_netr_DELTA_DOMAIN_get_max_password_age(PyObject *obj, void *closure)
    9239             : {
    9240           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9241             :         PyObject *py_max_password_age;
    9242           0 :         py_max_password_age = PyLong_FromLongLong(object->max_password_age);
    9243           0 :         return py_max_password_age;
    9244             : }
    9245             : 
    9246           0 : static int py_netr_DELTA_DOMAIN_set_max_password_age(PyObject *py_obj, PyObject *value, void *closure)
    9247             : {
    9248           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9249           0 :         if (value == NULL) {
    9250           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_password_age");
    9251           0 :                 return -1;
    9252             :         }
    9253             :         {
    9254           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->max_password_age));
    9255           0 :                 const long long int_min = -int_max - 1;
    9256           0 :                 if (PyLong_Check(value)) {
    9257             :                         long long test_var;
    9258           0 :                         test_var = PyLong_AsLongLong(value);
    9259           0 :                         if (PyErr_Occurred() != NULL) {
    9260           0 :                                 return -1;
    9261             :                         }
    9262           0 :                         if (test_var < int_min || test_var > int_max) {
    9263           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",\
    9264             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
    9265           0 :                                 return -1;
    9266             :                         }
    9267           0 :                         object->max_password_age = test_var;
    9268             :                 } else {
    9269           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    9270             :                           PyLong_Type.tp_name);
    9271           0 :                         return -1;
    9272             :                 }
    9273             :         }
    9274           0 :         return 0;
    9275             : }
    9276             : 
    9277           0 : static PyObject *py_netr_DELTA_DOMAIN_get_min_password_age(PyObject *obj, void *closure)
    9278             : {
    9279           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9280             :         PyObject *py_min_password_age;
    9281           0 :         py_min_password_age = PyLong_FromLongLong(object->min_password_age);
    9282           0 :         return py_min_password_age;
    9283             : }
    9284             : 
    9285           0 : static int py_netr_DELTA_DOMAIN_set_min_password_age(PyObject *py_obj, PyObject *value, void *closure)
    9286             : {
    9287           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9288           0 :         if (value == NULL) {
    9289           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->min_password_age");
    9290           0 :                 return -1;
    9291             :         }
    9292             :         {
    9293           0 :                 const long long int_max = ndr_sizeof2intmax(sizeof(object->min_password_age));
    9294           0 :                 const long long int_min = -int_max - 1;
    9295           0 :                 if (PyLong_Check(value)) {
    9296             :                         long long test_var;
    9297           0 :                         test_var = PyLong_AsLongLong(value);
    9298           0 :                         if (PyErr_Occurred() != NULL) {
    9299           0 :                                 return -1;
    9300             :                         }
    9301           0 :                         if (test_var < int_min || test_var > int_max) {
    9302           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range %lld - %lld, got %lld",\
    9303             :                                   PyLong_Type.tp_name, int_min, int_max, test_var);
    9304           0 :                                 return -1;
    9305             :                         }
    9306           0 :                         object->min_password_age = test_var;
    9307             :                 } else {
    9308           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    9309             :                           PyLong_Type.tp_name);
    9310           0 :                         return -1;
    9311             :                 }
    9312             :         }
    9313           0 :         return 0;
    9314             : }
    9315             : 
    9316           0 : static PyObject *py_netr_DELTA_DOMAIN_get_sequence_num(PyObject *obj, void *closure)
    9317             : {
    9318           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9319             :         PyObject *py_sequence_num;
    9320           0 :         py_sequence_num = PyLong_FromUnsignedLongLong(object->sequence_num);
    9321           0 :         return py_sequence_num;
    9322             : }
    9323             : 
    9324           0 : static int py_netr_DELTA_DOMAIN_set_sequence_num(PyObject *py_obj, PyObject *value, void *closure)
    9325             : {
    9326           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9327           0 :         if (value == NULL) {
    9328           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sequence_num");
    9329           0 :                 return -1;
    9330             :         }
    9331             :         {
    9332           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sequence_num));
    9333           0 :                 if (PyLong_Check(value)) {
    9334             :                         unsigned long long test_var;
    9335           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9336           0 :                         if (PyErr_Occurred() != NULL) {
    9337           0 :                                 return -1;
    9338             :                         }
    9339           0 :                         if (test_var > uint_max) {
    9340           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    9341             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9342           0 :                                 return -1;
    9343             :                         }
    9344           0 :                         object->sequence_num = test_var;
    9345             :                 } else {
    9346           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    9347             :                           PyLong_Type.tp_name);
    9348           0 :                         return -1;
    9349             :                 }
    9350             :         }
    9351           0 :         return 0;
    9352             : }
    9353             : 
    9354           0 : static PyObject *py_netr_DELTA_DOMAIN_get_domain_create_time(PyObject *obj, void *closure)
    9355             : {
    9356           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9357             :         PyObject *py_domain_create_time;
    9358           0 :         py_domain_create_time = PyLong_FromUnsignedLongLong(object->domain_create_time);
    9359           0 :         return py_domain_create_time;
    9360             : }
    9361             : 
    9362           0 : static int py_netr_DELTA_DOMAIN_set_domain_create_time(PyObject *py_obj, PyObject *value, void *closure)
    9363             : {
    9364           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9365           0 :         if (value == NULL) {
    9366           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_create_time");
    9367           0 :                 return -1;
    9368             :         }
    9369             :         {
    9370           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->domain_create_time));
    9371           0 :                 if (PyLong_Check(value)) {
    9372             :                         unsigned long long test_var;
    9373           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9374           0 :                         if (PyErr_Occurred() != NULL) {
    9375           0 :                                 return -1;
    9376             :                         }
    9377           0 :                         if (test_var > uint_max) {
    9378           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    9379             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9380           0 :                                 return -1;
    9381             :                         }
    9382           0 :                         object->domain_create_time = test_var;
    9383             :                 } else {
    9384           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    9385             :                           PyLong_Type.tp_name);
    9386           0 :                         return -1;
    9387             :                 }
    9388             :         }
    9389           0 :         return 0;
    9390             : }
    9391             : 
    9392           0 : static PyObject *py_netr_DELTA_DOMAIN_get_SecurityInformation(PyObject *obj, void *closure)
    9393             : {
    9394           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9395             :         PyObject *py_SecurityInformation;
    9396           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)object->SecurityInformation);
    9397           0 :         return py_SecurityInformation;
    9398             : }
    9399             : 
    9400           0 : static int py_netr_DELTA_DOMAIN_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
    9401             : {
    9402           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9403           0 :         if (value == NULL) {
    9404           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SecurityInformation");
    9405           0 :                 return -1;
    9406             :         }
    9407             :         {
    9408           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
    9409           0 :                 if (PyLong_Check(value)) {
    9410             :                         unsigned long long test_var;
    9411           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9412           0 :                         if (PyErr_Occurred() != NULL) {
    9413           0 :                                 return -1;
    9414             :                         }
    9415           0 :                         if (test_var > uint_max) {
    9416           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    9417             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9418           0 :                                 return -1;
    9419             :                         }
    9420           0 :                         object->SecurityInformation = test_var;
    9421             :                 } else {
    9422           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    9423             :                           PyLong_Type.tp_name);
    9424           0 :                         return -1;
    9425             :                 }
    9426             :         }
    9427           0 :         return 0;
    9428             : }
    9429             : 
    9430           0 : static PyObject *py_netr_DELTA_DOMAIN_get_sdbuf(PyObject *obj, void *closure)
    9431             : {
    9432           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9433             :         PyObject *py_sdbuf;
    9434           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
    9435           0 :         return py_sdbuf;
    9436             : }
    9437             : 
    9438           0 : static int py_netr_DELTA_DOMAIN_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
    9439             : {
    9440           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9441           0 :         if (value == NULL) {
    9442           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sdbuf");
    9443           0 :                 return -1;
    9444             :         }
    9445           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
    9446           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9447           0 :                 PyErr_NoMemory();
    9448           0 :                 return -1;
    9449             :         }
    9450           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
    9451           0 :         return 0;
    9452             : }
    9453             : 
    9454           0 : static PyObject *py_netr_DELTA_DOMAIN_get_account_lockout(PyObject *obj, void *closure)
    9455             : {
    9456           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9457             :         PyObject *py_account_lockout;
    9458           0 :         py_account_lockout = pytalloc_reference_ex(lsa_BinaryString_Type, pytalloc_get_mem_ctx(obj), &object->account_lockout);
    9459           0 :         return py_account_lockout;
    9460             : }
    9461             : 
    9462           0 : static int py_netr_DELTA_DOMAIN_set_account_lockout(PyObject *py_obj, PyObject *value, void *closure)
    9463             : {
    9464           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9465           0 :         if (value == NULL) {
    9466           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->account_lockout");
    9467           0 :                 return -1;
    9468             :         }
    9469           0 :         PY_CHECK_TYPE(lsa_BinaryString_Type, value, return -1;);
    9470           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9471           0 :                 PyErr_NoMemory();
    9472           0 :                 return -1;
    9473             :         }
    9474           0 :         object->account_lockout = *(struct lsa_BinaryString *)pytalloc_get_ptr(value);
    9475           0 :         return 0;
    9476             : }
    9477             : 
    9478           0 : static PyObject *py_netr_DELTA_DOMAIN_get_unknown2(PyObject *obj, void *closure)
    9479             : {
    9480           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9481             :         PyObject *py_unknown2;
    9482           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
    9483           0 :         return py_unknown2;
    9484             : }
    9485             : 
    9486           0 : static int py_netr_DELTA_DOMAIN_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
    9487             : {
    9488           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9489           0 :         if (value == NULL) {
    9490           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
    9491           0 :                 return -1;
    9492             :         }
    9493           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    9494           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9495           0 :                 PyErr_NoMemory();
    9496           0 :                 return -1;
    9497             :         }
    9498           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
    9499           0 :         return 0;
    9500             : }
    9501             : 
    9502           0 : static PyObject *py_netr_DELTA_DOMAIN_get_unknown3(PyObject *obj, void *closure)
    9503             : {
    9504           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9505             :         PyObject *py_unknown3;
    9506           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
    9507           0 :         return py_unknown3;
    9508             : }
    9509             : 
    9510           0 : static int py_netr_DELTA_DOMAIN_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
    9511             : {
    9512           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9513           0 :         if (value == NULL) {
    9514           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
    9515           0 :                 return -1;
    9516             :         }
    9517           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    9518           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9519           0 :                 PyErr_NoMemory();
    9520           0 :                 return -1;
    9521             :         }
    9522           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
    9523           0 :         return 0;
    9524             : }
    9525             : 
    9526           0 : static PyObject *py_netr_DELTA_DOMAIN_get_unknown4(PyObject *obj, void *closure)
    9527             : {
    9528           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9529             :         PyObject *py_unknown4;
    9530           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
    9531           0 :         return py_unknown4;
    9532             : }
    9533             : 
    9534           0 : static int py_netr_DELTA_DOMAIN_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
    9535             : {
    9536           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9537           0 :         if (value == NULL) {
    9538           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
    9539           0 :                 return -1;
    9540             :         }
    9541           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    9542           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9543           0 :                 PyErr_NoMemory();
    9544           0 :                 return -1;
    9545             :         }
    9546           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
    9547           0 :         return 0;
    9548             : }
    9549             : 
    9550           0 : static PyObject *py_netr_DELTA_DOMAIN_get_logon_to_chgpass(PyObject *obj, void *closure)
    9551             : {
    9552           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9553             :         PyObject *py_logon_to_chgpass;
    9554           0 :         py_logon_to_chgpass = PyLong_FromUnsignedLongLong((uint32_t)object->logon_to_chgpass);
    9555           0 :         return py_logon_to_chgpass;
    9556             : }
    9557             : 
    9558           0 : static int py_netr_DELTA_DOMAIN_set_logon_to_chgpass(PyObject *py_obj, PyObject *value, void *closure)
    9559             : {
    9560           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9561           0 :         if (value == NULL) {
    9562           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_to_chgpass");
    9563           0 :                 return -1;
    9564             :         }
    9565             :         {
    9566           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_to_chgpass));
    9567           0 :                 if (PyLong_Check(value)) {
    9568             :                         unsigned long long test_var;
    9569           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9570           0 :                         if (PyErr_Occurred() != NULL) {
    9571           0 :                                 return -1;
    9572             :                         }
    9573           0 :                         if (test_var > uint_max) {
    9574           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    9575             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9576           0 :                                 return -1;
    9577             :                         }
    9578           0 :                         object->logon_to_chgpass = test_var;
    9579             :                 } else {
    9580           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    9581             :                           PyLong_Type.tp_name);
    9582           0 :                         return -1;
    9583             :                 }
    9584             :         }
    9585           0 :         return 0;
    9586             : }
    9587             : 
    9588           0 : static PyObject *py_netr_DELTA_DOMAIN_get_unknown6(PyObject *obj, void *closure)
    9589             : {
    9590           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9591             :         PyObject *py_unknown6;
    9592           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown6);
    9593           0 :         return py_unknown6;
    9594             : }
    9595             : 
    9596           0 : static int py_netr_DELTA_DOMAIN_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
    9597             : {
    9598           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9599           0 :         if (value == NULL) {
    9600           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown6");
    9601           0 :                 return -1;
    9602             :         }
    9603             :         {
    9604           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
    9605           0 :                 if (PyLong_Check(value)) {
    9606             :                         unsigned long long test_var;
    9607           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9608           0 :                         if (PyErr_Occurred() != NULL) {
    9609           0 :                                 return -1;
    9610             :                         }
    9611           0 :                         if (test_var > uint_max) {
    9612           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    9613             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9614           0 :                                 return -1;
    9615             :                         }
    9616           0 :                         object->unknown6 = test_var;
    9617             :                 } else {
    9618           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    9619             :                           PyLong_Type.tp_name);
    9620           0 :                         return -1;
    9621             :                 }
    9622             :         }
    9623           0 :         return 0;
    9624             : }
    9625             : 
    9626           0 : static PyObject *py_netr_DELTA_DOMAIN_get_unknown7(PyObject *obj, void *closure)
    9627             : {
    9628           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9629             :         PyObject *py_unknown7;
    9630           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown7);
    9631           0 :         return py_unknown7;
    9632             : }
    9633             : 
    9634           0 : static int py_netr_DELTA_DOMAIN_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
    9635             : {
    9636           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9637           0 :         if (value == NULL) {
    9638           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown7");
    9639           0 :                 return -1;
    9640             :         }
    9641             :         {
    9642           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
    9643           0 :                 if (PyLong_Check(value)) {
    9644             :                         unsigned long long test_var;
    9645           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9646           0 :                         if (PyErr_Occurred() != NULL) {
    9647           0 :                                 return -1;
    9648             :                         }
    9649           0 :                         if (test_var > uint_max) {
    9650           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    9651             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9652           0 :                                 return -1;
    9653             :                         }
    9654           0 :                         object->unknown7 = test_var;
    9655             :                 } else {
    9656           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    9657             :                           PyLong_Type.tp_name);
    9658           0 :                         return -1;
    9659             :                 }
    9660             :         }
    9661           0 :         return 0;
    9662             : }
    9663             : 
    9664           0 : static PyObject *py_netr_DELTA_DOMAIN_get_unknown8(PyObject *obj, void *closure)
    9665             : {
    9666           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(obj);
    9667             :         PyObject *py_unknown8;
    9668           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown8);
    9669           0 :         return py_unknown8;
    9670             : }
    9671             : 
    9672           0 : static int py_netr_DELTA_DOMAIN_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
    9673             : {
    9674           0 :         struct netr_DELTA_DOMAIN *object = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(py_obj);
    9675           0 :         if (value == NULL) {
    9676           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown8");
    9677           0 :                 return -1;
    9678             :         }
    9679             :         {
    9680           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
    9681           0 :                 if (PyLong_Check(value)) {
    9682             :                         unsigned long long test_var;
    9683           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9684           0 :                         if (PyErr_Occurred() != NULL) {
    9685           0 :                                 return -1;
    9686             :                         }
    9687           0 :                         if (test_var > uint_max) {
    9688           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    9689             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9690           0 :                                 return -1;
    9691             :                         }
    9692           0 :                         object->unknown8 = test_var;
    9693             :                 } else {
    9694           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    9695             :                           PyLong_Type.tp_name);
    9696           0 :                         return -1;
    9697             :                 }
    9698             :         }
    9699           0 :         return 0;
    9700             : }
    9701             : 
    9702             : static PyGetSetDef py_netr_DELTA_DOMAIN_getsetters[] = {
    9703             :         {
    9704             :                 .name = discard_const_p(char, "domain_name"),
    9705             :                 .get = py_netr_DELTA_DOMAIN_get_domain_name,
    9706             :                 .set = py_netr_DELTA_DOMAIN_set_domain_name,
    9707             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9708             :         },
    9709             :         {
    9710             :                 .name = discard_const_p(char, "oem_information"),
    9711             :                 .get = py_netr_DELTA_DOMAIN_get_oem_information,
    9712             :                 .set = py_netr_DELTA_DOMAIN_set_oem_information,
    9713             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9714             :         },
    9715             :         {
    9716             :                 .name = discard_const_p(char, "force_logoff_time"),
    9717             :                 .get = py_netr_DELTA_DOMAIN_get_force_logoff_time,
    9718             :                 .set = py_netr_DELTA_DOMAIN_set_force_logoff_time,
    9719             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dlong")
    9720             :         },
    9721             :         {
    9722             :                 .name = discard_const_p(char, "min_password_length"),
    9723             :                 .get = py_netr_DELTA_DOMAIN_get_min_password_length,
    9724             :                 .set = py_netr_DELTA_DOMAIN_set_min_password_length,
    9725             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9726             :         },
    9727             :         {
    9728             :                 .name = discard_const_p(char, "password_history_length"),
    9729             :                 .get = py_netr_DELTA_DOMAIN_get_password_history_length,
    9730             :                 .set = py_netr_DELTA_DOMAIN_set_password_history_length,
    9731             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    9732             :         },
    9733             :         {
    9734             :                 .name = discard_const_p(char, "max_password_age"),
    9735             :                 .get = py_netr_DELTA_DOMAIN_get_max_password_age,
    9736             :                 .set = py_netr_DELTA_DOMAIN_set_max_password_age,
    9737             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dlong")
    9738             :         },
    9739             :         {
    9740             :                 .name = discard_const_p(char, "min_password_age"),
    9741             :                 .get = py_netr_DELTA_DOMAIN_get_min_password_age,
    9742             :                 .set = py_netr_DELTA_DOMAIN_set_min_password_age,
    9743             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dlong")
    9744             :         },
    9745             :         {
    9746             :                 .name = discard_const_p(char, "sequence_num"),
    9747             :                 .get = py_netr_DELTA_DOMAIN_get_sequence_num,
    9748             :                 .set = py_netr_DELTA_DOMAIN_set_sequence_num,
    9749             :                 .doc = discard_const_p(char, "PIDL-generated element of base type udlong")
    9750             :         },
    9751             :         {
    9752             :                 .name = discard_const_p(char, "domain_create_time"),
    9753             :                 .get = py_netr_DELTA_DOMAIN_get_domain_create_time,
    9754             :                 .set = py_netr_DELTA_DOMAIN_set_domain_create_time,
    9755             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    9756             :         },
    9757             :         {
    9758             :                 .name = discard_const_p(char, "SecurityInformation"),
    9759             :                 .get = py_netr_DELTA_DOMAIN_get_SecurityInformation,
    9760             :                 .set = py_netr_DELTA_DOMAIN_set_SecurityInformation,
    9761             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9762             :         },
    9763             :         {
    9764             :                 .name = discard_const_p(char, "sdbuf"),
    9765             :                 .get = py_netr_DELTA_DOMAIN_get_sdbuf,
    9766             :                 .set = py_netr_DELTA_DOMAIN_set_sdbuf,
    9767             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
    9768             :         },
    9769             :         {
    9770             :                 .name = discard_const_p(char, "account_lockout"),
    9771             :                 .get = py_netr_DELTA_DOMAIN_get_account_lockout,
    9772             :                 .set = py_netr_DELTA_DOMAIN_set_account_lockout,
    9773             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_BinaryString")
    9774             :         },
    9775             :         {
    9776             :                 .name = discard_const_p(char, "unknown2"),
    9777             :                 .get = py_netr_DELTA_DOMAIN_get_unknown2,
    9778             :                 .set = py_netr_DELTA_DOMAIN_set_unknown2,
    9779             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9780             :         },
    9781             :         {
    9782             :                 .name = discard_const_p(char, "unknown3"),
    9783             :                 .get = py_netr_DELTA_DOMAIN_get_unknown3,
    9784             :                 .set = py_netr_DELTA_DOMAIN_set_unknown3,
    9785             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9786             :         },
    9787             :         {
    9788             :                 .name = discard_const_p(char, "unknown4"),
    9789             :                 .get = py_netr_DELTA_DOMAIN_get_unknown4,
    9790             :                 .set = py_netr_DELTA_DOMAIN_set_unknown4,
    9791             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
    9792             :         },
    9793             :         {
    9794             :                 .name = discard_const_p(char, "logon_to_chgpass"),
    9795             :                 .get = py_netr_DELTA_DOMAIN_get_logon_to_chgpass,
    9796             :                 .set = py_netr_DELTA_DOMAIN_set_logon_to_chgpass,
    9797             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9798             :         },
    9799             :         {
    9800             :                 .name = discard_const_p(char, "unknown6"),
    9801             :                 .get = py_netr_DELTA_DOMAIN_get_unknown6,
    9802             :                 .set = py_netr_DELTA_DOMAIN_set_unknown6,
    9803             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9804             :         },
    9805             :         {
    9806             :                 .name = discard_const_p(char, "unknown7"),
    9807             :                 .get = py_netr_DELTA_DOMAIN_get_unknown7,
    9808             :                 .set = py_netr_DELTA_DOMAIN_set_unknown7,
    9809             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9810             :         },
    9811             :         {
    9812             :                 .name = discard_const_p(char, "unknown8"),
    9813             :                 .get = py_netr_DELTA_DOMAIN_get_unknown8,
    9814             :                 .set = py_netr_DELTA_DOMAIN_set_unknown8,
    9815             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9816             :         },
    9817             :         { .name = NULL }
    9818             : };
    9819             : 
    9820           0 : static PyObject *py_netr_DELTA_DOMAIN_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9821             : {
    9822           0 :         return pytalloc_new(struct netr_DELTA_DOMAIN, type);
    9823             : }
    9824             : 
    9825             : 
    9826             : static PyTypeObject netr_DELTA_DOMAIN_Type = {
    9827             :         PyVarObject_HEAD_INIT(NULL, 0)
    9828             :         .tp_name = "netlogon.netr_DELTA_DOMAIN",
    9829             :         .tp_getset = py_netr_DELTA_DOMAIN_getsetters,
    9830             :         .tp_methods = NULL,
    9831             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9832             :         .tp_new = py_netr_DELTA_DOMAIN_new,
    9833             : };
    9834             : 
    9835             : 
    9836           0 : static PyObject *py_netr_DELTA_GROUP_get_group_name(PyObject *obj, void *closure)
    9837             : {
    9838           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
    9839             :         PyObject *py_group_name;
    9840           0 :         py_group_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->group_name);
    9841           0 :         return py_group_name;
    9842             : }
    9843             : 
    9844           0 : static int py_netr_DELTA_GROUP_set_group_name(PyObject *py_obj, PyObject *value, void *closure)
    9845             : {
    9846           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
    9847           0 :         if (value == NULL) {
    9848           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->group_name");
    9849           0 :                 return -1;
    9850             :         }
    9851           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    9852           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9853           0 :                 PyErr_NoMemory();
    9854           0 :                 return -1;
    9855             :         }
    9856           0 :         object->group_name = *(struct lsa_String *)pytalloc_get_ptr(value);
    9857           0 :         return 0;
    9858             : }
    9859             : 
    9860           0 : static PyObject *py_netr_DELTA_GROUP_get_rid(PyObject *obj, void *closure)
    9861             : {
    9862           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
    9863             :         PyObject *py_rid;
    9864           0 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)object->rid);
    9865           0 :         return py_rid;
    9866             : }
    9867             : 
    9868           0 : static int py_netr_DELTA_GROUP_set_rid(PyObject *py_obj, PyObject *value, void *closure)
    9869             : {
    9870           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
    9871           0 :         if (value == NULL) {
    9872           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rid");
    9873           0 :                 return -1;
    9874             :         }
    9875             :         {
    9876           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rid));
    9877           0 :                 if (PyLong_Check(value)) {
    9878             :                         unsigned long long test_var;
    9879           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9880           0 :                         if (PyErr_Occurred() != NULL) {
    9881           0 :                                 return -1;
    9882             :                         }
    9883           0 :                         if (test_var > uint_max) {
    9884           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    9885             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9886           0 :                                 return -1;
    9887             :                         }
    9888           0 :                         object->rid = test_var;
    9889             :                 } else {
    9890           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    9891             :                           PyLong_Type.tp_name);
    9892           0 :                         return -1;
    9893             :                 }
    9894             :         }
    9895           0 :         return 0;
    9896             : }
    9897             : 
    9898           0 : static PyObject *py_netr_DELTA_GROUP_get_attributes(PyObject *obj, void *closure)
    9899             : {
    9900           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
    9901             :         PyObject *py_attributes;
    9902           0 :         py_attributes = PyLong_FromUnsignedLongLong((uint32_t)object->attributes);
    9903           0 :         return py_attributes;
    9904             : }
    9905             : 
    9906           0 : static int py_netr_DELTA_GROUP_set_attributes(PyObject *py_obj, PyObject *value, void *closure)
    9907             : {
    9908           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
    9909           0 :         if (value == NULL) {
    9910           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attributes");
    9911           0 :                 return -1;
    9912             :         }
    9913             :         {
    9914           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->attributes));
    9915           0 :                 if (PyLong_Check(value)) {
    9916             :                         unsigned long long test_var;
    9917           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9918           0 :                         if (PyErr_Occurred() != NULL) {
    9919           0 :                                 return -1;
    9920             :                         }
    9921           0 :                         if (test_var > uint_max) {
    9922           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    9923             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9924           0 :                                 return -1;
    9925             :                         }
    9926           0 :                         object->attributes = test_var;
    9927             :                 } else {
    9928           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    9929             :                           PyLong_Type.tp_name);
    9930           0 :                         return -1;
    9931             :                 }
    9932             :         }
    9933           0 :         return 0;
    9934             : }
    9935             : 
    9936           0 : static PyObject *py_netr_DELTA_GROUP_get_description(PyObject *obj, void *closure)
    9937             : {
    9938           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
    9939             :         PyObject *py_description;
    9940           0 :         py_description = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->description);
    9941           0 :         return py_description;
    9942             : }
    9943             : 
    9944           0 : static int py_netr_DELTA_GROUP_set_description(PyObject *py_obj, PyObject *value, void *closure)
    9945             : {
    9946           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
    9947           0 :         if (value == NULL) {
    9948           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->description");
    9949           0 :                 return -1;
    9950             :         }
    9951           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
    9952           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9953           0 :                 PyErr_NoMemory();
    9954           0 :                 return -1;
    9955             :         }
    9956           0 :         object->description = *(struct lsa_String *)pytalloc_get_ptr(value);
    9957           0 :         return 0;
    9958             : }
    9959             : 
    9960           0 : static PyObject *py_netr_DELTA_GROUP_get_SecurityInformation(PyObject *obj, void *closure)
    9961             : {
    9962           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
    9963             :         PyObject *py_SecurityInformation;
    9964           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)object->SecurityInformation);
    9965           0 :         return py_SecurityInformation;
    9966             : }
    9967             : 
    9968           0 : static int py_netr_DELTA_GROUP_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
    9969             : {
    9970           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
    9971           0 :         if (value == NULL) {
    9972           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SecurityInformation");
    9973           0 :                 return -1;
    9974             :         }
    9975             :         {
    9976           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
    9977           0 :                 if (PyLong_Check(value)) {
    9978             :                         unsigned long long test_var;
    9979           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9980           0 :                         if (PyErr_Occurred() != NULL) {
    9981           0 :                                 return -1;
    9982             :                         }
    9983           0 :                         if (test_var > uint_max) {
    9984           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
    9985             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9986           0 :                                 return -1;
    9987             :                         }
    9988           0 :                         object->SecurityInformation = test_var;
    9989             :                 } else {
    9990           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
    9991             :                           PyLong_Type.tp_name);
    9992           0 :                         return -1;
    9993             :                 }
    9994             :         }
    9995           0 :         return 0;
    9996             : }
    9997             : 
    9998           0 : static PyObject *py_netr_DELTA_GROUP_get_sdbuf(PyObject *obj, void *closure)
    9999             : {
   10000           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
   10001             :         PyObject *py_sdbuf;
   10002           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
   10003           0 :         return py_sdbuf;
   10004             : }
   10005             : 
   10006           0 : static int py_netr_DELTA_GROUP_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
   10007             : {
   10008           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
   10009           0 :         if (value == NULL) {
   10010           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sdbuf");
   10011           0 :                 return -1;
   10012             :         }
   10013           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
   10014           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10015           0 :                 PyErr_NoMemory();
   10016           0 :                 return -1;
   10017             :         }
   10018           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
   10019           0 :         return 0;
   10020             : }
   10021             : 
   10022           0 : static PyObject *py_netr_DELTA_GROUP_get_unknown1(PyObject *obj, void *closure)
   10023             : {
   10024           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
   10025             :         PyObject *py_unknown1;
   10026           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
   10027           0 :         return py_unknown1;
   10028             : }
   10029             : 
   10030           0 : static int py_netr_DELTA_GROUP_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   10031             : {
   10032           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
   10033           0 :         if (value == NULL) {
   10034           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
   10035           0 :                 return -1;
   10036             :         }
   10037           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10038           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10039           0 :                 PyErr_NoMemory();
   10040           0 :                 return -1;
   10041             :         }
   10042           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
   10043           0 :         return 0;
   10044             : }
   10045             : 
   10046           0 : static PyObject *py_netr_DELTA_GROUP_get_unknown2(PyObject *obj, void *closure)
   10047             : {
   10048           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
   10049             :         PyObject *py_unknown2;
   10050           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
   10051           0 :         return py_unknown2;
   10052             : }
   10053             : 
   10054           0 : static int py_netr_DELTA_GROUP_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   10055             : {
   10056           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
   10057           0 :         if (value == NULL) {
   10058           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
   10059           0 :                 return -1;
   10060             :         }
   10061           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10062           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10063           0 :                 PyErr_NoMemory();
   10064           0 :                 return -1;
   10065             :         }
   10066           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
   10067           0 :         return 0;
   10068             : }
   10069             : 
   10070           0 : static PyObject *py_netr_DELTA_GROUP_get_unknown3(PyObject *obj, void *closure)
   10071             : {
   10072           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
   10073             :         PyObject *py_unknown3;
   10074           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
   10075           0 :         return py_unknown3;
   10076             : }
   10077             : 
   10078           0 : static int py_netr_DELTA_GROUP_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   10079             : {
   10080           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
   10081           0 :         if (value == NULL) {
   10082           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
   10083           0 :                 return -1;
   10084             :         }
   10085           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10086           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10087           0 :                 PyErr_NoMemory();
   10088           0 :                 return -1;
   10089             :         }
   10090           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
   10091           0 :         return 0;
   10092             : }
   10093             : 
   10094           0 : static PyObject *py_netr_DELTA_GROUP_get_unknown4(PyObject *obj, void *closure)
   10095             : {
   10096           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
   10097             :         PyObject *py_unknown4;
   10098           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
   10099           0 :         return py_unknown4;
   10100             : }
   10101             : 
   10102           0 : static int py_netr_DELTA_GROUP_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   10103             : {
   10104           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
   10105           0 :         if (value == NULL) {
   10106           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
   10107           0 :                 return -1;
   10108             :         }
   10109           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10110           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10111           0 :                 PyErr_NoMemory();
   10112           0 :                 return -1;
   10113             :         }
   10114           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
   10115           0 :         return 0;
   10116             : }
   10117             : 
   10118           0 : static PyObject *py_netr_DELTA_GROUP_get_unknown5(PyObject *obj, void *closure)
   10119             : {
   10120           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
   10121             :         PyObject *py_unknown5;
   10122           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown5);
   10123           0 :         return py_unknown5;
   10124             : }
   10125             : 
   10126           0 : static int py_netr_DELTA_GROUP_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
   10127             : {
   10128           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
   10129           0 :         if (value == NULL) {
   10130           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown5");
   10131           0 :                 return -1;
   10132             :         }
   10133             :         {
   10134           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
   10135           0 :                 if (PyLong_Check(value)) {
   10136             :                         unsigned long long test_var;
   10137           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10138           0 :                         if (PyErr_Occurred() != NULL) {
   10139           0 :                                 return -1;
   10140             :                         }
   10141           0 :                         if (test_var > uint_max) {
   10142           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   10143             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10144           0 :                                 return -1;
   10145             :                         }
   10146           0 :                         object->unknown5 = test_var;
   10147             :                 } else {
   10148           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   10149             :                           PyLong_Type.tp_name);
   10150           0 :                         return -1;
   10151             :                 }
   10152             :         }
   10153           0 :         return 0;
   10154             : }
   10155             : 
   10156           0 : static PyObject *py_netr_DELTA_GROUP_get_unknown6(PyObject *obj, void *closure)
   10157             : {
   10158           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
   10159             :         PyObject *py_unknown6;
   10160           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown6);
   10161           0 :         return py_unknown6;
   10162             : }
   10163             : 
   10164           0 : static int py_netr_DELTA_GROUP_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
   10165             : {
   10166           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
   10167           0 :         if (value == NULL) {
   10168           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown6");
   10169           0 :                 return -1;
   10170             :         }
   10171             :         {
   10172           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
   10173           0 :                 if (PyLong_Check(value)) {
   10174             :                         unsigned long long test_var;
   10175           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10176           0 :                         if (PyErr_Occurred() != NULL) {
   10177           0 :                                 return -1;
   10178             :                         }
   10179           0 :                         if (test_var > uint_max) {
   10180           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   10181             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10182           0 :                                 return -1;
   10183             :                         }
   10184           0 :                         object->unknown6 = test_var;
   10185             :                 } else {
   10186           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   10187             :                           PyLong_Type.tp_name);
   10188           0 :                         return -1;
   10189             :                 }
   10190             :         }
   10191           0 :         return 0;
   10192             : }
   10193             : 
   10194           0 : static PyObject *py_netr_DELTA_GROUP_get_unknown7(PyObject *obj, void *closure)
   10195             : {
   10196           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
   10197             :         PyObject *py_unknown7;
   10198           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown7);
   10199           0 :         return py_unknown7;
   10200             : }
   10201             : 
   10202           0 : static int py_netr_DELTA_GROUP_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
   10203             : {
   10204           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
   10205           0 :         if (value == NULL) {
   10206           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown7");
   10207           0 :                 return -1;
   10208             :         }
   10209             :         {
   10210           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
   10211           0 :                 if (PyLong_Check(value)) {
   10212             :                         unsigned long long test_var;
   10213           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10214           0 :                         if (PyErr_Occurred() != NULL) {
   10215           0 :                                 return -1;
   10216             :                         }
   10217           0 :                         if (test_var > uint_max) {
   10218           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   10219             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10220           0 :                                 return -1;
   10221             :                         }
   10222           0 :                         object->unknown7 = test_var;
   10223             :                 } else {
   10224           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   10225             :                           PyLong_Type.tp_name);
   10226           0 :                         return -1;
   10227             :                 }
   10228             :         }
   10229           0 :         return 0;
   10230             : }
   10231             : 
   10232           0 : static PyObject *py_netr_DELTA_GROUP_get_unknown8(PyObject *obj, void *closure)
   10233             : {
   10234           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(obj);
   10235             :         PyObject *py_unknown8;
   10236           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown8);
   10237           0 :         return py_unknown8;
   10238             : }
   10239             : 
   10240           0 : static int py_netr_DELTA_GROUP_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
   10241             : {
   10242           0 :         struct netr_DELTA_GROUP *object = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(py_obj);
   10243           0 :         if (value == NULL) {
   10244           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown8");
   10245           0 :                 return -1;
   10246             :         }
   10247             :         {
   10248           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
   10249           0 :                 if (PyLong_Check(value)) {
   10250             :                         unsigned long long test_var;
   10251           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10252           0 :                         if (PyErr_Occurred() != NULL) {
   10253           0 :                                 return -1;
   10254             :                         }
   10255           0 :                         if (test_var > uint_max) {
   10256           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   10257             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10258           0 :                                 return -1;
   10259             :                         }
   10260           0 :                         object->unknown8 = test_var;
   10261             :                 } else {
   10262           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   10263             :                           PyLong_Type.tp_name);
   10264           0 :                         return -1;
   10265             :                 }
   10266             :         }
   10267           0 :         return 0;
   10268             : }
   10269             : 
   10270             : static PyGetSetDef py_netr_DELTA_GROUP_getsetters[] = {
   10271             :         {
   10272             :                 .name = discard_const_p(char, "group_name"),
   10273             :                 .get = py_netr_DELTA_GROUP_get_group_name,
   10274             :                 .set = py_netr_DELTA_GROUP_set_group_name,
   10275             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10276             :         },
   10277             :         {
   10278             :                 .name = discard_const_p(char, "rid"),
   10279             :                 .get = py_netr_DELTA_GROUP_get_rid,
   10280             :                 .set = py_netr_DELTA_GROUP_set_rid,
   10281             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10282             :         },
   10283             :         {
   10284             :                 .name = discard_const_p(char, "attributes"),
   10285             :                 .get = py_netr_DELTA_GROUP_get_attributes,
   10286             :                 .set = py_netr_DELTA_GROUP_set_attributes,
   10287             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10288             :         },
   10289             :         {
   10290             :                 .name = discard_const_p(char, "description"),
   10291             :                 .get = py_netr_DELTA_GROUP_get_description,
   10292             :                 .set = py_netr_DELTA_GROUP_set_description,
   10293             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10294             :         },
   10295             :         {
   10296             :                 .name = discard_const_p(char, "SecurityInformation"),
   10297             :                 .get = py_netr_DELTA_GROUP_get_SecurityInformation,
   10298             :                 .set = py_netr_DELTA_GROUP_set_SecurityInformation,
   10299             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10300             :         },
   10301             :         {
   10302             :                 .name = discard_const_p(char, "sdbuf"),
   10303             :                 .get = py_netr_DELTA_GROUP_get_sdbuf,
   10304             :                 .set = py_netr_DELTA_GROUP_set_sdbuf,
   10305             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
   10306             :         },
   10307             :         {
   10308             :                 .name = discard_const_p(char, "unknown1"),
   10309             :                 .get = py_netr_DELTA_GROUP_get_unknown1,
   10310             :                 .set = py_netr_DELTA_GROUP_set_unknown1,
   10311             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10312             :         },
   10313             :         {
   10314             :                 .name = discard_const_p(char, "unknown2"),
   10315             :                 .get = py_netr_DELTA_GROUP_get_unknown2,
   10316             :                 .set = py_netr_DELTA_GROUP_set_unknown2,
   10317             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10318             :         },
   10319             :         {
   10320             :                 .name = discard_const_p(char, "unknown3"),
   10321             :                 .get = py_netr_DELTA_GROUP_get_unknown3,
   10322             :                 .set = py_netr_DELTA_GROUP_set_unknown3,
   10323             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10324             :         },
   10325             :         {
   10326             :                 .name = discard_const_p(char, "unknown4"),
   10327             :                 .get = py_netr_DELTA_GROUP_get_unknown4,
   10328             :                 .set = py_netr_DELTA_GROUP_set_unknown4,
   10329             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10330             :         },
   10331             :         {
   10332             :                 .name = discard_const_p(char, "unknown5"),
   10333             :                 .get = py_netr_DELTA_GROUP_get_unknown5,
   10334             :                 .set = py_netr_DELTA_GROUP_set_unknown5,
   10335             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10336             :         },
   10337             :         {
   10338             :                 .name = discard_const_p(char, "unknown6"),
   10339             :                 .get = py_netr_DELTA_GROUP_get_unknown6,
   10340             :                 .set = py_netr_DELTA_GROUP_set_unknown6,
   10341             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10342             :         },
   10343             :         {
   10344             :                 .name = discard_const_p(char, "unknown7"),
   10345             :                 .get = py_netr_DELTA_GROUP_get_unknown7,
   10346             :                 .set = py_netr_DELTA_GROUP_set_unknown7,
   10347             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10348             :         },
   10349             :         {
   10350             :                 .name = discard_const_p(char, "unknown8"),
   10351             :                 .get = py_netr_DELTA_GROUP_get_unknown8,
   10352             :                 .set = py_netr_DELTA_GROUP_set_unknown8,
   10353             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10354             :         },
   10355             :         { .name = NULL }
   10356             : };
   10357             : 
   10358           0 : static PyObject *py_netr_DELTA_GROUP_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10359             : {
   10360           0 :         return pytalloc_new(struct netr_DELTA_GROUP, type);
   10361             : }
   10362             : 
   10363             : 
   10364             : static PyTypeObject netr_DELTA_GROUP_Type = {
   10365             :         PyVarObject_HEAD_INIT(NULL, 0)
   10366             :         .tp_name = "netlogon.netr_DELTA_GROUP",
   10367             :         .tp_getset = py_netr_DELTA_GROUP_getsetters,
   10368             :         .tp_methods = NULL,
   10369             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10370             :         .tp_new = py_netr_DELTA_GROUP_new,
   10371             : };
   10372             : 
   10373             : 
   10374           0 : static PyObject *py_netr_DELTA_RENAME_get_OldName(PyObject *obj, void *closure)
   10375             : {
   10376           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(obj);
   10377             :         PyObject *py_OldName;
   10378           0 :         py_OldName = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->OldName);
   10379           0 :         return py_OldName;
   10380             : }
   10381             : 
   10382           0 : static int py_netr_DELTA_RENAME_set_OldName(PyObject *py_obj, PyObject *value, void *closure)
   10383             : {
   10384           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(py_obj);
   10385           0 :         if (value == NULL) {
   10386           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->OldName");
   10387           0 :                 return -1;
   10388             :         }
   10389           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10390           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10391           0 :                 PyErr_NoMemory();
   10392           0 :                 return -1;
   10393             :         }
   10394           0 :         object->OldName = *(struct lsa_String *)pytalloc_get_ptr(value);
   10395           0 :         return 0;
   10396             : }
   10397             : 
   10398           0 : static PyObject *py_netr_DELTA_RENAME_get_NewName(PyObject *obj, void *closure)
   10399             : {
   10400           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(obj);
   10401             :         PyObject *py_NewName;
   10402           0 :         py_NewName = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->NewName);
   10403           0 :         return py_NewName;
   10404             : }
   10405             : 
   10406           0 : static int py_netr_DELTA_RENAME_set_NewName(PyObject *py_obj, PyObject *value, void *closure)
   10407             : {
   10408           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(py_obj);
   10409           0 :         if (value == NULL) {
   10410           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->NewName");
   10411           0 :                 return -1;
   10412             :         }
   10413           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10414           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10415           0 :                 PyErr_NoMemory();
   10416           0 :                 return -1;
   10417             :         }
   10418           0 :         object->NewName = *(struct lsa_String *)pytalloc_get_ptr(value);
   10419           0 :         return 0;
   10420             : }
   10421             : 
   10422           0 : static PyObject *py_netr_DELTA_RENAME_get_unknown1(PyObject *obj, void *closure)
   10423             : {
   10424           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(obj);
   10425             :         PyObject *py_unknown1;
   10426           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
   10427           0 :         return py_unknown1;
   10428             : }
   10429             : 
   10430           0 : static int py_netr_DELTA_RENAME_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   10431             : {
   10432           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(py_obj);
   10433           0 :         if (value == NULL) {
   10434           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
   10435           0 :                 return -1;
   10436             :         }
   10437           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10438           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10439           0 :                 PyErr_NoMemory();
   10440           0 :                 return -1;
   10441             :         }
   10442           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
   10443           0 :         return 0;
   10444             : }
   10445             : 
   10446           0 : static PyObject *py_netr_DELTA_RENAME_get_unknown2(PyObject *obj, void *closure)
   10447             : {
   10448           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(obj);
   10449             :         PyObject *py_unknown2;
   10450           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
   10451           0 :         return py_unknown2;
   10452             : }
   10453             : 
   10454           0 : static int py_netr_DELTA_RENAME_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   10455             : {
   10456           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(py_obj);
   10457           0 :         if (value == NULL) {
   10458           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
   10459           0 :                 return -1;
   10460             :         }
   10461           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10462           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10463           0 :                 PyErr_NoMemory();
   10464           0 :                 return -1;
   10465             :         }
   10466           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
   10467           0 :         return 0;
   10468             : }
   10469             : 
   10470           0 : static PyObject *py_netr_DELTA_RENAME_get_unknown3(PyObject *obj, void *closure)
   10471             : {
   10472           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(obj);
   10473             :         PyObject *py_unknown3;
   10474           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
   10475           0 :         return py_unknown3;
   10476             : }
   10477             : 
   10478           0 : static int py_netr_DELTA_RENAME_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   10479             : {
   10480           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(py_obj);
   10481           0 :         if (value == NULL) {
   10482           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
   10483           0 :                 return -1;
   10484             :         }
   10485           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10486           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10487           0 :                 PyErr_NoMemory();
   10488           0 :                 return -1;
   10489             :         }
   10490           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
   10491           0 :         return 0;
   10492             : }
   10493             : 
   10494           0 : static PyObject *py_netr_DELTA_RENAME_get_unknown4(PyObject *obj, void *closure)
   10495             : {
   10496           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(obj);
   10497             :         PyObject *py_unknown4;
   10498           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
   10499           0 :         return py_unknown4;
   10500             : }
   10501             : 
   10502           0 : static int py_netr_DELTA_RENAME_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   10503             : {
   10504           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(py_obj);
   10505           0 :         if (value == NULL) {
   10506           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
   10507           0 :                 return -1;
   10508             :         }
   10509           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   10510           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10511           0 :                 PyErr_NoMemory();
   10512           0 :                 return -1;
   10513             :         }
   10514           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
   10515           0 :         return 0;
   10516             : }
   10517             : 
   10518           0 : static PyObject *py_netr_DELTA_RENAME_get_unknown5(PyObject *obj, void *closure)
   10519             : {
   10520           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(obj);
   10521             :         PyObject *py_unknown5;
   10522           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown5);
   10523           0 :         return py_unknown5;
   10524             : }
   10525             : 
   10526           0 : static int py_netr_DELTA_RENAME_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
   10527             : {
   10528           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(py_obj);
   10529           0 :         if (value == NULL) {
   10530           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown5");
   10531           0 :                 return -1;
   10532             :         }
   10533             :         {
   10534           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
   10535           0 :                 if (PyLong_Check(value)) {
   10536             :                         unsigned long long test_var;
   10537           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10538           0 :                         if (PyErr_Occurred() != NULL) {
   10539           0 :                                 return -1;
   10540             :                         }
   10541           0 :                         if (test_var > uint_max) {
   10542           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   10543             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10544           0 :                                 return -1;
   10545             :                         }
   10546           0 :                         object->unknown5 = test_var;
   10547             :                 } else {
   10548           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   10549             :                           PyLong_Type.tp_name);
   10550           0 :                         return -1;
   10551             :                 }
   10552             :         }
   10553           0 :         return 0;
   10554             : }
   10555             : 
   10556           0 : static PyObject *py_netr_DELTA_RENAME_get_unknown6(PyObject *obj, void *closure)
   10557             : {
   10558           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(obj);
   10559             :         PyObject *py_unknown6;
   10560           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown6);
   10561           0 :         return py_unknown6;
   10562             : }
   10563             : 
   10564           0 : static int py_netr_DELTA_RENAME_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
   10565             : {
   10566           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(py_obj);
   10567           0 :         if (value == NULL) {
   10568           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown6");
   10569           0 :                 return -1;
   10570             :         }
   10571             :         {
   10572           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
   10573           0 :                 if (PyLong_Check(value)) {
   10574             :                         unsigned long long test_var;
   10575           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10576           0 :                         if (PyErr_Occurred() != NULL) {
   10577           0 :                                 return -1;
   10578             :                         }
   10579           0 :                         if (test_var > uint_max) {
   10580           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   10581             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10582           0 :                                 return -1;
   10583             :                         }
   10584           0 :                         object->unknown6 = test_var;
   10585             :                 } else {
   10586           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   10587             :                           PyLong_Type.tp_name);
   10588           0 :                         return -1;
   10589             :                 }
   10590             :         }
   10591           0 :         return 0;
   10592             : }
   10593             : 
   10594           0 : static PyObject *py_netr_DELTA_RENAME_get_unknown7(PyObject *obj, void *closure)
   10595             : {
   10596           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(obj);
   10597             :         PyObject *py_unknown7;
   10598           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown7);
   10599           0 :         return py_unknown7;
   10600             : }
   10601             : 
   10602           0 : static int py_netr_DELTA_RENAME_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
   10603             : {
   10604           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(py_obj);
   10605           0 :         if (value == NULL) {
   10606           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown7");
   10607           0 :                 return -1;
   10608             :         }
   10609             :         {
   10610           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
   10611           0 :                 if (PyLong_Check(value)) {
   10612             :                         unsigned long long test_var;
   10613           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10614           0 :                         if (PyErr_Occurred() != NULL) {
   10615           0 :                                 return -1;
   10616             :                         }
   10617           0 :                         if (test_var > uint_max) {
   10618           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   10619             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10620           0 :                                 return -1;
   10621             :                         }
   10622           0 :                         object->unknown7 = test_var;
   10623             :                 } else {
   10624           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   10625             :                           PyLong_Type.tp_name);
   10626           0 :                         return -1;
   10627             :                 }
   10628             :         }
   10629           0 :         return 0;
   10630             : }
   10631             : 
   10632           0 : static PyObject *py_netr_DELTA_RENAME_get_unknown8(PyObject *obj, void *closure)
   10633             : {
   10634           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(obj);
   10635             :         PyObject *py_unknown8;
   10636           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown8);
   10637           0 :         return py_unknown8;
   10638             : }
   10639             : 
   10640           0 : static int py_netr_DELTA_RENAME_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
   10641             : {
   10642           0 :         struct netr_DELTA_RENAME *object = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(py_obj);
   10643           0 :         if (value == NULL) {
   10644           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown8");
   10645           0 :                 return -1;
   10646             :         }
   10647             :         {
   10648           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
   10649           0 :                 if (PyLong_Check(value)) {
   10650             :                         unsigned long long test_var;
   10651           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10652           0 :                         if (PyErr_Occurred() != NULL) {
   10653           0 :                                 return -1;
   10654             :                         }
   10655           0 :                         if (test_var > uint_max) {
   10656           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   10657             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10658           0 :                                 return -1;
   10659             :                         }
   10660           0 :                         object->unknown8 = test_var;
   10661             :                 } else {
   10662           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   10663             :                           PyLong_Type.tp_name);
   10664           0 :                         return -1;
   10665             :                 }
   10666             :         }
   10667           0 :         return 0;
   10668             : }
   10669             : 
   10670             : static PyGetSetDef py_netr_DELTA_RENAME_getsetters[] = {
   10671             :         {
   10672             :                 .name = discard_const_p(char, "OldName"),
   10673             :                 .get = py_netr_DELTA_RENAME_get_OldName,
   10674             :                 .set = py_netr_DELTA_RENAME_set_OldName,
   10675             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10676             :         },
   10677             :         {
   10678             :                 .name = discard_const_p(char, "NewName"),
   10679             :                 .get = py_netr_DELTA_RENAME_get_NewName,
   10680             :                 .set = py_netr_DELTA_RENAME_set_NewName,
   10681             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10682             :         },
   10683             :         {
   10684             :                 .name = discard_const_p(char, "unknown1"),
   10685             :                 .get = py_netr_DELTA_RENAME_get_unknown1,
   10686             :                 .set = py_netr_DELTA_RENAME_set_unknown1,
   10687             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10688             :         },
   10689             :         {
   10690             :                 .name = discard_const_p(char, "unknown2"),
   10691             :                 .get = py_netr_DELTA_RENAME_get_unknown2,
   10692             :                 .set = py_netr_DELTA_RENAME_set_unknown2,
   10693             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10694             :         },
   10695             :         {
   10696             :                 .name = discard_const_p(char, "unknown3"),
   10697             :                 .get = py_netr_DELTA_RENAME_get_unknown3,
   10698             :                 .set = py_netr_DELTA_RENAME_set_unknown3,
   10699             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10700             :         },
   10701             :         {
   10702             :                 .name = discard_const_p(char, "unknown4"),
   10703             :                 .get = py_netr_DELTA_RENAME_get_unknown4,
   10704             :                 .set = py_netr_DELTA_RENAME_set_unknown4,
   10705             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   10706             :         },
   10707             :         {
   10708             :                 .name = discard_const_p(char, "unknown5"),
   10709             :                 .get = py_netr_DELTA_RENAME_get_unknown5,
   10710             :                 .set = py_netr_DELTA_RENAME_set_unknown5,
   10711             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10712             :         },
   10713             :         {
   10714             :                 .name = discard_const_p(char, "unknown6"),
   10715             :                 .get = py_netr_DELTA_RENAME_get_unknown6,
   10716             :                 .set = py_netr_DELTA_RENAME_set_unknown6,
   10717             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10718             :         },
   10719             :         {
   10720             :                 .name = discard_const_p(char, "unknown7"),
   10721             :                 .get = py_netr_DELTA_RENAME_get_unknown7,
   10722             :                 .set = py_netr_DELTA_RENAME_set_unknown7,
   10723             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10724             :         },
   10725             :         {
   10726             :                 .name = discard_const_p(char, "unknown8"),
   10727             :                 .get = py_netr_DELTA_RENAME_get_unknown8,
   10728             :                 .set = py_netr_DELTA_RENAME_set_unknown8,
   10729             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10730             :         },
   10731             :         { .name = NULL }
   10732             : };
   10733             : 
   10734           0 : static PyObject *py_netr_DELTA_RENAME_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10735             : {
   10736           0 :         return pytalloc_new(struct netr_DELTA_RENAME, type);
   10737             : }
   10738             : 
   10739             : 
   10740             : static PyTypeObject netr_DELTA_RENAME_Type = {
   10741             :         PyVarObject_HEAD_INIT(NULL, 0)
   10742             :         .tp_name = "netlogon.netr_DELTA_RENAME",
   10743             :         .tp_getset = py_netr_DELTA_RENAME_getsetters,
   10744             :         .tp_methods = NULL,
   10745             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10746             :         .tp_new = py_netr_DELTA_RENAME_new,
   10747             : };
   10748             : 
   10749             : 
   10750           0 : static PyObject *py_netr_DELTA_GROUP_MEMBER_get_rids(PyObject *obj, void *closure)
   10751             : {
   10752           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(obj);
   10753             :         PyObject *py_rids;
   10754           0 :         if (object->rids == NULL) {
   10755           0 :                 Py_RETURN_NONE;
   10756             :         }
   10757           0 :         if (object->rids == NULL) {
   10758           0 :                 py_rids = Py_None;
   10759           0 :                 Py_INCREF(py_rids);
   10760             :         } else {
   10761           0 :                 py_rids = PyList_New(object->num_rids);
   10762           0 :                 if (py_rids == NULL) {
   10763           0 :                         return NULL;
   10764             :                 }
   10765             :                 {
   10766             :                         int rids_cntr_1;
   10767           0 :                         for (rids_cntr_1 = 0; rids_cntr_1 < (object->num_rids); rids_cntr_1++) {
   10768             :                                 PyObject *py_rids_1;
   10769           0 :                                 py_rids_1 = PyLong_FromUnsignedLongLong((uint32_t)object->rids[rids_cntr_1]);
   10770           0 :                                 PyList_SetItem(py_rids, rids_cntr_1, py_rids_1);
   10771             :                         }
   10772             :                 }
   10773             :         }
   10774           0 :         return py_rids;
   10775             : }
   10776             : 
   10777           0 : static int py_netr_DELTA_GROUP_MEMBER_set_rids(PyObject *py_obj, PyObject *value, void *closure)
   10778             : {
   10779           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(py_obj);
   10780           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->rids));
   10781           0 :         if (value == NULL) {
   10782           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rids");
   10783           0 :                 return -1;
   10784             :         }
   10785           0 :         if (value == Py_None) {
   10786           0 :                 object->rids = NULL;
   10787             :         } else {
   10788           0 :                 object->rids = NULL;
   10789           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   10790             :                 {
   10791             :                         int rids_cntr_1;
   10792           0 :                         object->rids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->rids, PyList_GET_SIZE(value));
   10793           0 :                         if (!object->rids) { return -1;; }
   10794           0 :                         talloc_set_name_const(object->rids, "ARRAY: object->rids");
   10795           0 :                         for (rids_cntr_1 = 0; rids_cntr_1 < PyList_GET_SIZE(value); rids_cntr_1++) {
   10796           0 :                                 if (PyList_GET_ITEM(value, rids_cntr_1) == NULL) {
   10797           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rids[rids_cntr_1]");
   10798           0 :                                         return -1;
   10799             :                                 }
   10800             :                                 {
   10801           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rids[rids_cntr_1]));
   10802           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, rids_cntr_1))) {
   10803             :                                                 unsigned long long test_var;
   10804           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, rids_cntr_1));
   10805           0 :                                                 if (PyErr_Occurred() != NULL) {
   10806           0 :                                                         return -1;
   10807             :                                                 }
   10808           0 :                                                 if (test_var > uint_max) {
   10809           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   10810             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   10811           0 :                                                         return -1;
   10812             :                                                 }
   10813           0 :                                                 object->rids[rids_cntr_1] = test_var;
   10814             :                                         } else {
   10815           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",\
   10816             :                                                   PyLong_Type.tp_name);
   10817           0 :                                                 return -1;
   10818             :                                         }
   10819             :                                 }
   10820             :                         }
   10821             :                 }
   10822             :         }
   10823           0 :         return 0;
   10824             : }
   10825             : 
   10826           0 : static PyObject *py_netr_DELTA_GROUP_MEMBER_get_attribs(PyObject *obj, void *closure)
   10827             : {
   10828           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(obj);
   10829             :         PyObject *py_attribs;
   10830           0 :         if (object->attribs == NULL) {
   10831           0 :                 Py_RETURN_NONE;
   10832             :         }
   10833           0 :         if (object->attribs == NULL) {
   10834           0 :                 py_attribs = Py_None;
   10835           0 :                 Py_INCREF(py_attribs);
   10836             :         } else {
   10837           0 :                 py_attribs = PyList_New(object->num_rids);
   10838           0 :                 if (py_attribs == NULL) {
   10839           0 :                         return NULL;
   10840             :                 }
   10841             :                 {
   10842             :                         int attribs_cntr_1;
   10843           0 :                         for (attribs_cntr_1 = 0; attribs_cntr_1 < (object->num_rids); attribs_cntr_1++) {
   10844             :                                 PyObject *py_attribs_1;
   10845           0 :                                 py_attribs_1 = PyLong_FromUnsignedLongLong((uint32_t)object->attribs[attribs_cntr_1]);
   10846           0 :                                 PyList_SetItem(py_attribs, attribs_cntr_1, py_attribs_1);
   10847             :                         }
   10848             :                 }
   10849             :         }
   10850           0 :         return py_attribs;
   10851             : }
   10852             : 
   10853           0 : static int py_netr_DELTA_GROUP_MEMBER_set_attribs(PyObject *py_obj, PyObject *value, void *closure)
   10854             : {
   10855           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(py_obj);
   10856           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->attribs));
   10857           0 :         if (value == NULL) {
   10858           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attribs");
   10859           0 :                 return -1;
   10860             :         }
   10861           0 :         if (value == Py_None) {
   10862           0 :                 object->attribs = NULL;
   10863             :         } else {
   10864           0 :                 object->attribs = NULL;
   10865           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   10866             :                 {
   10867             :                         int attribs_cntr_1;
   10868           0 :                         object->attribs = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->attribs, PyList_GET_SIZE(value));
   10869           0 :                         if (!object->attribs) { return -1;; }
   10870           0 :                         talloc_set_name_const(object->attribs, "ARRAY: object->attribs");
   10871           0 :                         for (attribs_cntr_1 = 0; attribs_cntr_1 < PyList_GET_SIZE(value); attribs_cntr_1++) {
   10872           0 :                                 if (PyList_GET_ITEM(value, attribs_cntr_1) == NULL) {
   10873           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attribs[attribs_cntr_1]");
   10874           0 :                                         return -1;
   10875             :                                 }
   10876             :                                 {
   10877           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->attribs[attribs_cntr_1]));
   10878           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, attribs_cntr_1))) {
   10879             :                                                 unsigned long long test_var;
   10880           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, attribs_cntr_1));
   10881           0 :                                                 if (PyErr_Occurred() != NULL) {
   10882           0 :                                                         return -1;
   10883             :                                                 }
   10884           0 :                                                 if (test_var > uint_max) {
   10885           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   10886             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   10887           0 :                                                         return -1;
   10888             :                                                 }
   10889           0 :                                                 object->attribs[attribs_cntr_1] = test_var;
   10890             :                                         } else {
   10891           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",\
   10892             :                                                   PyLong_Type.tp_name);
   10893           0 :                                                 return -1;
   10894             :                                         }
   10895             :                                 }
   10896             :                         }
   10897             :                 }
   10898             :         }
   10899           0 :         return 0;
   10900             : }
   10901             : 
   10902           0 : static PyObject *py_netr_DELTA_GROUP_MEMBER_get_num_rids(PyObject *obj, void *closure)
   10903             : {
   10904           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(obj);
   10905             :         PyObject *py_num_rids;
   10906           0 :         py_num_rids = PyLong_FromUnsignedLongLong((uint32_t)object->num_rids);
   10907           0 :         return py_num_rids;
   10908             : }
   10909             : 
   10910           0 : static int py_netr_DELTA_GROUP_MEMBER_set_num_rids(PyObject *py_obj, PyObject *value, void *closure)
   10911             : {
   10912           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(py_obj);
   10913           0 :         if (value == NULL) {
   10914           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_rids");
   10915           0 :                 return -1;
   10916             :         }
   10917             :         {
   10918           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_rids));
   10919           0 :                 if (PyLong_Check(value)) {
   10920             :                         unsigned long long test_var;
   10921           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10922           0 :                         if (PyErr_Occurred() != NULL) {
   10923           0 :                                 return -1;
   10924             :                         }
   10925           0 :                         if (test_var > uint_max) {
   10926           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   10927             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10928           0 :                                 return -1;
   10929             :                         }
   10930           0 :                         object->num_rids = test_var;
   10931             :                 } else {
   10932           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   10933             :                           PyLong_Type.tp_name);
   10934           0 :                         return -1;
   10935             :                 }
   10936             :         }
   10937           0 :         return 0;
   10938             : }
   10939             : 
   10940           0 : static PyObject *py_netr_DELTA_GROUP_MEMBER_get_unknown1(PyObject *obj, void *closure)
   10941             : {
   10942           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(obj);
   10943             :         PyObject *py_unknown1;
   10944           0 :         py_unknown1 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown1);
   10945           0 :         return py_unknown1;
   10946             : }
   10947             : 
   10948           0 : static int py_netr_DELTA_GROUP_MEMBER_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   10949             : {
   10950           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(py_obj);
   10951           0 :         if (value == NULL) {
   10952           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
   10953           0 :                 return -1;
   10954             :         }
   10955             :         {
   10956           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown1));
   10957           0 :                 if (PyLong_Check(value)) {
   10958             :                         unsigned long long test_var;
   10959           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10960           0 :                         if (PyErr_Occurred() != NULL) {
   10961           0 :                                 return -1;
   10962             :                         }
   10963           0 :                         if (test_var > uint_max) {
   10964           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   10965             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10966           0 :                                 return -1;
   10967             :                         }
   10968           0 :                         object->unknown1 = test_var;
   10969             :                 } else {
   10970           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   10971             :                           PyLong_Type.tp_name);
   10972           0 :                         return -1;
   10973             :                 }
   10974             :         }
   10975           0 :         return 0;
   10976             : }
   10977             : 
   10978           0 : static PyObject *py_netr_DELTA_GROUP_MEMBER_get_unknown2(PyObject *obj, void *closure)
   10979             : {
   10980           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(obj);
   10981             :         PyObject *py_unknown2;
   10982           0 :         py_unknown2 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown2);
   10983           0 :         return py_unknown2;
   10984             : }
   10985             : 
   10986           0 : static int py_netr_DELTA_GROUP_MEMBER_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   10987             : {
   10988           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(py_obj);
   10989           0 :         if (value == NULL) {
   10990           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
   10991           0 :                 return -1;
   10992             :         }
   10993             :         {
   10994           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown2));
   10995           0 :                 if (PyLong_Check(value)) {
   10996             :                         unsigned long long test_var;
   10997           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10998           0 :                         if (PyErr_Occurred() != NULL) {
   10999           0 :                                 return -1;
   11000             :                         }
   11001           0 :                         if (test_var > uint_max) {
   11002           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   11003             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11004           0 :                                 return -1;
   11005             :                         }
   11006           0 :                         object->unknown2 = test_var;
   11007             :                 } else {
   11008           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   11009             :                           PyLong_Type.tp_name);
   11010           0 :                         return -1;
   11011             :                 }
   11012             :         }
   11013           0 :         return 0;
   11014             : }
   11015             : 
   11016           0 : static PyObject *py_netr_DELTA_GROUP_MEMBER_get_unknown3(PyObject *obj, void *closure)
   11017             : {
   11018           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(obj);
   11019             :         PyObject *py_unknown3;
   11020           0 :         py_unknown3 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown3);
   11021           0 :         return py_unknown3;
   11022             : }
   11023             : 
   11024           0 : static int py_netr_DELTA_GROUP_MEMBER_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   11025             : {
   11026           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(py_obj);
   11027           0 :         if (value == NULL) {
   11028           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
   11029           0 :                 return -1;
   11030             :         }
   11031             :         {
   11032           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown3));
   11033           0 :                 if (PyLong_Check(value)) {
   11034             :                         unsigned long long test_var;
   11035           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11036           0 :                         if (PyErr_Occurred() != NULL) {
   11037           0 :                                 return -1;
   11038             :                         }
   11039           0 :                         if (test_var > uint_max) {
   11040           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   11041             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11042           0 :                                 return -1;
   11043             :                         }
   11044           0 :                         object->unknown3 = test_var;
   11045             :                 } else {
   11046           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   11047             :                           PyLong_Type.tp_name);
   11048           0 :                         return -1;
   11049             :                 }
   11050             :         }
   11051           0 :         return 0;
   11052             : }
   11053             : 
   11054           0 : static PyObject *py_netr_DELTA_GROUP_MEMBER_get_unknown4(PyObject *obj, void *closure)
   11055             : {
   11056           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(obj);
   11057             :         PyObject *py_unknown4;
   11058           0 :         py_unknown4 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown4);
   11059           0 :         return py_unknown4;
   11060             : }
   11061             : 
   11062           0 : static int py_netr_DELTA_GROUP_MEMBER_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   11063             : {
   11064           0 :         struct netr_DELTA_GROUP_MEMBER *object = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(py_obj);
   11065           0 :         if (value == NULL) {
   11066           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
   11067           0 :                 return -1;
   11068             :         }
   11069             :         {
   11070           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown4));
   11071           0 :                 if (PyLong_Check(value)) {
   11072             :                         unsigned long long test_var;
   11073           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11074           0 :                         if (PyErr_Occurred() != NULL) {
   11075           0 :                                 return -1;
   11076             :                         }
   11077           0 :                         if (test_var > uint_max) {
   11078           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   11079             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11080           0 :                                 return -1;
   11081             :                         }
   11082           0 :                         object->unknown4 = test_var;
   11083             :                 } else {
   11084           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   11085             :                           PyLong_Type.tp_name);
   11086           0 :                         return -1;
   11087             :                 }
   11088             :         }
   11089           0 :         return 0;
   11090             : }
   11091             : 
   11092             : static PyGetSetDef py_netr_DELTA_GROUP_MEMBER_getsetters[] = {
   11093             :         {
   11094             :                 .name = discard_const_p(char, "rids"),
   11095             :                 .get = py_netr_DELTA_GROUP_MEMBER_get_rids,
   11096             :                 .set = py_netr_DELTA_GROUP_MEMBER_set_rids,
   11097             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11098             :         },
   11099             :         {
   11100             :                 .name = discard_const_p(char, "attribs"),
   11101             :                 .get = py_netr_DELTA_GROUP_MEMBER_get_attribs,
   11102             :                 .set = py_netr_DELTA_GROUP_MEMBER_set_attribs,
   11103             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11104             :         },
   11105             :         {
   11106             :                 .name = discard_const_p(char, "num_rids"),
   11107             :                 .get = py_netr_DELTA_GROUP_MEMBER_get_num_rids,
   11108             :                 .set = py_netr_DELTA_GROUP_MEMBER_set_num_rids,
   11109             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11110             :         },
   11111             :         {
   11112             :                 .name = discard_const_p(char, "unknown1"),
   11113             :                 .get = py_netr_DELTA_GROUP_MEMBER_get_unknown1,
   11114             :                 .set = py_netr_DELTA_GROUP_MEMBER_set_unknown1,
   11115             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11116             :         },
   11117             :         {
   11118             :                 .name = discard_const_p(char, "unknown2"),
   11119             :                 .get = py_netr_DELTA_GROUP_MEMBER_get_unknown2,
   11120             :                 .set = py_netr_DELTA_GROUP_MEMBER_set_unknown2,
   11121             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11122             :         },
   11123             :         {
   11124             :                 .name = discard_const_p(char, "unknown3"),
   11125             :                 .get = py_netr_DELTA_GROUP_MEMBER_get_unknown3,
   11126             :                 .set = py_netr_DELTA_GROUP_MEMBER_set_unknown3,
   11127             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11128             :         },
   11129             :         {
   11130             :                 .name = discard_const_p(char, "unknown4"),
   11131             :                 .get = py_netr_DELTA_GROUP_MEMBER_get_unknown4,
   11132             :                 .set = py_netr_DELTA_GROUP_MEMBER_set_unknown4,
   11133             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11134             :         },
   11135             :         { .name = NULL }
   11136             : };
   11137             : 
   11138           0 : static PyObject *py_netr_DELTA_GROUP_MEMBER_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11139             : {
   11140           0 :         return pytalloc_new(struct netr_DELTA_GROUP_MEMBER, type);
   11141             : }
   11142             : 
   11143             : 
   11144             : static PyTypeObject netr_DELTA_GROUP_MEMBER_Type = {
   11145             :         PyVarObject_HEAD_INIT(NULL, 0)
   11146             :         .tp_name = "netlogon.netr_DELTA_GROUP_MEMBER",
   11147             :         .tp_getset = py_netr_DELTA_GROUP_MEMBER_getsetters,
   11148             :         .tp_methods = NULL,
   11149             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11150             :         .tp_new = py_netr_DELTA_GROUP_MEMBER_new,
   11151             : };
   11152             : 
   11153             : 
   11154           0 : static PyObject *py_netr_DELTA_ALIAS_get_alias_name(PyObject *obj, void *closure)
   11155             : {
   11156           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(obj);
   11157             :         PyObject *py_alias_name;
   11158           0 :         py_alias_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->alias_name);
   11159           0 :         return py_alias_name;
   11160             : }
   11161             : 
   11162           0 : static int py_netr_DELTA_ALIAS_set_alias_name(PyObject *py_obj, PyObject *value, void *closure)
   11163             : {
   11164           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(py_obj);
   11165           0 :         if (value == NULL) {
   11166           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->alias_name");
   11167           0 :                 return -1;
   11168             :         }
   11169           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   11170           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11171           0 :                 PyErr_NoMemory();
   11172           0 :                 return -1;
   11173             :         }
   11174           0 :         object->alias_name = *(struct lsa_String *)pytalloc_get_ptr(value);
   11175           0 :         return 0;
   11176             : }
   11177             : 
   11178           0 : static PyObject *py_netr_DELTA_ALIAS_get_rid(PyObject *obj, void *closure)
   11179             : {
   11180           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(obj);
   11181             :         PyObject *py_rid;
   11182           0 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)object->rid);
   11183           0 :         return py_rid;
   11184             : }
   11185             : 
   11186           0 : static int py_netr_DELTA_ALIAS_set_rid(PyObject *py_obj, PyObject *value, void *closure)
   11187             : {
   11188           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(py_obj);
   11189           0 :         if (value == NULL) {
   11190           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rid");
   11191           0 :                 return -1;
   11192             :         }
   11193             :         {
   11194           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rid));
   11195           0 :                 if (PyLong_Check(value)) {
   11196             :                         unsigned long long test_var;
   11197           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11198           0 :                         if (PyErr_Occurred() != NULL) {
   11199           0 :                                 return -1;
   11200             :                         }
   11201           0 :                         if (test_var > uint_max) {
   11202           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   11203             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11204           0 :                                 return -1;
   11205             :                         }
   11206           0 :                         object->rid = test_var;
   11207             :                 } else {
   11208           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   11209             :                           PyLong_Type.tp_name);
   11210           0 :                         return -1;
   11211             :                 }
   11212             :         }
   11213           0 :         return 0;
   11214             : }
   11215             : 
   11216           0 : static PyObject *py_netr_DELTA_ALIAS_get_SecurityInformation(PyObject *obj, void *closure)
   11217             : {
   11218           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(obj);
   11219             :         PyObject *py_SecurityInformation;
   11220           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)object->SecurityInformation);
   11221           0 :         return py_SecurityInformation;
   11222             : }
   11223             : 
   11224           0 : static int py_netr_DELTA_ALIAS_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
   11225             : {
   11226           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(py_obj);
   11227           0 :         if (value == NULL) {
   11228           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SecurityInformation");
   11229           0 :                 return -1;
   11230             :         }
   11231             :         {
   11232           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
   11233           0 :                 if (PyLong_Check(value)) {
   11234             :                         unsigned long long test_var;
   11235           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11236           0 :                         if (PyErr_Occurred() != NULL) {
   11237           0 :                                 return -1;
   11238             :                         }
   11239           0 :                         if (test_var > uint_max) {
   11240           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   11241             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11242           0 :                                 return -1;
   11243             :                         }
   11244           0 :                         object->SecurityInformation = test_var;
   11245             :                 } else {
   11246           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   11247             :                           PyLong_Type.tp_name);
   11248           0 :                         return -1;
   11249             :                 }
   11250             :         }
   11251           0 :         return 0;
   11252             : }
   11253             : 
   11254           0 : static PyObject *py_netr_DELTA_ALIAS_get_sdbuf(PyObject *obj, void *closure)
   11255             : {
   11256           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(obj);
   11257             :         PyObject *py_sdbuf;
   11258           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
   11259           0 :         return py_sdbuf;
   11260             : }
   11261             : 
   11262           0 : static int py_netr_DELTA_ALIAS_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
   11263             : {
   11264           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(py_obj);
   11265           0 :         if (value == NULL) {
   11266           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sdbuf");
   11267           0 :                 return -1;
   11268             :         }
   11269           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
   11270           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11271           0 :                 PyErr_NoMemory();
   11272           0 :                 return -1;
   11273             :         }
   11274           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
   11275           0 :         return 0;
   11276             : }
   11277             : 
   11278           0 : static PyObject *py_netr_DELTA_ALIAS_get_description(PyObject *obj, void *closure)
   11279             : {
   11280           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(obj);
   11281             :         PyObject *py_description;
   11282           0 :         py_description = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->description);
   11283           0 :         return py_description;
   11284             : }
   11285             : 
   11286           0 : static int py_netr_DELTA_ALIAS_set_description(PyObject *py_obj, PyObject *value, void *closure)
   11287             : {
   11288           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(py_obj);
   11289           0 :         if (value == NULL) {
   11290           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->description");
   11291           0 :                 return -1;
   11292             :         }
   11293           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   11294           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11295           0 :                 PyErr_NoMemory();
   11296           0 :                 return -1;
   11297             :         }
   11298           0 :         object->description = *(struct lsa_String *)pytalloc_get_ptr(value);
   11299           0 :         return 0;
   11300             : }
   11301             : 
   11302           0 : static PyObject *py_netr_DELTA_ALIAS_get_unknown2(PyObject *obj, void *closure)
   11303             : {
   11304           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(obj);
   11305             :         PyObject *py_unknown2;
   11306           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
   11307           0 :         return py_unknown2;
   11308             : }
   11309             : 
   11310           0 : static int py_netr_DELTA_ALIAS_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   11311             : {
   11312           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(py_obj);
   11313           0 :         if (value == NULL) {
   11314           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
   11315           0 :                 return -1;
   11316             :         }
   11317           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   11318           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11319           0 :                 PyErr_NoMemory();
   11320           0 :                 return -1;
   11321             :         }
   11322           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
   11323           0 :         return 0;
   11324             : }
   11325             : 
   11326           0 : static PyObject *py_netr_DELTA_ALIAS_get_unknown3(PyObject *obj, void *closure)
   11327             : {
   11328           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(obj);
   11329             :         PyObject *py_unknown3;
   11330           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
   11331           0 :         return py_unknown3;
   11332             : }
   11333             : 
   11334           0 : static int py_netr_DELTA_ALIAS_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   11335             : {
   11336           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(py_obj);
   11337           0 :         if (value == NULL) {
   11338           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
   11339           0 :                 return -1;
   11340             :         }
   11341           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   11342           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11343           0 :                 PyErr_NoMemory();
   11344           0 :                 return -1;
   11345             :         }
   11346           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
   11347           0 :         return 0;
   11348             : }
   11349             : 
   11350           0 : static PyObject *py_netr_DELTA_ALIAS_get_unknown4(PyObject *obj, void *closure)
   11351             : {
   11352           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(obj);
   11353             :         PyObject *py_unknown4;
   11354           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
   11355           0 :         return py_unknown4;
   11356             : }
   11357             : 
   11358           0 : static int py_netr_DELTA_ALIAS_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   11359             : {
   11360           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(py_obj);
   11361           0 :         if (value == NULL) {
   11362           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
   11363           0 :                 return -1;
   11364             :         }
   11365           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   11366           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11367           0 :                 PyErr_NoMemory();
   11368           0 :                 return -1;
   11369             :         }
   11370           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
   11371           0 :         return 0;
   11372             : }
   11373             : 
   11374           0 : static PyObject *py_netr_DELTA_ALIAS_get_unknown5(PyObject *obj, void *closure)
   11375             : {
   11376           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(obj);
   11377             :         PyObject *py_unknown5;
   11378           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown5);
   11379           0 :         return py_unknown5;
   11380             : }
   11381             : 
   11382           0 : static int py_netr_DELTA_ALIAS_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
   11383             : {
   11384           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(py_obj);
   11385           0 :         if (value == NULL) {
   11386           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown5");
   11387           0 :                 return -1;
   11388             :         }
   11389             :         {
   11390           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
   11391           0 :                 if (PyLong_Check(value)) {
   11392             :                         unsigned long long test_var;
   11393           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11394           0 :                         if (PyErr_Occurred() != NULL) {
   11395           0 :                                 return -1;
   11396             :                         }
   11397           0 :                         if (test_var > uint_max) {
   11398           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   11399             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11400           0 :                                 return -1;
   11401             :                         }
   11402           0 :                         object->unknown5 = test_var;
   11403             :                 } else {
   11404           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   11405             :                           PyLong_Type.tp_name);
   11406           0 :                         return -1;
   11407             :                 }
   11408             :         }
   11409           0 :         return 0;
   11410             : }
   11411             : 
   11412           0 : static PyObject *py_netr_DELTA_ALIAS_get_unknown6(PyObject *obj, void *closure)
   11413             : {
   11414           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(obj);
   11415             :         PyObject *py_unknown6;
   11416           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown6);
   11417           0 :         return py_unknown6;
   11418             : }
   11419             : 
   11420           0 : static int py_netr_DELTA_ALIAS_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
   11421             : {
   11422           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(py_obj);
   11423           0 :         if (value == NULL) {
   11424           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown6");
   11425           0 :                 return -1;
   11426             :         }
   11427             :         {
   11428           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
   11429           0 :                 if (PyLong_Check(value)) {
   11430             :                         unsigned long long test_var;
   11431           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11432           0 :                         if (PyErr_Occurred() != NULL) {
   11433           0 :                                 return -1;
   11434             :                         }
   11435           0 :                         if (test_var > uint_max) {
   11436           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   11437             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11438           0 :                                 return -1;
   11439             :                         }
   11440           0 :                         object->unknown6 = test_var;
   11441             :                 } else {
   11442           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   11443             :                           PyLong_Type.tp_name);
   11444           0 :                         return -1;
   11445             :                 }
   11446             :         }
   11447           0 :         return 0;
   11448             : }
   11449             : 
   11450           0 : static PyObject *py_netr_DELTA_ALIAS_get_unknown7(PyObject *obj, void *closure)
   11451             : {
   11452           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(obj);
   11453             :         PyObject *py_unknown7;
   11454           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown7);
   11455           0 :         return py_unknown7;
   11456             : }
   11457             : 
   11458           0 : static int py_netr_DELTA_ALIAS_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
   11459             : {
   11460           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(py_obj);
   11461           0 :         if (value == NULL) {
   11462           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown7");
   11463           0 :                 return -1;
   11464             :         }
   11465             :         {
   11466           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
   11467           0 :                 if (PyLong_Check(value)) {
   11468             :                         unsigned long long test_var;
   11469           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11470           0 :                         if (PyErr_Occurred() != NULL) {
   11471           0 :                                 return -1;
   11472             :                         }
   11473           0 :                         if (test_var > uint_max) {
   11474           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   11475             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11476           0 :                                 return -1;
   11477             :                         }
   11478           0 :                         object->unknown7 = test_var;
   11479             :                 } else {
   11480           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   11481             :                           PyLong_Type.tp_name);
   11482           0 :                         return -1;
   11483             :                 }
   11484             :         }
   11485           0 :         return 0;
   11486             : }
   11487             : 
   11488           0 : static PyObject *py_netr_DELTA_ALIAS_get_unknown8(PyObject *obj, void *closure)
   11489             : {
   11490           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(obj);
   11491             :         PyObject *py_unknown8;
   11492           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown8);
   11493           0 :         return py_unknown8;
   11494             : }
   11495             : 
   11496           0 : static int py_netr_DELTA_ALIAS_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
   11497             : {
   11498           0 :         struct netr_DELTA_ALIAS *object = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(py_obj);
   11499           0 :         if (value == NULL) {
   11500           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown8");
   11501           0 :                 return -1;
   11502             :         }
   11503             :         {
   11504           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
   11505           0 :                 if (PyLong_Check(value)) {
   11506             :                         unsigned long long test_var;
   11507           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11508           0 :                         if (PyErr_Occurred() != NULL) {
   11509           0 :                                 return -1;
   11510             :                         }
   11511           0 :                         if (test_var > uint_max) {
   11512           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   11513             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11514           0 :                                 return -1;
   11515             :                         }
   11516           0 :                         object->unknown8 = test_var;
   11517             :                 } else {
   11518           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   11519             :                           PyLong_Type.tp_name);
   11520           0 :                         return -1;
   11521             :                 }
   11522             :         }
   11523           0 :         return 0;
   11524             : }
   11525             : 
   11526             : static PyGetSetDef py_netr_DELTA_ALIAS_getsetters[] = {
   11527             :         {
   11528             :                 .name = discard_const_p(char, "alias_name"),
   11529             :                 .get = py_netr_DELTA_ALIAS_get_alias_name,
   11530             :                 .set = py_netr_DELTA_ALIAS_set_alias_name,
   11531             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   11532             :         },
   11533             :         {
   11534             :                 .name = discard_const_p(char, "rid"),
   11535             :                 .get = py_netr_DELTA_ALIAS_get_rid,
   11536             :                 .set = py_netr_DELTA_ALIAS_set_rid,
   11537             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11538             :         },
   11539             :         {
   11540             :                 .name = discard_const_p(char, "SecurityInformation"),
   11541             :                 .get = py_netr_DELTA_ALIAS_get_SecurityInformation,
   11542             :                 .set = py_netr_DELTA_ALIAS_set_SecurityInformation,
   11543             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11544             :         },
   11545             :         {
   11546             :                 .name = discard_const_p(char, "sdbuf"),
   11547             :                 .get = py_netr_DELTA_ALIAS_get_sdbuf,
   11548             :                 .set = py_netr_DELTA_ALIAS_set_sdbuf,
   11549             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
   11550             :         },
   11551             :         {
   11552             :                 .name = discard_const_p(char, "description"),
   11553             :                 .get = py_netr_DELTA_ALIAS_get_description,
   11554             :                 .set = py_netr_DELTA_ALIAS_set_description,
   11555             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   11556             :         },
   11557             :         {
   11558             :                 .name = discard_const_p(char, "unknown2"),
   11559             :                 .get = py_netr_DELTA_ALIAS_get_unknown2,
   11560             :                 .set = py_netr_DELTA_ALIAS_set_unknown2,
   11561             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   11562             :         },
   11563             :         {
   11564             :                 .name = discard_const_p(char, "unknown3"),
   11565             :                 .get = py_netr_DELTA_ALIAS_get_unknown3,
   11566             :                 .set = py_netr_DELTA_ALIAS_set_unknown3,
   11567             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   11568             :         },
   11569             :         {
   11570             :                 .name = discard_const_p(char, "unknown4"),
   11571             :                 .get = py_netr_DELTA_ALIAS_get_unknown4,
   11572             :                 .set = py_netr_DELTA_ALIAS_set_unknown4,
   11573             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   11574             :         },
   11575             :         {
   11576             :                 .name = discard_const_p(char, "unknown5"),
   11577             :                 .get = py_netr_DELTA_ALIAS_get_unknown5,
   11578             :                 .set = py_netr_DELTA_ALIAS_set_unknown5,
   11579             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11580             :         },
   11581             :         {
   11582             :                 .name = discard_const_p(char, "unknown6"),
   11583             :                 .get = py_netr_DELTA_ALIAS_get_unknown6,
   11584             :                 .set = py_netr_DELTA_ALIAS_set_unknown6,
   11585             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11586             :         },
   11587             :         {
   11588             :                 .name = discard_const_p(char, "unknown7"),
   11589             :                 .get = py_netr_DELTA_ALIAS_get_unknown7,
   11590             :                 .set = py_netr_DELTA_ALIAS_set_unknown7,
   11591             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11592             :         },
   11593             :         {
   11594             :                 .name = discard_const_p(char, "unknown8"),
   11595             :                 .get = py_netr_DELTA_ALIAS_get_unknown8,
   11596             :                 .set = py_netr_DELTA_ALIAS_set_unknown8,
   11597             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11598             :         },
   11599             :         { .name = NULL }
   11600             : };
   11601             : 
   11602           0 : static PyObject *py_netr_DELTA_ALIAS_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11603             : {
   11604           0 :         return pytalloc_new(struct netr_DELTA_ALIAS, type);
   11605             : }
   11606             : 
   11607             : 
   11608             : static PyTypeObject netr_DELTA_ALIAS_Type = {
   11609             :         PyVarObject_HEAD_INIT(NULL, 0)
   11610             :         .tp_name = "netlogon.netr_DELTA_ALIAS",
   11611             :         .tp_getset = py_netr_DELTA_ALIAS_getsetters,
   11612             :         .tp_methods = NULL,
   11613             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11614             :         .tp_new = py_netr_DELTA_ALIAS_new,
   11615             : };
   11616             : 
   11617             : 
   11618           0 : static PyObject *py_netr_DELTA_ALIAS_MEMBER_get_sids(PyObject *obj, void *closure)
   11619             : {
   11620           0 :         struct netr_DELTA_ALIAS_MEMBER *object = (struct netr_DELTA_ALIAS_MEMBER *)pytalloc_get_ptr(obj);
   11621             :         PyObject *py_sids;
   11622           0 :         py_sids = pytalloc_reference_ex(lsa_SidArray_Type, pytalloc_get_mem_ctx(obj), &object->sids);
   11623           0 :         return py_sids;
   11624             : }
   11625             : 
   11626           0 : static int py_netr_DELTA_ALIAS_MEMBER_set_sids(PyObject *py_obj, PyObject *value, void *closure)
   11627             : {
   11628           0 :         struct netr_DELTA_ALIAS_MEMBER *object = (struct netr_DELTA_ALIAS_MEMBER *)pytalloc_get_ptr(py_obj);
   11629           0 :         if (value == NULL) {
   11630           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sids");
   11631           0 :                 return -1;
   11632             :         }
   11633           0 :         PY_CHECK_TYPE(lsa_SidArray_Type, value, return -1;);
   11634           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11635           0 :                 PyErr_NoMemory();
   11636           0 :                 return -1;
   11637             :         }
   11638           0 :         object->sids = *(struct lsa_SidArray *)pytalloc_get_ptr(value);
   11639           0 :         return 0;
   11640             : }
   11641             : 
   11642           0 : static PyObject *py_netr_DELTA_ALIAS_MEMBER_get_unknown1(PyObject *obj, void *closure)
   11643             : {
   11644           0 :         struct netr_DELTA_ALIAS_MEMBER *object = (struct netr_DELTA_ALIAS_MEMBER *)pytalloc_get_ptr(obj);
   11645             :         PyObject *py_unknown1;
   11646           0 :         py_unknown1 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown1);
   11647           0 :         return py_unknown1;
   11648             : }
   11649             : 
   11650           0 : static int py_netr_DELTA_ALIAS_MEMBER_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   11651             : {
   11652           0 :         struct netr_DELTA_ALIAS_MEMBER *object = (struct netr_DELTA_ALIAS_MEMBER *)pytalloc_get_ptr(py_obj);
   11653           0 :         if (value == NULL) {
   11654           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
   11655           0 :                 return -1;
   11656             :         }
   11657             :         {
   11658           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown1));
   11659           0 :                 if (PyLong_Check(value)) {
   11660             :                         unsigned long long test_var;
   11661           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11662           0 :                         if (PyErr_Occurred() != NULL) {
   11663           0 :                                 return -1;
   11664             :                         }
   11665           0 :                         if (test_var > uint_max) {
   11666           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   11667             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11668           0 :                                 return -1;
   11669             :                         }
   11670           0 :                         object->unknown1 = test_var;
   11671             :                 } else {
   11672           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   11673             :                           PyLong_Type.tp_name);
   11674           0 :                         return -1;
   11675             :                 }
   11676             :         }
   11677           0 :         return 0;
   11678             : }
   11679             : 
   11680           0 : static PyObject *py_netr_DELTA_ALIAS_MEMBER_get_unknown2(PyObject *obj, void *closure)
   11681             : {
   11682           0 :         struct netr_DELTA_ALIAS_MEMBER *object = (struct netr_DELTA_ALIAS_MEMBER *)pytalloc_get_ptr(obj);
   11683             :         PyObject *py_unknown2;
   11684           0 :         py_unknown2 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown2);
   11685           0 :         return py_unknown2;
   11686             : }
   11687             : 
   11688           0 : static int py_netr_DELTA_ALIAS_MEMBER_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   11689             : {
   11690           0 :         struct netr_DELTA_ALIAS_MEMBER *object = (struct netr_DELTA_ALIAS_MEMBER *)pytalloc_get_ptr(py_obj);
   11691           0 :         if (value == NULL) {
   11692           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
   11693           0 :                 return -1;
   11694             :         }
   11695             :         {
   11696           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown2));
   11697           0 :                 if (PyLong_Check(value)) {
   11698             :                         unsigned long long test_var;
   11699           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11700           0 :                         if (PyErr_Occurred() != NULL) {
   11701           0 :                                 return -1;
   11702             :                         }
   11703           0 :                         if (test_var > uint_max) {
   11704           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   11705             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11706           0 :                                 return -1;
   11707             :                         }
   11708           0 :                         object->unknown2 = test_var;
   11709             :                 } else {
   11710           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   11711             :                           PyLong_Type.tp_name);
   11712           0 :                         return -1;
   11713             :                 }
   11714             :         }
   11715           0 :         return 0;
   11716             : }
   11717             : 
   11718           0 : static PyObject *py_netr_DELTA_ALIAS_MEMBER_get_unknown3(PyObject *obj, void *closure)
   11719             : {
   11720           0 :         struct netr_DELTA_ALIAS_MEMBER *object = (struct netr_DELTA_ALIAS_MEMBER *)pytalloc_get_ptr(obj);
   11721             :         PyObject *py_unknown3;
   11722           0 :         py_unknown3 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown3);
   11723           0 :         return py_unknown3;
   11724             : }
   11725             : 
   11726           0 : static int py_netr_DELTA_ALIAS_MEMBER_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   11727             : {
   11728           0 :         struct netr_DELTA_ALIAS_MEMBER *object = (struct netr_DELTA_ALIAS_MEMBER *)pytalloc_get_ptr(py_obj);
   11729           0 :         if (value == NULL) {
   11730           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
   11731           0 :                 return -1;
   11732             :         }
   11733             :         {
   11734           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown3));
   11735           0 :                 if (PyLong_Check(value)) {
   11736             :                         unsigned long long test_var;
   11737           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11738           0 :                         if (PyErr_Occurred() != NULL) {
   11739           0 :                                 return -1;
   11740             :                         }
   11741           0 :                         if (test_var > uint_max) {
   11742           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   11743             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11744           0 :                                 return -1;
   11745             :                         }
   11746           0 :                         object->unknown3 = test_var;
   11747             :                 } else {
   11748           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   11749             :                           PyLong_Type.tp_name);
   11750           0 :                         return -1;
   11751             :                 }
   11752             :         }
   11753           0 :         return 0;
   11754             : }
   11755             : 
   11756           0 : static PyObject *py_netr_DELTA_ALIAS_MEMBER_get_unknown4(PyObject *obj, void *closure)
   11757             : {
   11758           0 :         struct netr_DELTA_ALIAS_MEMBER *object = (struct netr_DELTA_ALIAS_MEMBER *)pytalloc_get_ptr(obj);
   11759             :         PyObject *py_unknown4;
   11760           0 :         py_unknown4 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown4);
   11761           0 :         return py_unknown4;
   11762             : }
   11763             : 
   11764           0 : static int py_netr_DELTA_ALIAS_MEMBER_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   11765             : {
   11766           0 :         struct netr_DELTA_ALIAS_MEMBER *object = (struct netr_DELTA_ALIAS_MEMBER *)pytalloc_get_ptr(py_obj);
   11767           0 :         if (value == NULL) {
   11768           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
   11769           0 :                 return -1;
   11770             :         }
   11771             :         {
   11772           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown4));
   11773           0 :                 if (PyLong_Check(value)) {
   11774             :                         unsigned long long test_var;
   11775           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11776           0 :                         if (PyErr_Occurred() != NULL) {
   11777           0 :                                 return -1;
   11778             :                         }
   11779           0 :                         if (test_var > uint_max) {
   11780           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   11781             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11782           0 :                                 return -1;
   11783             :                         }
   11784           0 :                         object->unknown4 = test_var;
   11785             :                 } else {
   11786           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   11787             :                           PyLong_Type.tp_name);
   11788           0 :                         return -1;
   11789             :                 }
   11790             :         }
   11791           0 :         return 0;
   11792             : }
   11793             : 
   11794             : static PyGetSetDef py_netr_DELTA_ALIAS_MEMBER_getsetters[] = {
   11795             :         {
   11796             :                 .name = discard_const_p(char, "sids"),
   11797             :                 .get = py_netr_DELTA_ALIAS_MEMBER_get_sids,
   11798             :                 .set = py_netr_DELTA_ALIAS_MEMBER_set_sids,
   11799             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_SidArray")
   11800             :         },
   11801             :         {
   11802             :                 .name = discard_const_p(char, "unknown1"),
   11803             :                 .get = py_netr_DELTA_ALIAS_MEMBER_get_unknown1,
   11804             :                 .set = py_netr_DELTA_ALIAS_MEMBER_set_unknown1,
   11805             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11806             :         },
   11807             :         {
   11808             :                 .name = discard_const_p(char, "unknown2"),
   11809             :                 .get = py_netr_DELTA_ALIAS_MEMBER_get_unknown2,
   11810             :                 .set = py_netr_DELTA_ALIAS_MEMBER_set_unknown2,
   11811             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11812             :         },
   11813             :         {
   11814             :                 .name = discard_const_p(char, "unknown3"),
   11815             :                 .get = py_netr_DELTA_ALIAS_MEMBER_get_unknown3,
   11816             :                 .set = py_netr_DELTA_ALIAS_MEMBER_set_unknown3,
   11817             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11818             :         },
   11819             :         {
   11820             :                 .name = discard_const_p(char, "unknown4"),
   11821             :                 .get = py_netr_DELTA_ALIAS_MEMBER_get_unknown4,
   11822             :                 .set = py_netr_DELTA_ALIAS_MEMBER_set_unknown4,
   11823             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11824             :         },
   11825             :         { .name = NULL }
   11826             : };
   11827             : 
   11828           0 : static PyObject *py_netr_DELTA_ALIAS_MEMBER_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11829             : {
   11830           0 :         return pytalloc_new(struct netr_DELTA_ALIAS_MEMBER, type);
   11831             : }
   11832             : 
   11833             : 
   11834             : static PyTypeObject netr_DELTA_ALIAS_MEMBER_Type = {
   11835             :         PyVarObject_HEAD_INIT(NULL, 0)
   11836             :         .tp_name = "netlogon.netr_DELTA_ALIAS_MEMBER",
   11837             :         .tp_getset = py_netr_DELTA_ALIAS_MEMBER_getsetters,
   11838             :         .tp_methods = NULL,
   11839             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11840             :         .tp_new = py_netr_DELTA_ALIAS_MEMBER_new,
   11841             : };
   11842             : 
   11843             : 
   11844           0 : static PyObject *py_netr_QUOTA_LIMITS_get_pagedpoollimit(PyObject *obj, void *closure)
   11845             : {
   11846           0 :         struct netr_QUOTA_LIMITS *object = (struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(obj);
   11847             :         PyObject *py_pagedpoollimit;
   11848           0 :         py_pagedpoollimit = PyLong_FromUnsignedLongLong((uint32_t)object->pagedpoollimit);
   11849           0 :         return py_pagedpoollimit;
   11850             : }
   11851             : 
   11852           0 : static int py_netr_QUOTA_LIMITS_set_pagedpoollimit(PyObject *py_obj, PyObject *value, void *closure)
   11853             : {
   11854           0 :         struct netr_QUOTA_LIMITS *object = (struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(py_obj);
   11855           0 :         if (value == NULL) {
   11856           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pagedpoollimit");
   11857           0 :                 return -1;
   11858             :         }
   11859             :         {
   11860           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pagedpoollimit));
   11861           0 :                 if (PyLong_Check(value)) {
   11862             :                         unsigned long long test_var;
   11863           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11864           0 :                         if (PyErr_Occurred() != NULL) {
   11865           0 :                                 return -1;
   11866             :                         }
   11867           0 :                         if (test_var > uint_max) {
   11868           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   11869             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11870           0 :                                 return -1;
   11871             :                         }
   11872           0 :                         object->pagedpoollimit = test_var;
   11873             :                 } else {
   11874           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   11875             :                           PyLong_Type.tp_name);
   11876           0 :                         return -1;
   11877             :                 }
   11878             :         }
   11879           0 :         return 0;
   11880             : }
   11881             : 
   11882           0 : static PyObject *py_netr_QUOTA_LIMITS_get_nonpagedpoollimit(PyObject *obj, void *closure)
   11883             : {
   11884           0 :         struct netr_QUOTA_LIMITS *object = (struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(obj);
   11885             :         PyObject *py_nonpagedpoollimit;
   11886           0 :         py_nonpagedpoollimit = PyLong_FromUnsignedLongLong((uint32_t)object->nonpagedpoollimit);
   11887           0 :         return py_nonpagedpoollimit;
   11888             : }
   11889             : 
   11890           0 : static int py_netr_QUOTA_LIMITS_set_nonpagedpoollimit(PyObject *py_obj, PyObject *value, void *closure)
   11891             : {
   11892           0 :         struct netr_QUOTA_LIMITS *object = (struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(py_obj);
   11893           0 :         if (value == NULL) {
   11894           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nonpagedpoollimit");
   11895           0 :                 return -1;
   11896             :         }
   11897             :         {
   11898           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nonpagedpoollimit));
   11899           0 :                 if (PyLong_Check(value)) {
   11900             :                         unsigned long long test_var;
   11901           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11902           0 :                         if (PyErr_Occurred() != NULL) {
   11903           0 :                                 return -1;
   11904             :                         }
   11905           0 :                         if (test_var > uint_max) {
   11906           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   11907             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11908           0 :                                 return -1;
   11909             :                         }
   11910           0 :                         object->nonpagedpoollimit = test_var;
   11911             :                 } else {
   11912           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   11913             :                           PyLong_Type.tp_name);
   11914           0 :                         return -1;
   11915             :                 }
   11916             :         }
   11917           0 :         return 0;
   11918             : }
   11919             : 
   11920           0 : static PyObject *py_netr_QUOTA_LIMITS_get_minimumworkingsetsize(PyObject *obj, void *closure)
   11921             : {
   11922           0 :         struct netr_QUOTA_LIMITS *object = (struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(obj);
   11923             :         PyObject *py_minimumworkingsetsize;
   11924           0 :         py_minimumworkingsetsize = PyLong_FromUnsignedLongLong((uint32_t)object->minimumworkingsetsize);
   11925           0 :         return py_minimumworkingsetsize;
   11926             : }
   11927             : 
   11928           0 : static int py_netr_QUOTA_LIMITS_set_minimumworkingsetsize(PyObject *py_obj, PyObject *value, void *closure)
   11929             : {
   11930           0 :         struct netr_QUOTA_LIMITS *object = (struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(py_obj);
   11931           0 :         if (value == NULL) {
   11932           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->minimumworkingsetsize");
   11933           0 :                 return -1;
   11934             :         }
   11935             :         {
   11936           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->minimumworkingsetsize));
   11937           0 :                 if (PyLong_Check(value)) {
   11938             :                         unsigned long long test_var;
   11939           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11940           0 :                         if (PyErr_Occurred() != NULL) {
   11941           0 :                                 return -1;
   11942             :                         }
   11943           0 :                         if (test_var > uint_max) {
   11944           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   11945             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11946           0 :                                 return -1;
   11947             :                         }
   11948           0 :                         object->minimumworkingsetsize = test_var;
   11949             :                 } else {
   11950           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   11951             :                           PyLong_Type.tp_name);
   11952           0 :                         return -1;
   11953             :                 }
   11954             :         }
   11955           0 :         return 0;
   11956             : }
   11957             : 
   11958           0 : static PyObject *py_netr_QUOTA_LIMITS_get_maximumworkingsetsize(PyObject *obj, void *closure)
   11959             : {
   11960           0 :         struct netr_QUOTA_LIMITS *object = (struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(obj);
   11961             :         PyObject *py_maximumworkingsetsize;
   11962           0 :         py_maximumworkingsetsize = PyLong_FromUnsignedLongLong((uint32_t)object->maximumworkingsetsize);
   11963           0 :         return py_maximumworkingsetsize;
   11964             : }
   11965             : 
   11966           0 : static int py_netr_QUOTA_LIMITS_set_maximumworkingsetsize(PyObject *py_obj, PyObject *value, void *closure)
   11967             : {
   11968           0 :         struct netr_QUOTA_LIMITS *object = (struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(py_obj);
   11969           0 :         if (value == NULL) {
   11970           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maximumworkingsetsize");
   11971           0 :                 return -1;
   11972             :         }
   11973             :         {
   11974           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maximumworkingsetsize));
   11975           0 :                 if (PyLong_Check(value)) {
   11976             :                         unsigned long long test_var;
   11977           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11978           0 :                         if (PyErr_Occurred() != NULL) {
   11979           0 :                                 return -1;
   11980             :                         }
   11981           0 :                         if (test_var > uint_max) {
   11982           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   11983             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11984           0 :                                 return -1;
   11985             :                         }
   11986           0 :                         object->maximumworkingsetsize = test_var;
   11987             :                 } else {
   11988           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   11989             :                           PyLong_Type.tp_name);
   11990           0 :                         return -1;
   11991             :                 }
   11992             :         }
   11993           0 :         return 0;
   11994             : }
   11995             : 
   11996           0 : static PyObject *py_netr_QUOTA_LIMITS_get_pagefilelimit(PyObject *obj, void *closure)
   11997             : {
   11998           0 :         struct netr_QUOTA_LIMITS *object = (struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(obj);
   11999             :         PyObject *py_pagefilelimit;
   12000           0 :         py_pagefilelimit = PyLong_FromUnsignedLongLong((uint32_t)object->pagefilelimit);
   12001           0 :         return py_pagefilelimit;
   12002             : }
   12003             : 
   12004           0 : static int py_netr_QUOTA_LIMITS_set_pagefilelimit(PyObject *py_obj, PyObject *value, void *closure)
   12005             : {
   12006           0 :         struct netr_QUOTA_LIMITS *object = (struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(py_obj);
   12007           0 :         if (value == NULL) {
   12008           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pagefilelimit");
   12009           0 :                 return -1;
   12010             :         }
   12011             :         {
   12012           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pagefilelimit));
   12013           0 :                 if (PyLong_Check(value)) {
   12014             :                         unsigned long long test_var;
   12015           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12016           0 :                         if (PyErr_Occurred() != NULL) {
   12017           0 :                                 return -1;
   12018             :                         }
   12019           0 :                         if (test_var > uint_max) {
   12020           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   12021             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12022           0 :                                 return -1;
   12023             :                         }
   12024           0 :                         object->pagefilelimit = test_var;
   12025             :                 } else {
   12026           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   12027             :                           PyLong_Type.tp_name);
   12028           0 :                         return -1;
   12029             :                 }
   12030             :         }
   12031           0 :         return 0;
   12032             : }
   12033             : 
   12034           0 : static PyObject *py_netr_QUOTA_LIMITS_get_timelimit(PyObject *obj, void *closure)
   12035             : {
   12036           0 :         struct netr_QUOTA_LIMITS *object = (struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(obj);
   12037             :         PyObject *py_timelimit;
   12038           0 :         py_timelimit = PyLong_FromUnsignedLongLong(object->timelimit);
   12039           0 :         return py_timelimit;
   12040             : }
   12041             : 
   12042           0 : static int py_netr_QUOTA_LIMITS_set_timelimit(PyObject *py_obj, PyObject *value, void *closure)
   12043             : {
   12044           0 :         struct netr_QUOTA_LIMITS *object = (struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(py_obj);
   12045           0 :         if (value == NULL) {
   12046           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->timelimit");
   12047           0 :                 return -1;
   12048             :         }
   12049             :         {
   12050           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timelimit));
   12051           0 :                 if (PyLong_Check(value)) {
   12052             :                         unsigned long long test_var;
   12053           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12054           0 :                         if (PyErr_Occurred() != NULL) {
   12055           0 :                                 return -1;
   12056             :                         }
   12057           0 :                         if (test_var > uint_max) {
   12058           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   12059             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12060           0 :                                 return -1;
   12061             :                         }
   12062           0 :                         object->timelimit = test_var;
   12063             :                 } else {
   12064           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   12065             :                           PyLong_Type.tp_name);
   12066           0 :                         return -1;
   12067             :                 }
   12068             :         }
   12069           0 :         return 0;
   12070             : }
   12071             : 
   12072             : static PyGetSetDef py_netr_QUOTA_LIMITS_getsetters[] = {
   12073             :         {
   12074             :                 .name = discard_const_p(char, "pagedpoollimit"),
   12075             :                 .get = py_netr_QUOTA_LIMITS_get_pagedpoollimit,
   12076             :                 .set = py_netr_QUOTA_LIMITS_set_pagedpoollimit,
   12077             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12078             :         },
   12079             :         {
   12080             :                 .name = discard_const_p(char, "nonpagedpoollimit"),
   12081             :                 .get = py_netr_QUOTA_LIMITS_get_nonpagedpoollimit,
   12082             :                 .set = py_netr_QUOTA_LIMITS_set_nonpagedpoollimit,
   12083             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12084             :         },
   12085             :         {
   12086             :                 .name = discard_const_p(char, "minimumworkingsetsize"),
   12087             :                 .get = py_netr_QUOTA_LIMITS_get_minimumworkingsetsize,
   12088             :                 .set = py_netr_QUOTA_LIMITS_set_minimumworkingsetsize,
   12089             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12090             :         },
   12091             :         {
   12092             :                 .name = discard_const_p(char, "maximumworkingsetsize"),
   12093             :                 .get = py_netr_QUOTA_LIMITS_get_maximumworkingsetsize,
   12094             :                 .set = py_netr_QUOTA_LIMITS_set_maximumworkingsetsize,
   12095             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12096             :         },
   12097             :         {
   12098             :                 .name = discard_const_p(char, "pagefilelimit"),
   12099             :                 .get = py_netr_QUOTA_LIMITS_get_pagefilelimit,
   12100             :                 .set = py_netr_QUOTA_LIMITS_set_pagefilelimit,
   12101             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12102             :         },
   12103             :         {
   12104             :                 .name = discard_const_p(char, "timelimit"),
   12105             :                 .get = py_netr_QUOTA_LIMITS_get_timelimit,
   12106             :                 .set = py_netr_QUOTA_LIMITS_set_timelimit,
   12107             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   12108             :         },
   12109             :         { .name = NULL }
   12110             : };
   12111             : 
   12112           0 : static PyObject *py_netr_QUOTA_LIMITS_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   12113             : {
   12114           0 :         return pytalloc_new(struct netr_QUOTA_LIMITS, type);
   12115             : }
   12116             : 
   12117             : 
   12118             : static PyTypeObject netr_QUOTA_LIMITS_Type = {
   12119             :         PyVarObject_HEAD_INIT(NULL, 0)
   12120             :         .tp_name = "netlogon.netr_QUOTA_LIMITS",
   12121             :         .tp_getset = py_netr_QUOTA_LIMITS_getsetters,
   12122             :         .tp_methods = NULL,
   12123             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   12124             :         .tp_new = py_netr_QUOTA_LIMITS_new,
   12125             : };
   12126             : 
   12127             : 
   12128           0 : static PyObject *py_netr_DELTA_POLICY_get_maxlogsize(PyObject *obj, void *closure)
   12129             : {
   12130           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12131             :         PyObject *py_maxlogsize;
   12132           0 :         py_maxlogsize = PyLong_FromUnsignedLongLong((uint32_t)object->maxlogsize);
   12133           0 :         return py_maxlogsize;
   12134             : }
   12135             : 
   12136           0 : static int py_netr_DELTA_POLICY_set_maxlogsize(PyObject *py_obj, PyObject *value, void *closure)
   12137             : {
   12138           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12139           0 :         if (value == NULL) {
   12140           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxlogsize");
   12141           0 :                 return -1;
   12142             :         }
   12143             :         {
   12144           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxlogsize));
   12145           0 :                 if (PyLong_Check(value)) {
   12146             :                         unsigned long long test_var;
   12147           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12148           0 :                         if (PyErr_Occurred() != NULL) {
   12149           0 :                                 return -1;
   12150             :                         }
   12151           0 :                         if (test_var > uint_max) {
   12152           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   12153             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12154           0 :                                 return -1;
   12155             :                         }
   12156           0 :                         object->maxlogsize = test_var;
   12157             :                 } else {
   12158           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   12159             :                           PyLong_Type.tp_name);
   12160           0 :                         return -1;
   12161             :                 }
   12162             :         }
   12163           0 :         return 0;
   12164             : }
   12165             : 
   12166           0 : static PyObject *py_netr_DELTA_POLICY_get_auditretentionperiod(PyObject *obj, void *closure)
   12167             : {
   12168           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12169             :         PyObject *py_auditretentionperiod;
   12170           0 :         py_auditretentionperiod = PyLong_FromUnsignedLongLong(object->auditretentionperiod);
   12171           0 :         return py_auditretentionperiod;
   12172             : }
   12173             : 
   12174           0 : static int py_netr_DELTA_POLICY_set_auditretentionperiod(PyObject *py_obj, PyObject *value, void *closure)
   12175             : {
   12176           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12177           0 :         if (value == NULL) {
   12178           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auditretentionperiod");
   12179           0 :                 return -1;
   12180             :         }
   12181             :         {
   12182           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auditretentionperiod));
   12183           0 :                 if (PyLong_Check(value)) {
   12184             :                         unsigned long long test_var;
   12185           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12186           0 :                         if (PyErr_Occurred() != NULL) {
   12187           0 :                                 return -1;
   12188             :                         }
   12189           0 :                         if (test_var > uint_max) {
   12190           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   12191             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12192           0 :                                 return -1;
   12193             :                         }
   12194           0 :                         object->auditretentionperiod = test_var;
   12195             :                 } else {
   12196           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   12197             :                           PyLong_Type.tp_name);
   12198           0 :                         return -1;
   12199             :                 }
   12200             :         }
   12201           0 :         return 0;
   12202             : }
   12203             : 
   12204           0 : static PyObject *py_netr_DELTA_POLICY_get_auditingmode(PyObject *obj, void *closure)
   12205             : {
   12206           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12207             :         PyObject *py_auditingmode;
   12208           0 :         py_auditingmode = PyLong_FromLong((uint16_t)object->auditingmode);
   12209           0 :         return py_auditingmode;
   12210             : }
   12211             : 
   12212           0 : static int py_netr_DELTA_POLICY_set_auditingmode(PyObject *py_obj, PyObject *value, void *closure)
   12213             : {
   12214           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12215           0 :         if (value == NULL) {
   12216           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->auditingmode");
   12217           0 :                 return -1;
   12218             :         }
   12219             :         {
   12220           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->auditingmode));
   12221           0 :                 if (PyLong_Check(value)) {
   12222             :                         unsigned long long test_var;
   12223           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12224           0 :                         if (PyErr_Occurred() != NULL) {
   12225           0 :                                 return -1;
   12226             :                         }
   12227           0 :                         if (test_var > uint_max) {
   12228           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   12229             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12230           0 :                                 return -1;
   12231             :                         }
   12232           0 :                         object->auditingmode = test_var;
   12233             :                 } else {
   12234           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   12235             :                           PyLong_Type.tp_name);
   12236           0 :                         return -1;
   12237             :                 }
   12238             :         }
   12239           0 :         return 0;
   12240             : }
   12241             : 
   12242           0 : static PyObject *py_netr_DELTA_POLICY_get_maxauditeventcount(PyObject *obj, void *closure)
   12243             : {
   12244           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12245             :         PyObject *py_maxauditeventcount;
   12246           0 :         py_maxauditeventcount = PyLong_FromUnsignedLongLong((uint32_t)object->maxauditeventcount);
   12247           0 :         return py_maxauditeventcount;
   12248             : }
   12249             : 
   12250           0 : static int py_netr_DELTA_POLICY_set_maxauditeventcount(PyObject *py_obj, PyObject *value, void *closure)
   12251             : {
   12252           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12253           0 :         if (value == NULL) {
   12254           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxauditeventcount");
   12255           0 :                 return -1;
   12256             :         }
   12257             :         {
   12258           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxauditeventcount));
   12259           0 :                 if (PyLong_Check(value)) {
   12260             :                         unsigned long long test_var;
   12261           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12262           0 :                         if (PyErr_Occurred() != NULL) {
   12263           0 :                                 return -1;
   12264             :                         }
   12265           0 :                         if (test_var > uint_max) {
   12266           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   12267             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12268           0 :                                 return -1;
   12269             :                         }
   12270           0 :                         object->maxauditeventcount = test_var;
   12271             :                 } else {
   12272           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   12273             :                           PyLong_Type.tp_name);
   12274           0 :                         return -1;
   12275             :                 }
   12276             :         }
   12277           0 :         return 0;
   12278             : }
   12279             : 
   12280           0 : static PyObject *py_netr_DELTA_POLICY_get_eventauditoptions(PyObject *obj, void *closure)
   12281             : {
   12282           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12283             :         PyObject *py_eventauditoptions;
   12284           0 :         if (object->eventauditoptions == NULL) {
   12285           0 :                 Py_RETURN_NONE;
   12286             :         }
   12287           0 :         if (object->eventauditoptions == NULL) {
   12288           0 :                 py_eventauditoptions = Py_None;
   12289           0 :                 Py_INCREF(py_eventauditoptions);
   12290             :         } else {
   12291           0 :                 py_eventauditoptions = PyList_New(object->maxauditeventcount + 1);
   12292           0 :                 if (py_eventauditoptions == NULL) {
   12293           0 :                         return NULL;
   12294             :                 }
   12295             :                 {
   12296             :                         int eventauditoptions_cntr_1;
   12297           0 :                         for (eventauditoptions_cntr_1 = 0; eventauditoptions_cntr_1 < (object->maxauditeventcount + 1); eventauditoptions_cntr_1++) {
   12298             :                                 PyObject *py_eventauditoptions_1;
   12299           0 :                                 py_eventauditoptions_1 = PyLong_FromUnsignedLongLong((uint32_t)object->eventauditoptions[eventauditoptions_cntr_1]);
   12300           0 :                                 PyList_SetItem(py_eventauditoptions, eventauditoptions_cntr_1, py_eventauditoptions_1);
   12301             :                         }
   12302             :                 }
   12303             :         }
   12304           0 :         return py_eventauditoptions;
   12305             : }
   12306             : 
   12307           0 : static int py_netr_DELTA_POLICY_set_eventauditoptions(PyObject *py_obj, PyObject *value, void *closure)
   12308             : {
   12309           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12310           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->eventauditoptions));
   12311           0 :         if (value == NULL) {
   12312           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->eventauditoptions");
   12313           0 :                 return -1;
   12314             :         }
   12315           0 :         if (value == Py_None) {
   12316           0 :                 object->eventauditoptions = NULL;
   12317             :         } else {
   12318           0 :                 object->eventauditoptions = NULL;
   12319           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   12320             :                 {
   12321             :                         int eventauditoptions_cntr_1;
   12322           0 :                         object->eventauditoptions = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->eventauditoptions, PyList_GET_SIZE(value));
   12323           0 :                         if (!object->eventauditoptions) { return -1;; }
   12324           0 :                         talloc_set_name_const(object->eventauditoptions, "ARRAY: object->eventauditoptions");
   12325           0 :                         for (eventauditoptions_cntr_1 = 0; eventauditoptions_cntr_1 < PyList_GET_SIZE(value); eventauditoptions_cntr_1++) {
   12326           0 :                                 if (PyList_GET_ITEM(value, eventauditoptions_cntr_1) == NULL) {
   12327           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->eventauditoptions[eventauditoptions_cntr_1]");
   12328           0 :                                         return -1;
   12329             :                                 }
   12330             :                                 {
   12331           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->eventauditoptions[eventauditoptions_cntr_1]));
   12332           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, eventauditoptions_cntr_1))) {
   12333             :                                                 unsigned long long test_var;
   12334           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, eventauditoptions_cntr_1));
   12335           0 :                                                 if (PyErr_Occurred() != NULL) {
   12336           0 :                                                         return -1;
   12337             :                                                 }
   12338           0 :                                                 if (test_var > uint_max) {
   12339           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   12340             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   12341           0 :                                                         return -1;
   12342             :                                                 }
   12343           0 :                                                 object->eventauditoptions[eventauditoptions_cntr_1] = test_var;
   12344             :                                         } else {
   12345           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",\
   12346             :                                                   PyLong_Type.tp_name);
   12347           0 :                                                 return -1;
   12348             :                                         }
   12349             :                                 }
   12350             :                         }
   12351             :                 }
   12352             :         }
   12353           0 :         return 0;
   12354             : }
   12355             : 
   12356           0 : static PyObject *py_netr_DELTA_POLICY_get_primary_domain_name(PyObject *obj, void *closure)
   12357             : {
   12358           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12359             :         PyObject *py_primary_domain_name;
   12360           0 :         py_primary_domain_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->primary_domain_name);
   12361           0 :         return py_primary_domain_name;
   12362             : }
   12363             : 
   12364           0 : static int py_netr_DELTA_POLICY_set_primary_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   12365             : {
   12366           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12367           0 :         if (value == NULL) {
   12368           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->primary_domain_name");
   12369           0 :                 return -1;
   12370             :         }
   12371           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   12372           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12373           0 :                 PyErr_NoMemory();
   12374           0 :                 return -1;
   12375             :         }
   12376           0 :         object->primary_domain_name = *(struct lsa_String *)pytalloc_get_ptr(value);
   12377           0 :         return 0;
   12378             : }
   12379             : 
   12380           0 : static PyObject *py_netr_DELTA_POLICY_get_sid(PyObject *obj, void *closure)
   12381             : {
   12382           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12383             :         PyObject *py_sid;
   12384           0 :         if (object->sid == NULL) {
   12385           0 :                 Py_RETURN_NONE;
   12386             :         }
   12387           0 :         if (object->sid == NULL) {
   12388           0 :                 py_sid = Py_None;
   12389           0 :                 Py_INCREF(py_sid);
   12390             :         } else {
   12391           0 :                 py_sid = pytalloc_reference_ex(dom_sid_Type, object->sid, object->sid);
   12392             :         }
   12393           0 :         return py_sid;
   12394             : }
   12395             : 
   12396           0 : static int py_netr_DELTA_POLICY_set_sid(PyObject *py_obj, PyObject *value, void *closure)
   12397             : {
   12398           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12399           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sid));
   12400           0 :         if (value == NULL) {
   12401           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sid");
   12402           0 :                 return -1;
   12403             :         }
   12404           0 :         if (value == Py_None) {
   12405           0 :                 object->sid = NULL;
   12406             :         } else {
   12407           0 :                 object->sid = NULL;
   12408           0 :                 PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
   12409           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12410           0 :                         PyErr_NoMemory();
   12411           0 :                         return -1;
   12412             :                 }
   12413           0 :                 object->sid = (struct dom_sid *)pytalloc_get_ptr(value);
   12414             :         }
   12415           0 :         return 0;
   12416             : }
   12417             : 
   12418           0 : static PyObject *py_netr_DELTA_POLICY_get_quota_limits(PyObject *obj, void *closure)
   12419             : {
   12420           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12421             :         PyObject *py_quota_limits;
   12422           0 :         py_quota_limits = pytalloc_reference_ex(&netr_QUOTA_LIMITS_Type, pytalloc_get_mem_ctx(obj), &object->quota_limits);
   12423           0 :         return py_quota_limits;
   12424             : }
   12425             : 
   12426           0 : static int py_netr_DELTA_POLICY_set_quota_limits(PyObject *py_obj, PyObject *value, void *closure)
   12427             : {
   12428           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12429           0 :         if (value == NULL) {
   12430           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->quota_limits");
   12431           0 :                 return -1;
   12432             :         }
   12433           0 :         PY_CHECK_TYPE(&netr_QUOTA_LIMITS_Type, value, return -1;);
   12434           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12435           0 :                 PyErr_NoMemory();
   12436           0 :                 return -1;
   12437             :         }
   12438           0 :         object->quota_limits = *(struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(value);
   12439           0 :         return 0;
   12440             : }
   12441             : 
   12442           0 : static PyObject *py_netr_DELTA_POLICY_get_sequence_num(PyObject *obj, void *closure)
   12443             : {
   12444           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12445             :         PyObject *py_sequence_num;
   12446           0 :         py_sequence_num = PyLong_FromUnsignedLongLong(object->sequence_num);
   12447           0 :         return py_sequence_num;
   12448             : }
   12449             : 
   12450           0 : static int py_netr_DELTA_POLICY_set_sequence_num(PyObject *py_obj, PyObject *value, void *closure)
   12451             : {
   12452           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12453           0 :         if (value == NULL) {
   12454           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sequence_num");
   12455           0 :                 return -1;
   12456             :         }
   12457             :         {
   12458           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sequence_num));
   12459           0 :                 if (PyLong_Check(value)) {
   12460             :                         unsigned long long test_var;
   12461           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12462           0 :                         if (PyErr_Occurred() != NULL) {
   12463           0 :                                 return -1;
   12464             :                         }
   12465           0 :                         if (test_var > uint_max) {
   12466           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   12467             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12468           0 :                                 return -1;
   12469             :                         }
   12470           0 :                         object->sequence_num = test_var;
   12471             :                 } else {
   12472           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   12473             :                           PyLong_Type.tp_name);
   12474           0 :                         return -1;
   12475             :                 }
   12476             :         }
   12477           0 :         return 0;
   12478             : }
   12479             : 
   12480           0 : static PyObject *py_netr_DELTA_POLICY_get_db_create_time(PyObject *obj, void *closure)
   12481             : {
   12482           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12483             :         PyObject *py_db_create_time;
   12484           0 :         py_db_create_time = PyLong_FromUnsignedLongLong(object->db_create_time);
   12485           0 :         return py_db_create_time;
   12486             : }
   12487             : 
   12488           0 : static int py_netr_DELTA_POLICY_set_db_create_time(PyObject *py_obj, PyObject *value, void *closure)
   12489             : {
   12490           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12491           0 :         if (value == NULL) {
   12492           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->db_create_time");
   12493           0 :                 return -1;
   12494             :         }
   12495             :         {
   12496           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->db_create_time));
   12497           0 :                 if (PyLong_Check(value)) {
   12498             :                         unsigned long long test_var;
   12499           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12500           0 :                         if (PyErr_Occurred() != NULL) {
   12501           0 :                                 return -1;
   12502             :                         }
   12503           0 :                         if (test_var > uint_max) {
   12504           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   12505             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12506           0 :                                 return -1;
   12507             :                         }
   12508           0 :                         object->db_create_time = test_var;
   12509             :                 } else {
   12510           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   12511             :                           PyLong_Type.tp_name);
   12512           0 :                         return -1;
   12513             :                 }
   12514             :         }
   12515           0 :         return 0;
   12516             : }
   12517             : 
   12518           0 : static PyObject *py_netr_DELTA_POLICY_get_SecurityInformation(PyObject *obj, void *closure)
   12519             : {
   12520           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12521             :         PyObject *py_SecurityInformation;
   12522           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)object->SecurityInformation);
   12523           0 :         return py_SecurityInformation;
   12524             : }
   12525             : 
   12526           0 : static int py_netr_DELTA_POLICY_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
   12527             : {
   12528           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12529           0 :         if (value == NULL) {
   12530           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SecurityInformation");
   12531           0 :                 return -1;
   12532             :         }
   12533             :         {
   12534           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
   12535           0 :                 if (PyLong_Check(value)) {
   12536             :                         unsigned long long test_var;
   12537           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12538           0 :                         if (PyErr_Occurred() != NULL) {
   12539           0 :                                 return -1;
   12540             :                         }
   12541           0 :                         if (test_var > uint_max) {
   12542           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   12543             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12544           0 :                                 return -1;
   12545             :                         }
   12546           0 :                         object->SecurityInformation = test_var;
   12547             :                 } else {
   12548           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   12549             :                           PyLong_Type.tp_name);
   12550           0 :                         return -1;
   12551             :                 }
   12552             :         }
   12553           0 :         return 0;
   12554             : }
   12555             : 
   12556           0 : static PyObject *py_netr_DELTA_POLICY_get_sdbuf(PyObject *obj, void *closure)
   12557             : {
   12558           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12559             :         PyObject *py_sdbuf;
   12560           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
   12561           0 :         return py_sdbuf;
   12562             : }
   12563             : 
   12564           0 : static int py_netr_DELTA_POLICY_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
   12565             : {
   12566           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12567           0 :         if (value == NULL) {
   12568           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sdbuf");
   12569           0 :                 return -1;
   12570             :         }
   12571           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
   12572           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12573           0 :                 PyErr_NoMemory();
   12574           0 :                 return -1;
   12575             :         }
   12576           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
   12577           0 :         return 0;
   12578             : }
   12579             : 
   12580           0 : static PyObject *py_netr_DELTA_POLICY_get_unknown1(PyObject *obj, void *closure)
   12581             : {
   12582           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12583             :         PyObject *py_unknown1;
   12584           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
   12585           0 :         return py_unknown1;
   12586             : }
   12587             : 
   12588           0 : static int py_netr_DELTA_POLICY_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   12589             : {
   12590           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12591           0 :         if (value == NULL) {
   12592           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
   12593           0 :                 return -1;
   12594             :         }
   12595           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   12596           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12597           0 :                 PyErr_NoMemory();
   12598           0 :                 return -1;
   12599             :         }
   12600           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
   12601           0 :         return 0;
   12602             : }
   12603             : 
   12604           0 : static PyObject *py_netr_DELTA_POLICY_get_unknown2(PyObject *obj, void *closure)
   12605             : {
   12606           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12607             :         PyObject *py_unknown2;
   12608           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
   12609           0 :         return py_unknown2;
   12610             : }
   12611             : 
   12612           0 : static int py_netr_DELTA_POLICY_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   12613             : {
   12614           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12615           0 :         if (value == NULL) {
   12616           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
   12617           0 :                 return -1;
   12618             :         }
   12619           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   12620           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12621           0 :                 PyErr_NoMemory();
   12622           0 :                 return -1;
   12623             :         }
   12624           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
   12625           0 :         return 0;
   12626             : }
   12627             : 
   12628           0 : static PyObject *py_netr_DELTA_POLICY_get_unknown3(PyObject *obj, void *closure)
   12629             : {
   12630           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12631             :         PyObject *py_unknown3;
   12632           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
   12633           0 :         return py_unknown3;
   12634             : }
   12635             : 
   12636           0 : static int py_netr_DELTA_POLICY_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   12637             : {
   12638           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12639           0 :         if (value == NULL) {
   12640           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
   12641           0 :                 return -1;
   12642             :         }
   12643           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   12644           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12645           0 :                 PyErr_NoMemory();
   12646           0 :                 return -1;
   12647             :         }
   12648           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
   12649           0 :         return 0;
   12650             : }
   12651             : 
   12652           0 : static PyObject *py_netr_DELTA_POLICY_get_unknown4(PyObject *obj, void *closure)
   12653             : {
   12654           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12655             :         PyObject *py_unknown4;
   12656           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
   12657           0 :         return py_unknown4;
   12658             : }
   12659             : 
   12660           0 : static int py_netr_DELTA_POLICY_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   12661             : {
   12662           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12663           0 :         if (value == NULL) {
   12664           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
   12665           0 :                 return -1;
   12666             :         }
   12667           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   12668           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12669           0 :                 PyErr_NoMemory();
   12670           0 :                 return -1;
   12671             :         }
   12672           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
   12673           0 :         return 0;
   12674             : }
   12675             : 
   12676           0 : static PyObject *py_netr_DELTA_POLICY_get_unknown5(PyObject *obj, void *closure)
   12677             : {
   12678           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12679             :         PyObject *py_unknown5;
   12680           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown5);
   12681           0 :         return py_unknown5;
   12682             : }
   12683             : 
   12684           0 : static int py_netr_DELTA_POLICY_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
   12685             : {
   12686           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12687           0 :         if (value == NULL) {
   12688           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown5");
   12689           0 :                 return -1;
   12690             :         }
   12691             :         {
   12692           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
   12693           0 :                 if (PyLong_Check(value)) {
   12694             :                         unsigned long long test_var;
   12695           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12696           0 :                         if (PyErr_Occurred() != NULL) {
   12697           0 :                                 return -1;
   12698             :                         }
   12699           0 :                         if (test_var > uint_max) {
   12700           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   12701             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12702           0 :                                 return -1;
   12703             :                         }
   12704           0 :                         object->unknown5 = test_var;
   12705             :                 } else {
   12706           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   12707             :                           PyLong_Type.tp_name);
   12708           0 :                         return -1;
   12709             :                 }
   12710             :         }
   12711           0 :         return 0;
   12712             : }
   12713             : 
   12714           0 : static PyObject *py_netr_DELTA_POLICY_get_unknown6(PyObject *obj, void *closure)
   12715             : {
   12716           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12717             :         PyObject *py_unknown6;
   12718           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown6);
   12719           0 :         return py_unknown6;
   12720             : }
   12721             : 
   12722           0 : static int py_netr_DELTA_POLICY_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
   12723             : {
   12724           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12725           0 :         if (value == NULL) {
   12726           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown6");
   12727           0 :                 return -1;
   12728             :         }
   12729             :         {
   12730           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
   12731           0 :                 if (PyLong_Check(value)) {
   12732             :                         unsigned long long test_var;
   12733           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12734           0 :                         if (PyErr_Occurred() != NULL) {
   12735           0 :                                 return -1;
   12736             :                         }
   12737           0 :                         if (test_var > uint_max) {
   12738           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   12739             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12740           0 :                                 return -1;
   12741             :                         }
   12742           0 :                         object->unknown6 = test_var;
   12743             :                 } else {
   12744           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   12745             :                           PyLong_Type.tp_name);
   12746           0 :                         return -1;
   12747             :                 }
   12748             :         }
   12749           0 :         return 0;
   12750             : }
   12751             : 
   12752           0 : static PyObject *py_netr_DELTA_POLICY_get_unknown7(PyObject *obj, void *closure)
   12753             : {
   12754           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12755             :         PyObject *py_unknown7;
   12756           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown7);
   12757           0 :         return py_unknown7;
   12758             : }
   12759             : 
   12760           0 : static int py_netr_DELTA_POLICY_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
   12761             : {
   12762           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12763           0 :         if (value == NULL) {
   12764           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown7");
   12765           0 :                 return -1;
   12766             :         }
   12767             :         {
   12768           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
   12769           0 :                 if (PyLong_Check(value)) {
   12770             :                         unsigned long long test_var;
   12771           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12772           0 :                         if (PyErr_Occurred() != NULL) {
   12773           0 :                                 return -1;
   12774             :                         }
   12775           0 :                         if (test_var > uint_max) {
   12776           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   12777             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12778           0 :                                 return -1;
   12779             :                         }
   12780           0 :                         object->unknown7 = test_var;
   12781             :                 } else {
   12782           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   12783             :                           PyLong_Type.tp_name);
   12784           0 :                         return -1;
   12785             :                 }
   12786             :         }
   12787           0 :         return 0;
   12788             : }
   12789             : 
   12790           0 : static PyObject *py_netr_DELTA_POLICY_get_unknown8(PyObject *obj, void *closure)
   12791             : {
   12792           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(obj);
   12793             :         PyObject *py_unknown8;
   12794           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown8);
   12795           0 :         return py_unknown8;
   12796             : }
   12797             : 
   12798           0 : static int py_netr_DELTA_POLICY_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
   12799             : {
   12800           0 :         struct netr_DELTA_POLICY *object = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(py_obj);
   12801           0 :         if (value == NULL) {
   12802           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown8");
   12803           0 :                 return -1;
   12804             :         }
   12805             :         {
   12806           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
   12807           0 :                 if (PyLong_Check(value)) {
   12808             :                         unsigned long long test_var;
   12809           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12810           0 :                         if (PyErr_Occurred() != NULL) {
   12811           0 :                                 return -1;
   12812             :                         }
   12813           0 :                         if (test_var > uint_max) {
   12814           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   12815             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12816           0 :                                 return -1;
   12817             :                         }
   12818           0 :                         object->unknown8 = test_var;
   12819             :                 } else {
   12820           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   12821             :                           PyLong_Type.tp_name);
   12822           0 :                         return -1;
   12823             :                 }
   12824             :         }
   12825           0 :         return 0;
   12826             : }
   12827             : 
   12828             : static PyGetSetDef py_netr_DELTA_POLICY_getsetters[] = {
   12829             :         {
   12830             :                 .name = discard_const_p(char, "maxlogsize"),
   12831             :                 .get = py_netr_DELTA_POLICY_get_maxlogsize,
   12832             :                 .set = py_netr_DELTA_POLICY_set_maxlogsize,
   12833             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12834             :         },
   12835             :         {
   12836             :                 .name = discard_const_p(char, "auditretentionperiod"),
   12837             :                 .get = py_netr_DELTA_POLICY_get_auditretentionperiod,
   12838             :                 .set = py_netr_DELTA_POLICY_set_auditretentionperiod,
   12839             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   12840             :         },
   12841             :         {
   12842             :                 .name = discard_const_p(char, "auditingmode"),
   12843             :                 .get = py_netr_DELTA_POLICY_get_auditingmode,
   12844             :                 .set = py_netr_DELTA_POLICY_set_auditingmode,
   12845             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   12846             :         },
   12847             :         {
   12848             :                 .name = discard_const_p(char, "maxauditeventcount"),
   12849             :                 .get = py_netr_DELTA_POLICY_get_maxauditeventcount,
   12850             :                 .set = py_netr_DELTA_POLICY_set_maxauditeventcount,
   12851             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12852             :         },
   12853             :         {
   12854             :                 .name = discard_const_p(char, "eventauditoptions"),
   12855             :                 .get = py_netr_DELTA_POLICY_get_eventauditoptions,
   12856             :                 .set = py_netr_DELTA_POLICY_set_eventauditoptions,
   12857             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12858             :         },
   12859             :         {
   12860             :                 .name = discard_const_p(char, "primary_domain_name"),
   12861             :                 .get = py_netr_DELTA_POLICY_get_primary_domain_name,
   12862             :                 .set = py_netr_DELTA_POLICY_set_primary_domain_name,
   12863             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   12864             :         },
   12865             :         {
   12866             :                 .name = discard_const_p(char, "sid"),
   12867             :                 .get = py_netr_DELTA_POLICY_get_sid,
   12868             :                 .set = py_netr_DELTA_POLICY_set_sid,
   12869             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid2")
   12870             :         },
   12871             :         {
   12872             :                 .name = discard_const_p(char, "quota_limits"),
   12873             :                 .get = py_netr_DELTA_POLICY_get_quota_limits,
   12874             :                 .set = py_netr_DELTA_POLICY_set_quota_limits,
   12875             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_QUOTA_LIMITS")
   12876             :         },
   12877             :         {
   12878             :                 .name = discard_const_p(char, "sequence_num"),
   12879             :                 .get = py_netr_DELTA_POLICY_get_sequence_num,
   12880             :                 .set = py_netr_DELTA_POLICY_set_sequence_num,
   12881             :                 .doc = discard_const_p(char, "PIDL-generated element of base type udlong")
   12882             :         },
   12883             :         {
   12884             :                 .name = discard_const_p(char, "db_create_time"),
   12885             :                 .get = py_netr_DELTA_POLICY_get_db_create_time,
   12886             :                 .set = py_netr_DELTA_POLICY_set_db_create_time,
   12887             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   12888             :         },
   12889             :         {
   12890             :                 .name = discard_const_p(char, "SecurityInformation"),
   12891             :                 .get = py_netr_DELTA_POLICY_get_SecurityInformation,
   12892             :                 .set = py_netr_DELTA_POLICY_set_SecurityInformation,
   12893             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12894             :         },
   12895             :         {
   12896             :                 .name = discard_const_p(char, "sdbuf"),
   12897             :                 .get = py_netr_DELTA_POLICY_get_sdbuf,
   12898             :                 .set = py_netr_DELTA_POLICY_set_sdbuf,
   12899             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
   12900             :         },
   12901             :         {
   12902             :                 .name = discard_const_p(char, "unknown1"),
   12903             :                 .get = py_netr_DELTA_POLICY_get_unknown1,
   12904             :                 .set = py_netr_DELTA_POLICY_set_unknown1,
   12905             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   12906             :         },
   12907             :         {
   12908             :                 .name = discard_const_p(char, "unknown2"),
   12909             :                 .get = py_netr_DELTA_POLICY_get_unknown2,
   12910             :                 .set = py_netr_DELTA_POLICY_set_unknown2,
   12911             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   12912             :         },
   12913             :         {
   12914             :                 .name = discard_const_p(char, "unknown3"),
   12915             :                 .get = py_netr_DELTA_POLICY_get_unknown3,
   12916             :                 .set = py_netr_DELTA_POLICY_set_unknown3,
   12917             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   12918             :         },
   12919             :         {
   12920             :                 .name = discard_const_p(char, "unknown4"),
   12921             :                 .get = py_netr_DELTA_POLICY_get_unknown4,
   12922             :                 .set = py_netr_DELTA_POLICY_set_unknown4,
   12923             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   12924             :         },
   12925             :         {
   12926             :                 .name = discard_const_p(char, "unknown5"),
   12927             :                 .get = py_netr_DELTA_POLICY_get_unknown5,
   12928             :                 .set = py_netr_DELTA_POLICY_set_unknown5,
   12929             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12930             :         },
   12931             :         {
   12932             :                 .name = discard_const_p(char, "unknown6"),
   12933             :                 .get = py_netr_DELTA_POLICY_get_unknown6,
   12934             :                 .set = py_netr_DELTA_POLICY_set_unknown6,
   12935             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12936             :         },
   12937             :         {
   12938             :                 .name = discard_const_p(char, "unknown7"),
   12939             :                 .get = py_netr_DELTA_POLICY_get_unknown7,
   12940             :                 .set = py_netr_DELTA_POLICY_set_unknown7,
   12941             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12942             :         },
   12943             :         {
   12944             :                 .name = discard_const_p(char, "unknown8"),
   12945             :                 .get = py_netr_DELTA_POLICY_get_unknown8,
   12946             :                 .set = py_netr_DELTA_POLICY_set_unknown8,
   12947             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   12948             :         },
   12949             :         { .name = NULL }
   12950             : };
   12951             : 
   12952           0 : static PyObject *py_netr_DELTA_POLICY_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   12953             : {
   12954           0 :         return pytalloc_new(struct netr_DELTA_POLICY, type);
   12955             : }
   12956             : 
   12957             : 
   12958             : static PyTypeObject netr_DELTA_POLICY_Type = {
   12959             :         PyVarObject_HEAD_INIT(NULL, 0)
   12960             :         .tp_name = "netlogon.netr_DELTA_POLICY",
   12961             :         .tp_getset = py_netr_DELTA_POLICY_getsetters,
   12962             :         .tp_methods = NULL,
   12963             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   12964             :         .tp_new = py_netr_DELTA_POLICY_new,
   12965             : };
   12966             : 
   12967             : 
   12968           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_domain_name(PyObject *obj, void *closure)
   12969             : {
   12970           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   12971             :         PyObject *py_domain_name;
   12972           0 :         py_domain_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->domain_name);
   12973           0 :         return py_domain_name;
   12974             : }
   12975             : 
   12976           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   12977             : {
   12978           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   12979           0 :         if (value == NULL) {
   12980           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_name");
   12981           0 :                 return -1;
   12982             :         }
   12983           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   12984           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12985           0 :                 PyErr_NoMemory();
   12986           0 :                 return -1;
   12987             :         }
   12988           0 :         object->domain_name = *(struct lsa_String *)pytalloc_get_ptr(value);
   12989           0 :         return 0;
   12990             : }
   12991             : 
   12992           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_num_controllers(PyObject *obj, void *closure)
   12993             : {
   12994           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   12995             :         PyObject *py_num_controllers;
   12996           0 :         py_num_controllers = PyLong_FromUnsignedLongLong((uint32_t)object->num_controllers);
   12997           0 :         return py_num_controllers;
   12998             : }
   12999             : 
   13000           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_num_controllers(PyObject *py_obj, PyObject *value, void *closure)
   13001             : {
   13002           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13003           0 :         if (value == NULL) {
   13004           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_controllers");
   13005           0 :                 return -1;
   13006             :         }
   13007             :         {
   13008           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_controllers));
   13009           0 :                 if (PyLong_Check(value)) {
   13010             :                         unsigned long long test_var;
   13011           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13012           0 :                         if (PyErr_Occurred() != NULL) {
   13013           0 :                                 return -1;
   13014             :                         }
   13015           0 :                         if (test_var > uint_max) {
   13016           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   13017             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13018           0 :                                 return -1;
   13019             :                         }
   13020           0 :                         object->num_controllers = test_var;
   13021             :                 } else {
   13022           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   13023             :                           PyLong_Type.tp_name);
   13024           0 :                         return -1;
   13025             :                 }
   13026             :         }
   13027           0 :         return 0;
   13028             : }
   13029             : 
   13030           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_controller_names(PyObject *obj, void *closure)
   13031             : {
   13032           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   13033             :         PyObject *py_controller_names;
   13034           0 :         if (object->controller_names == NULL) {
   13035           0 :                 Py_RETURN_NONE;
   13036             :         }
   13037           0 :         if (object->controller_names == NULL) {
   13038           0 :                 py_controller_names = Py_None;
   13039           0 :                 Py_INCREF(py_controller_names);
   13040             :         } else {
   13041           0 :                 py_controller_names = PyList_New(object->num_controllers);
   13042           0 :                 if (py_controller_names == NULL) {
   13043           0 :                         return NULL;
   13044             :                 }
   13045             :                 {
   13046             :                         int controller_names_cntr_1;
   13047           0 :                         for (controller_names_cntr_1 = 0; controller_names_cntr_1 < (object->num_controllers); controller_names_cntr_1++) {
   13048             :                                 PyObject *py_controller_names_1;
   13049           0 :                                 py_controller_names_1 = pytalloc_reference_ex(lsa_String_Type, object->controller_names, &object->controller_names[controller_names_cntr_1]);
   13050           0 :                                 PyList_SetItem(py_controller_names, controller_names_cntr_1, py_controller_names_1);
   13051             :                         }
   13052             :                 }
   13053             :         }
   13054           0 :         return py_controller_names;
   13055             : }
   13056             : 
   13057           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_controller_names(PyObject *py_obj, PyObject *value, void *closure)
   13058             : {
   13059           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13060           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->controller_names));
   13061           0 :         if (value == NULL) {
   13062           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->controller_names");
   13063           0 :                 return -1;
   13064             :         }
   13065           0 :         if (value == Py_None) {
   13066           0 :                 object->controller_names = NULL;
   13067             :         } else {
   13068           0 :                 object->controller_names = NULL;
   13069           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   13070             :                 {
   13071             :                         int controller_names_cntr_1;
   13072           0 :                         object->controller_names = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->controller_names, PyList_GET_SIZE(value));
   13073           0 :                         if (!object->controller_names) { return -1;; }
   13074           0 :                         talloc_set_name_const(object->controller_names, "ARRAY: object->controller_names");
   13075           0 :                         for (controller_names_cntr_1 = 0; controller_names_cntr_1 < PyList_GET_SIZE(value); controller_names_cntr_1++) {
   13076           0 :                                 if (PyList_GET_ITEM(value, controller_names_cntr_1) == NULL) {
   13077           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->controller_names[controller_names_cntr_1]");
   13078           0 :                                         return -1;
   13079             :                                 }
   13080           0 :                                 PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, controller_names_cntr_1), return -1;);
   13081           0 :                                 if (talloc_reference(object->controller_names, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, controller_names_cntr_1))) == NULL) {
   13082           0 :                                         PyErr_NoMemory();
   13083           0 :                                         return -1;
   13084             :                                 }
   13085           0 :                                 object->controller_names[controller_names_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, controller_names_cntr_1));
   13086             :                         }
   13087             :                 }
   13088             :         }
   13089           0 :         return 0;
   13090             : }
   13091             : 
   13092           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_SecurityInformation(PyObject *obj, void *closure)
   13093             : {
   13094           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   13095             :         PyObject *py_SecurityInformation;
   13096           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)object->SecurityInformation);
   13097           0 :         return py_SecurityInformation;
   13098             : }
   13099             : 
   13100           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
   13101             : {
   13102           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13103           0 :         if (value == NULL) {
   13104           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SecurityInformation");
   13105           0 :                 return -1;
   13106             :         }
   13107             :         {
   13108           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
   13109           0 :                 if (PyLong_Check(value)) {
   13110             :                         unsigned long long test_var;
   13111           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13112           0 :                         if (PyErr_Occurred() != NULL) {
   13113           0 :                                 return -1;
   13114             :                         }
   13115           0 :                         if (test_var > uint_max) {
   13116           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   13117             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13118           0 :                                 return -1;
   13119             :                         }
   13120           0 :                         object->SecurityInformation = test_var;
   13121             :                 } else {
   13122           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   13123             :                           PyLong_Type.tp_name);
   13124           0 :                         return -1;
   13125             :                 }
   13126             :         }
   13127           0 :         return 0;
   13128             : }
   13129             : 
   13130           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_sdbuf(PyObject *obj, void *closure)
   13131             : {
   13132           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   13133             :         PyObject *py_sdbuf;
   13134           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
   13135           0 :         return py_sdbuf;
   13136             : }
   13137             : 
   13138           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
   13139             : {
   13140           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13141           0 :         if (value == NULL) {
   13142           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sdbuf");
   13143           0 :                 return -1;
   13144             :         }
   13145           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
   13146           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13147           0 :                 PyErr_NoMemory();
   13148           0 :                 return -1;
   13149             :         }
   13150           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
   13151           0 :         return 0;
   13152             : }
   13153             : 
   13154           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown1(PyObject *obj, void *closure)
   13155             : {
   13156           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   13157             :         PyObject *py_unknown1;
   13158           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
   13159           0 :         return py_unknown1;
   13160             : }
   13161             : 
   13162           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   13163             : {
   13164           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13165           0 :         if (value == NULL) {
   13166           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
   13167           0 :                 return -1;
   13168             :         }
   13169           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   13170           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13171           0 :                 PyErr_NoMemory();
   13172           0 :                 return -1;
   13173             :         }
   13174           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
   13175           0 :         return 0;
   13176             : }
   13177             : 
   13178           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown2(PyObject *obj, void *closure)
   13179             : {
   13180           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   13181             :         PyObject *py_unknown2;
   13182           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
   13183           0 :         return py_unknown2;
   13184             : }
   13185             : 
   13186           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   13187             : {
   13188           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13189           0 :         if (value == NULL) {
   13190           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
   13191           0 :                 return -1;
   13192             :         }
   13193           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   13194           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13195           0 :                 PyErr_NoMemory();
   13196           0 :                 return -1;
   13197             :         }
   13198           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
   13199           0 :         return 0;
   13200             : }
   13201             : 
   13202           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown3(PyObject *obj, void *closure)
   13203             : {
   13204           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   13205             :         PyObject *py_unknown3;
   13206           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
   13207           0 :         return py_unknown3;
   13208             : }
   13209             : 
   13210           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   13211             : {
   13212           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13213           0 :         if (value == NULL) {
   13214           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
   13215           0 :                 return -1;
   13216             :         }
   13217           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   13218           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13219           0 :                 PyErr_NoMemory();
   13220           0 :                 return -1;
   13221             :         }
   13222           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
   13223           0 :         return 0;
   13224             : }
   13225             : 
   13226           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown4(PyObject *obj, void *closure)
   13227             : {
   13228           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   13229             :         PyObject *py_unknown4;
   13230           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
   13231           0 :         return py_unknown4;
   13232             : }
   13233             : 
   13234           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   13235             : {
   13236           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13237           0 :         if (value == NULL) {
   13238           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
   13239           0 :                 return -1;
   13240             :         }
   13241           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   13242           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13243           0 :                 PyErr_NoMemory();
   13244           0 :                 return -1;
   13245             :         }
   13246           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
   13247           0 :         return 0;
   13248             : }
   13249             : 
   13250           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_posix_offset(PyObject *obj, void *closure)
   13251             : {
   13252           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   13253             :         PyObject *py_posix_offset;
   13254           0 :         py_posix_offset = PyLong_FromUnsignedLongLong((uint32_t)object->posix_offset);
   13255           0 :         return py_posix_offset;
   13256             : }
   13257             : 
   13258           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_posix_offset(PyObject *py_obj, PyObject *value, void *closure)
   13259             : {
   13260           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13261           0 :         if (value == NULL) {
   13262           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->posix_offset");
   13263           0 :                 return -1;
   13264             :         }
   13265             :         {
   13266           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->posix_offset));
   13267           0 :                 if (PyLong_Check(value)) {
   13268             :                         unsigned long long test_var;
   13269           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13270           0 :                         if (PyErr_Occurred() != NULL) {
   13271           0 :                                 return -1;
   13272             :                         }
   13273           0 :                         if (test_var > uint_max) {
   13274           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   13275             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13276           0 :                                 return -1;
   13277             :                         }
   13278           0 :                         object->posix_offset = test_var;
   13279             :                 } else {
   13280           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   13281             :                           PyLong_Type.tp_name);
   13282           0 :                         return -1;
   13283             :                 }
   13284             :         }
   13285           0 :         return 0;
   13286             : }
   13287             : 
   13288           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown6(PyObject *obj, void *closure)
   13289             : {
   13290           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   13291             :         PyObject *py_unknown6;
   13292           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown6);
   13293           0 :         return py_unknown6;
   13294             : }
   13295             : 
   13296           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
   13297             : {
   13298           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13299           0 :         if (value == NULL) {
   13300           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown6");
   13301           0 :                 return -1;
   13302             :         }
   13303             :         {
   13304           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
   13305           0 :                 if (PyLong_Check(value)) {
   13306             :                         unsigned long long test_var;
   13307           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13308           0 :                         if (PyErr_Occurred() != NULL) {
   13309           0 :                                 return -1;
   13310             :                         }
   13311           0 :                         if (test_var > uint_max) {
   13312           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   13313             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13314           0 :                                 return -1;
   13315             :                         }
   13316           0 :                         object->unknown6 = test_var;
   13317             :                 } else {
   13318           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   13319             :                           PyLong_Type.tp_name);
   13320           0 :                         return -1;
   13321             :                 }
   13322             :         }
   13323           0 :         return 0;
   13324             : }
   13325             : 
   13326           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown7(PyObject *obj, void *closure)
   13327             : {
   13328           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   13329             :         PyObject *py_unknown7;
   13330           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown7);
   13331           0 :         return py_unknown7;
   13332             : }
   13333             : 
   13334           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
   13335             : {
   13336           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13337           0 :         if (value == NULL) {
   13338           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown7");
   13339           0 :                 return -1;
   13340             :         }
   13341             :         {
   13342           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
   13343           0 :                 if (PyLong_Check(value)) {
   13344             :                         unsigned long long test_var;
   13345           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13346           0 :                         if (PyErr_Occurred() != NULL) {
   13347           0 :                                 return -1;
   13348             :                         }
   13349           0 :                         if (test_var > uint_max) {
   13350           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   13351             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13352           0 :                                 return -1;
   13353             :                         }
   13354           0 :                         object->unknown7 = test_var;
   13355             :                 } else {
   13356           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   13357             :                           PyLong_Type.tp_name);
   13358           0 :                         return -1;
   13359             :                 }
   13360             :         }
   13361           0 :         return 0;
   13362             : }
   13363             : 
   13364           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_get_unknown8(PyObject *obj, void *closure)
   13365             : {
   13366           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(obj);
   13367             :         PyObject *py_unknown8;
   13368           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown8);
   13369           0 :         return py_unknown8;
   13370             : }
   13371             : 
   13372           0 : static int py_netr_DELTA_TRUSTED_DOMAIN_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
   13373             : {
   13374           0 :         struct netr_DELTA_TRUSTED_DOMAIN *object = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(py_obj);
   13375           0 :         if (value == NULL) {
   13376           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown8");
   13377           0 :                 return -1;
   13378             :         }
   13379             :         {
   13380           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
   13381           0 :                 if (PyLong_Check(value)) {
   13382             :                         unsigned long long test_var;
   13383           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13384           0 :                         if (PyErr_Occurred() != NULL) {
   13385           0 :                                 return -1;
   13386             :                         }
   13387           0 :                         if (test_var > uint_max) {
   13388           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   13389             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13390           0 :                                 return -1;
   13391             :                         }
   13392           0 :                         object->unknown8 = test_var;
   13393             :                 } else {
   13394           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   13395             :                           PyLong_Type.tp_name);
   13396           0 :                         return -1;
   13397             :                 }
   13398             :         }
   13399           0 :         return 0;
   13400             : }
   13401             : 
   13402             : static PyGetSetDef py_netr_DELTA_TRUSTED_DOMAIN_getsetters[] = {
   13403             :         {
   13404             :                 .name = discard_const_p(char, "domain_name"),
   13405             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_domain_name,
   13406             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_domain_name,
   13407             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13408             :         },
   13409             :         {
   13410             :                 .name = discard_const_p(char, "num_controllers"),
   13411             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_num_controllers,
   13412             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_num_controllers,
   13413             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13414             :         },
   13415             :         {
   13416             :                 .name = discard_const_p(char, "controller_names"),
   13417             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_controller_names,
   13418             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_controller_names,
   13419             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13420             :         },
   13421             :         {
   13422             :                 .name = discard_const_p(char, "SecurityInformation"),
   13423             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_SecurityInformation,
   13424             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_SecurityInformation,
   13425             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13426             :         },
   13427             :         {
   13428             :                 .name = discard_const_p(char, "sdbuf"),
   13429             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_sdbuf,
   13430             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_sdbuf,
   13431             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
   13432             :         },
   13433             :         {
   13434             :                 .name = discard_const_p(char, "unknown1"),
   13435             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown1,
   13436             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown1,
   13437             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13438             :         },
   13439             :         {
   13440             :                 .name = discard_const_p(char, "unknown2"),
   13441             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown2,
   13442             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown2,
   13443             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13444             :         },
   13445             :         {
   13446             :                 .name = discard_const_p(char, "unknown3"),
   13447             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown3,
   13448             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown3,
   13449             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13450             :         },
   13451             :         {
   13452             :                 .name = discard_const_p(char, "unknown4"),
   13453             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown4,
   13454             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown4,
   13455             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   13456             :         },
   13457             :         {
   13458             :                 .name = discard_const_p(char, "posix_offset"),
   13459             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_posix_offset,
   13460             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_posix_offset,
   13461             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13462             :         },
   13463             :         {
   13464             :                 .name = discard_const_p(char, "unknown6"),
   13465             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown6,
   13466             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown6,
   13467             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13468             :         },
   13469             :         {
   13470             :                 .name = discard_const_p(char, "unknown7"),
   13471             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown7,
   13472             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown7,
   13473             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13474             :         },
   13475             :         {
   13476             :                 .name = discard_const_p(char, "unknown8"),
   13477             :                 .get = py_netr_DELTA_TRUSTED_DOMAIN_get_unknown8,
   13478             :                 .set = py_netr_DELTA_TRUSTED_DOMAIN_set_unknown8,
   13479             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13480             :         },
   13481             :         { .name = NULL }
   13482             : };
   13483             : 
   13484           0 : static PyObject *py_netr_DELTA_TRUSTED_DOMAIN_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13485             : {
   13486           0 :         return pytalloc_new(struct netr_DELTA_TRUSTED_DOMAIN, type);
   13487             : }
   13488             : 
   13489             : 
   13490             : static PyTypeObject netr_DELTA_TRUSTED_DOMAIN_Type = {
   13491             :         PyVarObject_HEAD_INIT(NULL, 0)
   13492             :         .tp_name = "netlogon.netr_DELTA_TRUSTED_DOMAIN",
   13493             :         .tp_getset = py_netr_DELTA_TRUSTED_DOMAIN_getsetters,
   13494             :         .tp_methods = NULL,
   13495             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   13496             :         .tp_new = py_netr_DELTA_TRUSTED_DOMAIN_new,
   13497             : };
   13498             : 
   13499             : 
   13500           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_privilege_entries(PyObject *obj, void *closure)
   13501             : {
   13502           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   13503             :         PyObject *py_privilege_entries;
   13504           0 :         py_privilege_entries = PyLong_FromUnsignedLongLong((uint32_t)object->privilege_entries);
   13505           0 :         return py_privilege_entries;
   13506             : }
   13507             : 
   13508           0 : static int py_netr_DELTA_ACCOUNT_set_privilege_entries(PyObject *py_obj, PyObject *value, void *closure)
   13509             : {
   13510           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   13511           0 :         if (value == NULL) {
   13512           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->privilege_entries");
   13513           0 :                 return -1;
   13514             :         }
   13515             :         {
   13516           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->privilege_entries));
   13517           0 :                 if (PyLong_Check(value)) {
   13518             :                         unsigned long long test_var;
   13519           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13520           0 :                         if (PyErr_Occurred() != NULL) {
   13521           0 :                                 return -1;
   13522             :                         }
   13523           0 :                         if (test_var > uint_max) {
   13524           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   13525             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13526           0 :                                 return -1;
   13527             :                         }
   13528           0 :                         object->privilege_entries = test_var;
   13529             :                 } else {
   13530           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   13531             :                           PyLong_Type.tp_name);
   13532           0 :                         return -1;
   13533             :                 }
   13534             :         }
   13535           0 :         return 0;
   13536             : }
   13537             : 
   13538           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_privilege_control(PyObject *obj, void *closure)
   13539             : {
   13540           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   13541             :         PyObject *py_privilege_control;
   13542           0 :         py_privilege_control = PyLong_FromUnsignedLongLong((uint32_t)object->privilege_control);
   13543           0 :         return py_privilege_control;
   13544             : }
   13545             : 
   13546           0 : static int py_netr_DELTA_ACCOUNT_set_privilege_control(PyObject *py_obj, PyObject *value, void *closure)
   13547             : {
   13548           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   13549           0 :         if (value == NULL) {
   13550           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->privilege_control");
   13551           0 :                 return -1;
   13552             :         }
   13553             :         {
   13554           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->privilege_control));
   13555           0 :                 if (PyLong_Check(value)) {
   13556             :                         unsigned long long test_var;
   13557           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13558           0 :                         if (PyErr_Occurred() != NULL) {
   13559           0 :                                 return -1;
   13560             :                         }
   13561           0 :                         if (test_var > uint_max) {
   13562           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   13563             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13564           0 :                                 return -1;
   13565             :                         }
   13566           0 :                         object->privilege_control = test_var;
   13567             :                 } else {
   13568           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   13569             :                           PyLong_Type.tp_name);
   13570           0 :                         return -1;
   13571             :                 }
   13572             :         }
   13573           0 :         return 0;
   13574             : }
   13575             : 
   13576           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_privilege_attrib(PyObject *obj, void *closure)
   13577             : {
   13578           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   13579             :         PyObject *py_privilege_attrib;
   13580           0 :         if (object->privilege_attrib == NULL) {
   13581           0 :                 Py_RETURN_NONE;
   13582             :         }
   13583           0 :         if (object->privilege_attrib == NULL) {
   13584           0 :                 py_privilege_attrib = Py_None;
   13585           0 :                 Py_INCREF(py_privilege_attrib);
   13586             :         } else {
   13587           0 :                 py_privilege_attrib = PyList_New(object->privilege_entries);
   13588           0 :                 if (py_privilege_attrib == NULL) {
   13589           0 :                         return NULL;
   13590             :                 }
   13591             :                 {
   13592             :                         int privilege_attrib_cntr_1;
   13593           0 :                         for (privilege_attrib_cntr_1 = 0; privilege_attrib_cntr_1 < (object->privilege_entries); privilege_attrib_cntr_1++) {
   13594             :                                 PyObject *py_privilege_attrib_1;
   13595           0 :                                 py_privilege_attrib_1 = PyLong_FromUnsignedLongLong((uint32_t)object->privilege_attrib[privilege_attrib_cntr_1]);
   13596           0 :                                 PyList_SetItem(py_privilege_attrib, privilege_attrib_cntr_1, py_privilege_attrib_1);
   13597             :                         }
   13598             :                 }
   13599             :         }
   13600           0 :         return py_privilege_attrib;
   13601             : }
   13602             : 
   13603           0 : static int py_netr_DELTA_ACCOUNT_set_privilege_attrib(PyObject *py_obj, PyObject *value, void *closure)
   13604             : {
   13605           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   13606           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->privilege_attrib));
   13607           0 :         if (value == NULL) {
   13608           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->privilege_attrib");
   13609           0 :                 return -1;
   13610             :         }
   13611           0 :         if (value == Py_None) {
   13612           0 :                 object->privilege_attrib = NULL;
   13613             :         } else {
   13614           0 :                 object->privilege_attrib = NULL;
   13615           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   13616             :                 {
   13617             :                         int privilege_attrib_cntr_1;
   13618           0 :                         object->privilege_attrib = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->privilege_attrib, PyList_GET_SIZE(value));
   13619           0 :                         if (!object->privilege_attrib) { return -1;; }
   13620           0 :                         talloc_set_name_const(object->privilege_attrib, "ARRAY: object->privilege_attrib");
   13621           0 :                         for (privilege_attrib_cntr_1 = 0; privilege_attrib_cntr_1 < PyList_GET_SIZE(value); privilege_attrib_cntr_1++) {
   13622           0 :                                 if (PyList_GET_ITEM(value, privilege_attrib_cntr_1) == NULL) {
   13623           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->privilege_attrib[privilege_attrib_cntr_1]");
   13624           0 :                                         return -1;
   13625             :                                 }
   13626             :                                 {
   13627           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->privilege_attrib[privilege_attrib_cntr_1]));
   13628           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, privilege_attrib_cntr_1))) {
   13629             :                                                 unsigned long long test_var;
   13630           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, privilege_attrib_cntr_1));
   13631           0 :                                                 if (PyErr_Occurred() != NULL) {
   13632           0 :                                                         return -1;
   13633             :                                                 }
   13634           0 :                                                 if (test_var > uint_max) {
   13635           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   13636             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   13637           0 :                                                         return -1;
   13638             :                                                 }
   13639           0 :                                                 object->privilege_attrib[privilege_attrib_cntr_1] = test_var;
   13640             :                                         } else {
   13641           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",\
   13642             :                                                   PyLong_Type.tp_name);
   13643           0 :                                                 return -1;
   13644             :                                         }
   13645             :                                 }
   13646             :                         }
   13647             :                 }
   13648             :         }
   13649           0 :         return 0;
   13650             : }
   13651             : 
   13652           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_privilege_name(PyObject *obj, void *closure)
   13653             : {
   13654           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   13655             :         PyObject *py_privilege_name;
   13656           0 :         if (object->privilege_name == NULL) {
   13657           0 :                 Py_RETURN_NONE;
   13658             :         }
   13659           0 :         if (object->privilege_name == NULL) {
   13660           0 :                 py_privilege_name = Py_None;
   13661           0 :                 Py_INCREF(py_privilege_name);
   13662             :         } else {
   13663           0 :                 py_privilege_name = PyList_New(object->privilege_entries);
   13664           0 :                 if (py_privilege_name == NULL) {
   13665           0 :                         return NULL;
   13666             :                 }
   13667             :                 {
   13668             :                         int privilege_name_cntr_1;
   13669           0 :                         for (privilege_name_cntr_1 = 0; privilege_name_cntr_1 < (object->privilege_entries); privilege_name_cntr_1++) {
   13670             :                                 PyObject *py_privilege_name_1;
   13671           0 :                                 py_privilege_name_1 = pytalloc_reference_ex(lsa_String_Type, object->privilege_name, &object->privilege_name[privilege_name_cntr_1]);
   13672           0 :                                 PyList_SetItem(py_privilege_name, privilege_name_cntr_1, py_privilege_name_1);
   13673             :                         }
   13674             :                 }
   13675             :         }
   13676           0 :         return py_privilege_name;
   13677             : }
   13678             : 
   13679           0 : static int py_netr_DELTA_ACCOUNT_set_privilege_name(PyObject *py_obj, PyObject *value, void *closure)
   13680             : {
   13681           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   13682           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->privilege_name));
   13683           0 :         if (value == NULL) {
   13684           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->privilege_name");
   13685           0 :                 return -1;
   13686             :         }
   13687           0 :         if (value == Py_None) {
   13688           0 :                 object->privilege_name = NULL;
   13689             :         } else {
   13690           0 :                 object->privilege_name = NULL;
   13691           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   13692             :                 {
   13693             :                         int privilege_name_cntr_1;
   13694           0 :                         object->privilege_name = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->privilege_name, PyList_GET_SIZE(value));
   13695           0 :                         if (!object->privilege_name) { return -1;; }
   13696           0 :                         talloc_set_name_const(object->privilege_name, "ARRAY: object->privilege_name");
   13697           0 :                         for (privilege_name_cntr_1 = 0; privilege_name_cntr_1 < PyList_GET_SIZE(value); privilege_name_cntr_1++) {
   13698           0 :                                 if (PyList_GET_ITEM(value, privilege_name_cntr_1) == NULL) {
   13699           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->privilege_name[privilege_name_cntr_1]");
   13700           0 :                                         return -1;
   13701             :                                 }
   13702           0 :                                 PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, privilege_name_cntr_1), return -1;);
   13703           0 :                                 if (talloc_reference(object->privilege_name, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, privilege_name_cntr_1))) == NULL) {
   13704           0 :                                         PyErr_NoMemory();
   13705           0 :                                         return -1;
   13706             :                                 }
   13707           0 :                                 object->privilege_name[privilege_name_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, privilege_name_cntr_1));
   13708             :                         }
   13709             :                 }
   13710             :         }
   13711           0 :         return 0;
   13712             : }
   13713             : 
   13714           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_quotalimits(PyObject *obj, void *closure)
   13715             : {
   13716           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   13717             :         PyObject *py_quotalimits;
   13718           0 :         py_quotalimits = pytalloc_reference_ex(&netr_QUOTA_LIMITS_Type, pytalloc_get_mem_ctx(obj), &object->quotalimits);
   13719           0 :         return py_quotalimits;
   13720             : }
   13721             : 
   13722           0 : static int py_netr_DELTA_ACCOUNT_set_quotalimits(PyObject *py_obj, PyObject *value, void *closure)
   13723             : {
   13724           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   13725           0 :         if (value == NULL) {
   13726           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->quotalimits");
   13727           0 :                 return -1;
   13728             :         }
   13729           0 :         PY_CHECK_TYPE(&netr_QUOTA_LIMITS_Type, value, return -1;);
   13730           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13731           0 :                 PyErr_NoMemory();
   13732           0 :                 return -1;
   13733             :         }
   13734           0 :         object->quotalimits = *(struct netr_QUOTA_LIMITS *)pytalloc_get_ptr(value);
   13735           0 :         return 0;
   13736             : }
   13737             : 
   13738           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_system_flags(PyObject *obj, void *closure)
   13739             : {
   13740           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   13741             :         PyObject *py_system_flags;
   13742           0 :         py_system_flags = PyLong_FromUnsignedLongLong((uint32_t)object->system_flags);
   13743           0 :         return py_system_flags;
   13744             : }
   13745             : 
   13746           0 : static int py_netr_DELTA_ACCOUNT_set_system_flags(PyObject *py_obj, PyObject *value, void *closure)
   13747             : {
   13748           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   13749           0 :         if (value == NULL) {
   13750           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->system_flags");
   13751           0 :                 return -1;
   13752             :         }
   13753             :         {
   13754           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->system_flags));
   13755           0 :                 if (PyLong_Check(value)) {
   13756             :                         unsigned long long test_var;
   13757           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13758           0 :                         if (PyErr_Occurred() != NULL) {
   13759           0 :                                 return -1;
   13760             :                         }
   13761           0 :                         if (test_var > uint_max) {
   13762           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   13763             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13764           0 :                                 return -1;
   13765             :                         }
   13766           0 :                         object->system_flags = test_var;
   13767             :                 } else {
   13768           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   13769             :                           PyLong_Type.tp_name);
   13770           0 :                         return -1;
   13771             :                 }
   13772             :         }
   13773           0 :         return 0;
   13774             : }
   13775             : 
   13776           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_SecurityInformation(PyObject *obj, void *closure)
   13777             : {
   13778           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   13779             :         PyObject *py_SecurityInformation;
   13780           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)object->SecurityInformation);
   13781           0 :         return py_SecurityInformation;
   13782             : }
   13783             : 
   13784           0 : static int py_netr_DELTA_ACCOUNT_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
   13785             : {
   13786           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   13787           0 :         if (value == NULL) {
   13788           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SecurityInformation");
   13789           0 :                 return -1;
   13790             :         }
   13791             :         {
   13792           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
   13793           0 :                 if (PyLong_Check(value)) {
   13794             :                         unsigned long long test_var;
   13795           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13796           0 :                         if (PyErr_Occurred() != NULL) {
   13797           0 :                                 return -1;
   13798             :                         }
   13799           0 :                         if (test_var > uint_max) {
   13800           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   13801             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13802           0 :                                 return -1;
   13803             :                         }
   13804           0 :                         object->SecurityInformation = test_var;
   13805             :                 } else {
   13806           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   13807             :                           PyLong_Type.tp_name);
   13808           0 :                         return -1;
   13809             :                 }
   13810             :         }
   13811           0 :         return 0;
   13812             : }
   13813             : 
   13814           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_sdbuf(PyObject *obj, void *closure)
   13815             : {
   13816           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   13817             :         PyObject *py_sdbuf;
   13818           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
   13819           0 :         return py_sdbuf;
   13820             : }
   13821             : 
   13822           0 : static int py_netr_DELTA_ACCOUNT_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
   13823             : {
   13824           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   13825           0 :         if (value == NULL) {
   13826           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sdbuf");
   13827           0 :                 return -1;
   13828             :         }
   13829           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
   13830           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13831           0 :                 PyErr_NoMemory();
   13832           0 :                 return -1;
   13833             :         }
   13834           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
   13835           0 :         return 0;
   13836             : }
   13837             : 
   13838           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_unknown1(PyObject *obj, void *closure)
   13839             : {
   13840           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   13841             :         PyObject *py_unknown1;
   13842           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
   13843           0 :         return py_unknown1;
   13844             : }
   13845             : 
   13846           0 : static int py_netr_DELTA_ACCOUNT_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   13847             : {
   13848           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   13849           0 :         if (value == NULL) {
   13850           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
   13851           0 :                 return -1;
   13852             :         }
   13853           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   13854           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13855           0 :                 PyErr_NoMemory();
   13856           0 :                 return -1;
   13857             :         }
   13858           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
   13859           0 :         return 0;
   13860             : }
   13861             : 
   13862           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_unknown2(PyObject *obj, void *closure)
   13863             : {
   13864           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   13865             :         PyObject *py_unknown2;
   13866           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
   13867           0 :         return py_unknown2;
   13868             : }
   13869             : 
   13870           0 : static int py_netr_DELTA_ACCOUNT_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   13871             : {
   13872           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   13873           0 :         if (value == NULL) {
   13874           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
   13875           0 :                 return -1;
   13876             :         }
   13877           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   13878           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13879           0 :                 PyErr_NoMemory();
   13880           0 :                 return -1;
   13881             :         }
   13882           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
   13883           0 :         return 0;
   13884             : }
   13885             : 
   13886           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_unknown3(PyObject *obj, void *closure)
   13887             : {
   13888           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   13889             :         PyObject *py_unknown3;
   13890           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
   13891           0 :         return py_unknown3;
   13892             : }
   13893             : 
   13894           0 : static int py_netr_DELTA_ACCOUNT_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   13895             : {
   13896           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   13897           0 :         if (value == NULL) {
   13898           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
   13899           0 :                 return -1;
   13900             :         }
   13901           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   13902           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13903           0 :                 PyErr_NoMemory();
   13904           0 :                 return -1;
   13905             :         }
   13906           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
   13907           0 :         return 0;
   13908             : }
   13909             : 
   13910           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_unknown4(PyObject *obj, void *closure)
   13911             : {
   13912           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   13913             :         PyObject *py_unknown4;
   13914           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
   13915           0 :         return py_unknown4;
   13916             : }
   13917             : 
   13918           0 : static int py_netr_DELTA_ACCOUNT_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   13919             : {
   13920           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   13921           0 :         if (value == NULL) {
   13922           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
   13923           0 :                 return -1;
   13924             :         }
   13925           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   13926           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13927           0 :                 PyErr_NoMemory();
   13928           0 :                 return -1;
   13929             :         }
   13930           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
   13931           0 :         return 0;
   13932             : }
   13933             : 
   13934           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_unknown5(PyObject *obj, void *closure)
   13935             : {
   13936           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   13937             :         PyObject *py_unknown5;
   13938           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown5);
   13939           0 :         return py_unknown5;
   13940             : }
   13941             : 
   13942           0 : static int py_netr_DELTA_ACCOUNT_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
   13943             : {
   13944           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   13945           0 :         if (value == NULL) {
   13946           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown5");
   13947           0 :                 return -1;
   13948             :         }
   13949             :         {
   13950           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
   13951           0 :                 if (PyLong_Check(value)) {
   13952             :                         unsigned long long test_var;
   13953           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13954           0 :                         if (PyErr_Occurred() != NULL) {
   13955           0 :                                 return -1;
   13956             :                         }
   13957           0 :                         if (test_var > uint_max) {
   13958           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   13959             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13960           0 :                                 return -1;
   13961             :                         }
   13962           0 :                         object->unknown5 = test_var;
   13963             :                 } else {
   13964           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   13965             :                           PyLong_Type.tp_name);
   13966           0 :                         return -1;
   13967             :                 }
   13968             :         }
   13969           0 :         return 0;
   13970             : }
   13971             : 
   13972           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_unknown6(PyObject *obj, void *closure)
   13973             : {
   13974           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   13975             :         PyObject *py_unknown6;
   13976           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown6);
   13977           0 :         return py_unknown6;
   13978             : }
   13979             : 
   13980           0 : static int py_netr_DELTA_ACCOUNT_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
   13981             : {
   13982           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   13983           0 :         if (value == NULL) {
   13984           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown6");
   13985           0 :                 return -1;
   13986             :         }
   13987             :         {
   13988           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
   13989           0 :                 if (PyLong_Check(value)) {
   13990             :                         unsigned long long test_var;
   13991           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13992           0 :                         if (PyErr_Occurred() != NULL) {
   13993           0 :                                 return -1;
   13994             :                         }
   13995           0 :                         if (test_var > uint_max) {
   13996           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   13997             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13998           0 :                                 return -1;
   13999             :                         }
   14000           0 :                         object->unknown6 = test_var;
   14001             :                 } else {
   14002           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   14003             :                           PyLong_Type.tp_name);
   14004           0 :                         return -1;
   14005             :                 }
   14006             :         }
   14007           0 :         return 0;
   14008             : }
   14009             : 
   14010           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_unknown7(PyObject *obj, void *closure)
   14011             : {
   14012           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   14013             :         PyObject *py_unknown7;
   14014           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown7);
   14015           0 :         return py_unknown7;
   14016             : }
   14017             : 
   14018           0 : static int py_netr_DELTA_ACCOUNT_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
   14019             : {
   14020           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   14021           0 :         if (value == NULL) {
   14022           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown7");
   14023           0 :                 return -1;
   14024             :         }
   14025             :         {
   14026           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
   14027           0 :                 if (PyLong_Check(value)) {
   14028             :                         unsigned long long test_var;
   14029           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14030           0 :                         if (PyErr_Occurred() != NULL) {
   14031           0 :                                 return -1;
   14032             :                         }
   14033           0 :                         if (test_var > uint_max) {
   14034           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   14035             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14036           0 :                                 return -1;
   14037             :                         }
   14038           0 :                         object->unknown7 = test_var;
   14039             :                 } else {
   14040           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   14041             :                           PyLong_Type.tp_name);
   14042           0 :                         return -1;
   14043             :                 }
   14044             :         }
   14045           0 :         return 0;
   14046             : }
   14047             : 
   14048           0 : static PyObject *py_netr_DELTA_ACCOUNT_get_unknown8(PyObject *obj, void *closure)
   14049             : {
   14050           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(obj);
   14051             :         PyObject *py_unknown8;
   14052           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown8);
   14053           0 :         return py_unknown8;
   14054             : }
   14055             : 
   14056           0 : static int py_netr_DELTA_ACCOUNT_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
   14057             : {
   14058           0 :         struct netr_DELTA_ACCOUNT *object = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(py_obj);
   14059           0 :         if (value == NULL) {
   14060           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown8");
   14061           0 :                 return -1;
   14062             :         }
   14063             :         {
   14064           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
   14065           0 :                 if (PyLong_Check(value)) {
   14066             :                         unsigned long long test_var;
   14067           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14068           0 :                         if (PyErr_Occurred() != NULL) {
   14069           0 :                                 return -1;
   14070             :                         }
   14071           0 :                         if (test_var > uint_max) {
   14072           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   14073             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14074           0 :                                 return -1;
   14075             :                         }
   14076           0 :                         object->unknown8 = test_var;
   14077             :                 } else {
   14078           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   14079             :                           PyLong_Type.tp_name);
   14080           0 :                         return -1;
   14081             :                 }
   14082             :         }
   14083           0 :         return 0;
   14084             : }
   14085             : 
   14086             : static PyGetSetDef py_netr_DELTA_ACCOUNT_getsetters[] = {
   14087             :         {
   14088             :                 .name = discard_const_p(char, "privilege_entries"),
   14089             :                 .get = py_netr_DELTA_ACCOUNT_get_privilege_entries,
   14090             :                 .set = py_netr_DELTA_ACCOUNT_set_privilege_entries,
   14091             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14092             :         },
   14093             :         {
   14094             :                 .name = discard_const_p(char, "privilege_control"),
   14095             :                 .get = py_netr_DELTA_ACCOUNT_get_privilege_control,
   14096             :                 .set = py_netr_DELTA_ACCOUNT_set_privilege_control,
   14097             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14098             :         },
   14099             :         {
   14100             :                 .name = discard_const_p(char, "privilege_attrib"),
   14101             :                 .get = py_netr_DELTA_ACCOUNT_get_privilege_attrib,
   14102             :                 .set = py_netr_DELTA_ACCOUNT_set_privilege_attrib,
   14103             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14104             :         },
   14105             :         {
   14106             :                 .name = discard_const_p(char, "privilege_name"),
   14107             :                 .get = py_netr_DELTA_ACCOUNT_get_privilege_name,
   14108             :                 .set = py_netr_DELTA_ACCOUNT_set_privilege_name,
   14109             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   14110             :         },
   14111             :         {
   14112             :                 .name = discard_const_p(char, "quotalimits"),
   14113             :                 .get = py_netr_DELTA_ACCOUNT_get_quotalimits,
   14114             :                 .set = py_netr_DELTA_ACCOUNT_set_quotalimits,
   14115             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_QUOTA_LIMITS")
   14116             :         },
   14117             :         {
   14118             :                 .name = discard_const_p(char, "system_flags"),
   14119             :                 .get = py_netr_DELTA_ACCOUNT_get_system_flags,
   14120             :                 .set = py_netr_DELTA_ACCOUNT_set_system_flags,
   14121             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14122             :         },
   14123             :         {
   14124             :                 .name = discard_const_p(char, "SecurityInformation"),
   14125             :                 .get = py_netr_DELTA_ACCOUNT_get_SecurityInformation,
   14126             :                 .set = py_netr_DELTA_ACCOUNT_set_SecurityInformation,
   14127             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14128             :         },
   14129             :         {
   14130             :                 .name = discard_const_p(char, "sdbuf"),
   14131             :                 .get = py_netr_DELTA_ACCOUNT_get_sdbuf,
   14132             :                 .set = py_netr_DELTA_ACCOUNT_set_sdbuf,
   14133             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
   14134             :         },
   14135             :         {
   14136             :                 .name = discard_const_p(char, "unknown1"),
   14137             :                 .get = py_netr_DELTA_ACCOUNT_get_unknown1,
   14138             :                 .set = py_netr_DELTA_ACCOUNT_set_unknown1,
   14139             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   14140             :         },
   14141             :         {
   14142             :                 .name = discard_const_p(char, "unknown2"),
   14143             :                 .get = py_netr_DELTA_ACCOUNT_get_unknown2,
   14144             :                 .set = py_netr_DELTA_ACCOUNT_set_unknown2,
   14145             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   14146             :         },
   14147             :         {
   14148             :                 .name = discard_const_p(char, "unknown3"),
   14149             :                 .get = py_netr_DELTA_ACCOUNT_get_unknown3,
   14150             :                 .set = py_netr_DELTA_ACCOUNT_set_unknown3,
   14151             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   14152             :         },
   14153             :         {
   14154             :                 .name = discard_const_p(char, "unknown4"),
   14155             :                 .get = py_netr_DELTA_ACCOUNT_get_unknown4,
   14156             :                 .set = py_netr_DELTA_ACCOUNT_set_unknown4,
   14157             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   14158             :         },
   14159             :         {
   14160             :                 .name = discard_const_p(char, "unknown5"),
   14161             :                 .get = py_netr_DELTA_ACCOUNT_get_unknown5,
   14162             :                 .set = py_netr_DELTA_ACCOUNT_set_unknown5,
   14163             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14164             :         },
   14165             :         {
   14166             :                 .name = discard_const_p(char, "unknown6"),
   14167             :                 .get = py_netr_DELTA_ACCOUNT_get_unknown6,
   14168             :                 .set = py_netr_DELTA_ACCOUNT_set_unknown6,
   14169             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14170             :         },
   14171             :         {
   14172             :                 .name = discard_const_p(char, "unknown7"),
   14173             :                 .get = py_netr_DELTA_ACCOUNT_get_unknown7,
   14174             :                 .set = py_netr_DELTA_ACCOUNT_set_unknown7,
   14175             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14176             :         },
   14177             :         {
   14178             :                 .name = discard_const_p(char, "unknown8"),
   14179             :                 .get = py_netr_DELTA_ACCOUNT_get_unknown8,
   14180             :                 .set = py_netr_DELTA_ACCOUNT_set_unknown8,
   14181             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14182             :         },
   14183             :         { .name = NULL }
   14184             : };
   14185             : 
   14186           0 : static PyObject *py_netr_DELTA_ACCOUNT_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14187             : {
   14188           0 :         return pytalloc_new(struct netr_DELTA_ACCOUNT, type);
   14189             : }
   14190             : 
   14191             : 
   14192             : static PyTypeObject netr_DELTA_ACCOUNT_Type = {
   14193             :         PyVarObject_HEAD_INIT(NULL, 0)
   14194             :         .tp_name = "netlogon.netr_DELTA_ACCOUNT",
   14195             :         .tp_getset = py_netr_DELTA_ACCOUNT_getsetters,
   14196             :         .tp_methods = NULL,
   14197             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   14198             :         .tp_new = py_netr_DELTA_ACCOUNT_new,
   14199             : };
   14200             : 
   14201             : 
   14202           0 : static PyObject *py_netr_CIPHER_VALUE_get_len(PyObject *obj, void *closure)
   14203             : {
   14204           0 :         struct netr_CIPHER_VALUE *object = (struct netr_CIPHER_VALUE *)pytalloc_get_ptr(obj);
   14205             :         PyObject *py_len;
   14206           0 :         py_len = PyLong_FromUnsignedLongLong((uint32_t)object->len);
   14207           0 :         return py_len;
   14208             : }
   14209             : 
   14210           0 : static int py_netr_CIPHER_VALUE_set_len(PyObject *py_obj, PyObject *value, void *closure)
   14211             : {
   14212           0 :         struct netr_CIPHER_VALUE *object = (struct netr_CIPHER_VALUE *)pytalloc_get_ptr(py_obj);
   14213           0 :         if (value == NULL) {
   14214           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->len");
   14215           0 :                 return -1;
   14216             :         }
   14217             :         {
   14218           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->len));
   14219           0 :                 if (PyLong_Check(value)) {
   14220             :                         unsigned long long test_var;
   14221           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14222           0 :                         if (PyErr_Occurred() != NULL) {
   14223           0 :                                 return -1;
   14224             :                         }
   14225           0 :                         if (test_var > uint_max) {
   14226           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   14227             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14228           0 :                                 return -1;
   14229             :                         }
   14230           0 :                         object->len = test_var;
   14231             :                 } else {
   14232           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   14233             :                           PyLong_Type.tp_name);
   14234           0 :                         return -1;
   14235             :                 }
   14236             :         }
   14237           0 :         return 0;
   14238             : }
   14239             : 
   14240           0 : static PyObject *py_netr_CIPHER_VALUE_get_maxlen(PyObject *obj, void *closure)
   14241             : {
   14242           0 :         struct netr_CIPHER_VALUE *object = (struct netr_CIPHER_VALUE *)pytalloc_get_ptr(obj);
   14243             :         PyObject *py_maxlen;
   14244           0 :         py_maxlen = PyLong_FromUnsignedLongLong((uint32_t)object->maxlen);
   14245           0 :         return py_maxlen;
   14246             : }
   14247             : 
   14248           0 : static int py_netr_CIPHER_VALUE_set_maxlen(PyObject *py_obj, PyObject *value, void *closure)
   14249             : {
   14250           0 :         struct netr_CIPHER_VALUE *object = (struct netr_CIPHER_VALUE *)pytalloc_get_ptr(py_obj);
   14251           0 :         if (value == NULL) {
   14252           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->maxlen");
   14253           0 :                 return -1;
   14254             :         }
   14255             :         {
   14256           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->maxlen));
   14257           0 :                 if (PyLong_Check(value)) {
   14258             :                         unsigned long long test_var;
   14259           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14260           0 :                         if (PyErr_Occurred() != NULL) {
   14261           0 :                                 return -1;
   14262             :                         }
   14263           0 :                         if (test_var > uint_max) {
   14264           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   14265             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14266           0 :                                 return -1;
   14267             :                         }
   14268           0 :                         object->maxlen = test_var;
   14269             :                 } else {
   14270           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   14271             :                           PyLong_Type.tp_name);
   14272           0 :                         return -1;
   14273             :                 }
   14274             :         }
   14275           0 :         return 0;
   14276             : }
   14277             : 
   14278           0 : static PyObject *py_netr_CIPHER_VALUE_get_cipher_data(PyObject *obj, void *closure)
   14279             : {
   14280           0 :         struct netr_CIPHER_VALUE *object = (struct netr_CIPHER_VALUE *)pytalloc_get_ptr(obj);
   14281             :         PyObject *py_cipher_data;
   14282           0 :         if (object->cipher_data == NULL) {
   14283           0 :                 Py_RETURN_NONE;
   14284             :         }
   14285           0 :         if (object->cipher_data == NULL) {
   14286           0 :                 py_cipher_data = Py_None;
   14287           0 :                 Py_INCREF(py_cipher_data);
   14288             :         } else {
   14289           0 :                 py_cipher_data = PyList_New(object->len);
   14290           0 :                 if (py_cipher_data == NULL) {
   14291           0 :                         return NULL;
   14292             :                 }
   14293             :                 {
   14294             :                         int cipher_data_cntr_1;
   14295           0 :                         for (cipher_data_cntr_1 = 0; cipher_data_cntr_1 < (object->len); cipher_data_cntr_1++) {
   14296             :                                 PyObject *py_cipher_data_1;
   14297           0 :                                 py_cipher_data_1 = PyLong_FromLong((uint16_t)object->cipher_data[cipher_data_cntr_1]);
   14298           0 :                                 PyList_SetItem(py_cipher_data, cipher_data_cntr_1, py_cipher_data_1);
   14299             :                         }
   14300             :                 }
   14301             :         }
   14302           0 :         return py_cipher_data;
   14303             : }
   14304             : 
   14305           0 : static int py_netr_CIPHER_VALUE_set_cipher_data(PyObject *py_obj, PyObject *value, void *closure)
   14306             : {
   14307           0 :         struct netr_CIPHER_VALUE *object = (struct netr_CIPHER_VALUE *)pytalloc_get_ptr(py_obj);
   14308           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->cipher_data));
   14309           0 :         if (value == NULL) {
   14310           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->cipher_data");
   14311           0 :                 return -1;
   14312             :         }
   14313           0 :         if (value == Py_None) {
   14314           0 :                 object->cipher_data = NULL;
   14315             :         } else {
   14316           0 :                 object->cipher_data = NULL;
   14317           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   14318             :                 {
   14319             :                         int cipher_data_cntr_1;
   14320           0 :                         object->cipher_data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->cipher_data, PyList_GET_SIZE(value));
   14321           0 :                         if (!object->cipher_data) { return -1;; }
   14322           0 :                         talloc_set_name_const(object->cipher_data, "ARRAY: object->cipher_data");
   14323           0 :                         for (cipher_data_cntr_1 = 0; cipher_data_cntr_1 < PyList_GET_SIZE(value); cipher_data_cntr_1++) {
   14324           0 :                                 if (PyList_GET_ITEM(value, cipher_data_cntr_1) == NULL) {
   14325           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->cipher_data[cipher_data_cntr_1]");
   14326           0 :                                         return -1;
   14327             :                                 }
   14328             :                                 {
   14329           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->cipher_data[cipher_data_cntr_1]));
   14330           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, cipher_data_cntr_1))) {
   14331             :                                                 unsigned long long test_var;
   14332           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, cipher_data_cntr_1));
   14333           0 :                                                 if (PyErr_Occurred() != NULL) {
   14334           0 :                                                         return -1;
   14335             :                                                 }
   14336           0 :                                                 if (test_var > uint_max) {
   14337           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   14338             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   14339           0 :                                                         return -1;
   14340             :                                                 }
   14341           0 :                                                 object->cipher_data[cipher_data_cntr_1] = test_var;
   14342             :                                         } else {
   14343           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",\
   14344             :                                                   PyLong_Type.tp_name);
   14345           0 :                                                 return -1;
   14346             :                                         }
   14347             :                                 }
   14348             :                         }
   14349             :                 }
   14350             :         }
   14351           0 :         return 0;
   14352             : }
   14353             : 
   14354             : static PyGetSetDef py_netr_CIPHER_VALUE_getsetters[] = {
   14355             :         {
   14356             :                 .name = discard_const_p(char, "len"),
   14357             :                 .get = py_netr_CIPHER_VALUE_get_len,
   14358             :                 .set = py_netr_CIPHER_VALUE_set_len,
   14359             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14360             :         },
   14361             :         {
   14362             :                 .name = discard_const_p(char, "maxlen"),
   14363             :                 .get = py_netr_CIPHER_VALUE_get_maxlen,
   14364             :                 .set = py_netr_CIPHER_VALUE_set_maxlen,
   14365             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14366             :         },
   14367             :         {
   14368             :                 .name = discard_const_p(char, "cipher_data"),
   14369             :                 .get = py_netr_CIPHER_VALUE_get_cipher_data,
   14370             :                 .set = py_netr_CIPHER_VALUE_set_cipher_data,
   14371             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   14372             :         },
   14373             :         { .name = NULL }
   14374             : };
   14375             : 
   14376           0 : static PyObject *py_netr_CIPHER_VALUE_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14377             : {
   14378           0 :         return pytalloc_new(struct netr_CIPHER_VALUE, type);
   14379             : }
   14380             : 
   14381             : 
   14382             : static PyTypeObject netr_CIPHER_VALUE_Type = {
   14383             :         PyVarObject_HEAD_INIT(NULL, 0)
   14384             :         .tp_name = "netlogon.netr_CIPHER_VALUE",
   14385             :         .tp_getset = py_netr_CIPHER_VALUE_getsetters,
   14386             :         .tp_methods = NULL,
   14387             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   14388             :         .tp_new = py_netr_CIPHER_VALUE_new,
   14389             : };
   14390             : 
   14391             : 
   14392           0 : static PyObject *py_netr_DELTA_SECRET_get_current_cipher(PyObject *obj, void *closure)
   14393             : {
   14394           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14395             :         PyObject *py_current_cipher;
   14396           0 :         py_current_cipher = pytalloc_reference_ex(&netr_CIPHER_VALUE_Type, pytalloc_get_mem_ctx(obj), &object->current_cipher);
   14397           0 :         return py_current_cipher;
   14398             : }
   14399             : 
   14400           0 : static int py_netr_DELTA_SECRET_set_current_cipher(PyObject *py_obj, PyObject *value, void *closure)
   14401             : {
   14402           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14403           0 :         if (value == NULL) {
   14404           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->current_cipher");
   14405           0 :                 return -1;
   14406             :         }
   14407           0 :         PY_CHECK_TYPE(&netr_CIPHER_VALUE_Type, value, return -1;);
   14408           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14409           0 :                 PyErr_NoMemory();
   14410           0 :                 return -1;
   14411             :         }
   14412           0 :         object->current_cipher = *(struct netr_CIPHER_VALUE *)pytalloc_get_ptr(value);
   14413           0 :         return 0;
   14414             : }
   14415             : 
   14416           0 : static PyObject *py_netr_DELTA_SECRET_get_current_cipher_set_time(PyObject *obj, void *closure)
   14417             : {
   14418           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14419             :         PyObject *py_current_cipher_set_time;
   14420           0 :         py_current_cipher_set_time = PyLong_FromUnsignedLongLong(object->current_cipher_set_time);
   14421           0 :         return py_current_cipher_set_time;
   14422             : }
   14423             : 
   14424           0 : static int py_netr_DELTA_SECRET_set_current_cipher_set_time(PyObject *py_obj, PyObject *value, void *closure)
   14425             : {
   14426           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14427           0 :         if (value == NULL) {
   14428           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->current_cipher_set_time");
   14429           0 :                 return -1;
   14430             :         }
   14431             :         {
   14432           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->current_cipher_set_time));
   14433           0 :                 if (PyLong_Check(value)) {
   14434             :                         unsigned long long test_var;
   14435           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14436           0 :                         if (PyErr_Occurred() != NULL) {
   14437           0 :                                 return -1;
   14438             :                         }
   14439           0 :                         if (test_var > uint_max) {
   14440           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   14441             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14442           0 :                                 return -1;
   14443             :                         }
   14444           0 :                         object->current_cipher_set_time = test_var;
   14445             :                 } else {
   14446           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   14447             :                           PyLong_Type.tp_name);
   14448           0 :                         return -1;
   14449             :                 }
   14450             :         }
   14451           0 :         return 0;
   14452             : }
   14453             : 
   14454           0 : static PyObject *py_netr_DELTA_SECRET_get_old_cipher(PyObject *obj, void *closure)
   14455             : {
   14456           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14457             :         PyObject *py_old_cipher;
   14458           0 :         py_old_cipher = pytalloc_reference_ex(&netr_CIPHER_VALUE_Type, pytalloc_get_mem_ctx(obj), &object->old_cipher);
   14459           0 :         return py_old_cipher;
   14460             : }
   14461             : 
   14462           0 : static int py_netr_DELTA_SECRET_set_old_cipher(PyObject *py_obj, PyObject *value, void *closure)
   14463             : {
   14464           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14465           0 :         if (value == NULL) {
   14466           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->old_cipher");
   14467           0 :                 return -1;
   14468             :         }
   14469           0 :         PY_CHECK_TYPE(&netr_CIPHER_VALUE_Type, value, return -1;);
   14470           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14471           0 :                 PyErr_NoMemory();
   14472           0 :                 return -1;
   14473             :         }
   14474           0 :         object->old_cipher = *(struct netr_CIPHER_VALUE *)pytalloc_get_ptr(value);
   14475           0 :         return 0;
   14476             : }
   14477             : 
   14478           0 : static PyObject *py_netr_DELTA_SECRET_get_old_cipher_set_time(PyObject *obj, void *closure)
   14479             : {
   14480           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14481             :         PyObject *py_old_cipher_set_time;
   14482           0 :         py_old_cipher_set_time = PyLong_FromUnsignedLongLong(object->old_cipher_set_time);
   14483           0 :         return py_old_cipher_set_time;
   14484             : }
   14485             : 
   14486           0 : static int py_netr_DELTA_SECRET_set_old_cipher_set_time(PyObject *py_obj, PyObject *value, void *closure)
   14487             : {
   14488           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14489           0 :         if (value == NULL) {
   14490           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->old_cipher_set_time");
   14491           0 :                 return -1;
   14492             :         }
   14493             :         {
   14494           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->old_cipher_set_time));
   14495           0 :                 if (PyLong_Check(value)) {
   14496             :                         unsigned long long test_var;
   14497           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14498           0 :                         if (PyErr_Occurred() != NULL) {
   14499           0 :                                 return -1;
   14500             :                         }
   14501           0 :                         if (test_var > uint_max) {
   14502           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   14503             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14504           0 :                                 return -1;
   14505             :                         }
   14506           0 :                         object->old_cipher_set_time = test_var;
   14507             :                 } else {
   14508           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   14509             :                           PyLong_Type.tp_name);
   14510           0 :                         return -1;
   14511             :                 }
   14512             :         }
   14513           0 :         return 0;
   14514             : }
   14515             : 
   14516           0 : static PyObject *py_netr_DELTA_SECRET_get_SecurityInformation(PyObject *obj, void *closure)
   14517             : {
   14518           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14519             :         PyObject *py_SecurityInformation;
   14520           0 :         py_SecurityInformation = PyLong_FromUnsignedLongLong((uint32_t)object->SecurityInformation);
   14521           0 :         return py_SecurityInformation;
   14522             : }
   14523             : 
   14524           0 : static int py_netr_DELTA_SECRET_set_SecurityInformation(PyObject *py_obj, PyObject *value, void *closure)
   14525             : {
   14526           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14527           0 :         if (value == NULL) {
   14528           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SecurityInformation");
   14529           0 :                 return -1;
   14530             :         }
   14531             :         {
   14532           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SecurityInformation));
   14533           0 :                 if (PyLong_Check(value)) {
   14534             :                         unsigned long long test_var;
   14535           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14536           0 :                         if (PyErr_Occurred() != NULL) {
   14537           0 :                                 return -1;
   14538             :                         }
   14539           0 :                         if (test_var > uint_max) {
   14540           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   14541             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14542           0 :                                 return -1;
   14543             :                         }
   14544           0 :                         object->SecurityInformation = test_var;
   14545             :                 } else {
   14546           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   14547             :                           PyLong_Type.tp_name);
   14548           0 :                         return -1;
   14549             :                 }
   14550             :         }
   14551           0 :         return 0;
   14552             : }
   14553             : 
   14554           0 : static PyObject *py_netr_DELTA_SECRET_get_sdbuf(PyObject *obj, void *closure)
   14555             : {
   14556           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14557             :         PyObject *py_sdbuf;
   14558           0 :         py_sdbuf = pytalloc_reference_ex(sec_desc_buf_Type, pytalloc_get_mem_ctx(obj), &object->sdbuf);
   14559           0 :         return py_sdbuf;
   14560             : }
   14561             : 
   14562           0 : static int py_netr_DELTA_SECRET_set_sdbuf(PyObject *py_obj, PyObject *value, void *closure)
   14563             : {
   14564           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14565           0 :         if (value == NULL) {
   14566           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sdbuf");
   14567           0 :                 return -1;
   14568             :         }
   14569           0 :         PY_CHECK_TYPE(sec_desc_buf_Type, value, return -1;);
   14570           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14571           0 :                 PyErr_NoMemory();
   14572           0 :                 return -1;
   14573             :         }
   14574           0 :         object->sdbuf = *(struct sec_desc_buf *)pytalloc_get_ptr(value);
   14575           0 :         return 0;
   14576             : }
   14577             : 
   14578           0 : static PyObject *py_netr_DELTA_SECRET_get_unknown1(PyObject *obj, void *closure)
   14579             : {
   14580           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14581             :         PyObject *py_unknown1;
   14582           0 :         py_unknown1 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown1);
   14583           0 :         return py_unknown1;
   14584             : }
   14585             : 
   14586           0 : static int py_netr_DELTA_SECRET_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   14587             : {
   14588           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14589           0 :         if (value == NULL) {
   14590           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
   14591           0 :                 return -1;
   14592             :         }
   14593           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   14594           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14595           0 :                 PyErr_NoMemory();
   14596           0 :                 return -1;
   14597             :         }
   14598           0 :         object->unknown1 = *(struct lsa_String *)pytalloc_get_ptr(value);
   14599           0 :         return 0;
   14600             : }
   14601             : 
   14602           0 : static PyObject *py_netr_DELTA_SECRET_get_unknown2(PyObject *obj, void *closure)
   14603             : {
   14604           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14605             :         PyObject *py_unknown2;
   14606           0 :         py_unknown2 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown2);
   14607           0 :         return py_unknown2;
   14608             : }
   14609             : 
   14610           0 : static int py_netr_DELTA_SECRET_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   14611             : {
   14612           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14613           0 :         if (value == NULL) {
   14614           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
   14615           0 :                 return -1;
   14616             :         }
   14617           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   14618           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14619           0 :                 PyErr_NoMemory();
   14620           0 :                 return -1;
   14621             :         }
   14622           0 :         object->unknown2 = *(struct lsa_String *)pytalloc_get_ptr(value);
   14623           0 :         return 0;
   14624             : }
   14625             : 
   14626           0 : static PyObject *py_netr_DELTA_SECRET_get_unknown3(PyObject *obj, void *closure)
   14627             : {
   14628           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14629             :         PyObject *py_unknown3;
   14630           0 :         py_unknown3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown3);
   14631           0 :         return py_unknown3;
   14632             : }
   14633             : 
   14634           0 : static int py_netr_DELTA_SECRET_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   14635             : {
   14636           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14637           0 :         if (value == NULL) {
   14638           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
   14639           0 :                 return -1;
   14640             :         }
   14641           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   14642           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14643           0 :                 PyErr_NoMemory();
   14644           0 :                 return -1;
   14645             :         }
   14646           0 :         object->unknown3 = *(struct lsa_String *)pytalloc_get_ptr(value);
   14647           0 :         return 0;
   14648             : }
   14649             : 
   14650           0 : static PyObject *py_netr_DELTA_SECRET_get_unknown4(PyObject *obj, void *closure)
   14651             : {
   14652           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14653             :         PyObject *py_unknown4;
   14654           0 :         py_unknown4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->unknown4);
   14655           0 :         return py_unknown4;
   14656             : }
   14657             : 
   14658           0 : static int py_netr_DELTA_SECRET_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   14659             : {
   14660           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14661           0 :         if (value == NULL) {
   14662           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
   14663           0 :                 return -1;
   14664             :         }
   14665           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   14666           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14667           0 :                 PyErr_NoMemory();
   14668           0 :                 return -1;
   14669             :         }
   14670           0 :         object->unknown4 = *(struct lsa_String *)pytalloc_get_ptr(value);
   14671           0 :         return 0;
   14672             : }
   14673             : 
   14674           0 : static PyObject *py_netr_DELTA_SECRET_get_unknown5(PyObject *obj, void *closure)
   14675             : {
   14676           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14677             :         PyObject *py_unknown5;
   14678           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown5);
   14679           0 :         return py_unknown5;
   14680             : }
   14681             : 
   14682           0 : static int py_netr_DELTA_SECRET_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
   14683             : {
   14684           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14685           0 :         if (value == NULL) {
   14686           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown5");
   14687           0 :                 return -1;
   14688             :         }
   14689             :         {
   14690           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
   14691           0 :                 if (PyLong_Check(value)) {
   14692             :                         unsigned long long test_var;
   14693           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14694           0 :                         if (PyErr_Occurred() != NULL) {
   14695           0 :                                 return -1;
   14696             :                         }
   14697           0 :                         if (test_var > uint_max) {
   14698           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   14699             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14700           0 :                                 return -1;
   14701             :                         }
   14702           0 :                         object->unknown5 = test_var;
   14703             :                 } else {
   14704           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   14705             :                           PyLong_Type.tp_name);
   14706           0 :                         return -1;
   14707             :                 }
   14708             :         }
   14709           0 :         return 0;
   14710             : }
   14711             : 
   14712           0 : static PyObject *py_netr_DELTA_SECRET_get_unknown6(PyObject *obj, void *closure)
   14713             : {
   14714           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14715             :         PyObject *py_unknown6;
   14716           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown6);
   14717           0 :         return py_unknown6;
   14718             : }
   14719             : 
   14720           0 : static int py_netr_DELTA_SECRET_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
   14721             : {
   14722           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14723           0 :         if (value == NULL) {
   14724           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown6");
   14725           0 :                 return -1;
   14726             :         }
   14727             :         {
   14728           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
   14729           0 :                 if (PyLong_Check(value)) {
   14730             :                         unsigned long long test_var;
   14731           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14732           0 :                         if (PyErr_Occurred() != NULL) {
   14733           0 :                                 return -1;
   14734             :                         }
   14735           0 :                         if (test_var > uint_max) {
   14736           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   14737             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14738           0 :                                 return -1;
   14739             :                         }
   14740           0 :                         object->unknown6 = test_var;
   14741             :                 } else {
   14742           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   14743             :                           PyLong_Type.tp_name);
   14744           0 :                         return -1;
   14745             :                 }
   14746             :         }
   14747           0 :         return 0;
   14748             : }
   14749             : 
   14750           0 : static PyObject *py_netr_DELTA_SECRET_get_unknown7(PyObject *obj, void *closure)
   14751             : {
   14752           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14753             :         PyObject *py_unknown7;
   14754           0 :         py_unknown7 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown7);
   14755           0 :         return py_unknown7;
   14756             : }
   14757             : 
   14758           0 : static int py_netr_DELTA_SECRET_set_unknown7(PyObject *py_obj, PyObject *value, void *closure)
   14759             : {
   14760           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14761           0 :         if (value == NULL) {
   14762           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown7");
   14763           0 :                 return -1;
   14764             :         }
   14765             :         {
   14766           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown7));
   14767           0 :                 if (PyLong_Check(value)) {
   14768             :                         unsigned long long test_var;
   14769           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14770           0 :                         if (PyErr_Occurred() != NULL) {
   14771           0 :                                 return -1;
   14772             :                         }
   14773           0 :                         if (test_var > uint_max) {
   14774           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   14775             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14776           0 :                                 return -1;
   14777             :                         }
   14778           0 :                         object->unknown7 = test_var;
   14779             :                 } else {
   14780           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   14781             :                           PyLong_Type.tp_name);
   14782           0 :                         return -1;
   14783             :                 }
   14784             :         }
   14785           0 :         return 0;
   14786             : }
   14787             : 
   14788           0 : static PyObject *py_netr_DELTA_SECRET_get_unknown8(PyObject *obj, void *closure)
   14789             : {
   14790           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(obj);
   14791             :         PyObject *py_unknown8;
   14792           0 :         py_unknown8 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown8);
   14793           0 :         return py_unknown8;
   14794             : }
   14795             : 
   14796           0 : static int py_netr_DELTA_SECRET_set_unknown8(PyObject *py_obj, PyObject *value, void *closure)
   14797             : {
   14798           0 :         struct netr_DELTA_SECRET *object = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(py_obj);
   14799           0 :         if (value == NULL) {
   14800           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown8");
   14801           0 :                 return -1;
   14802             :         }
   14803             :         {
   14804           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown8));
   14805           0 :                 if (PyLong_Check(value)) {
   14806             :                         unsigned long long test_var;
   14807           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14808           0 :                         if (PyErr_Occurred() != NULL) {
   14809           0 :                                 return -1;
   14810             :                         }
   14811           0 :                         if (test_var > uint_max) {
   14812           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   14813             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14814           0 :                                 return -1;
   14815             :                         }
   14816           0 :                         object->unknown8 = test_var;
   14817             :                 } else {
   14818           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   14819             :                           PyLong_Type.tp_name);
   14820           0 :                         return -1;
   14821             :                 }
   14822             :         }
   14823           0 :         return 0;
   14824             : }
   14825             : 
   14826             : static PyGetSetDef py_netr_DELTA_SECRET_getsetters[] = {
   14827             :         {
   14828             :                 .name = discard_const_p(char, "current_cipher"),
   14829             :                 .get = py_netr_DELTA_SECRET_get_current_cipher,
   14830             :                 .set = py_netr_DELTA_SECRET_set_current_cipher,
   14831             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CIPHER_VALUE")
   14832             :         },
   14833             :         {
   14834             :                 .name = discard_const_p(char, "current_cipher_set_time"),
   14835             :                 .get = py_netr_DELTA_SECRET_get_current_cipher_set_time,
   14836             :                 .set = py_netr_DELTA_SECRET_set_current_cipher_set_time,
   14837             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   14838             :         },
   14839             :         {
   14840             :                 .name = discard_const_p(char, "old_cipher"),
   14841             :                 .get = py_netr_DELTA_SECRET_get_old_cipher,
   14842             :                 .set = py_netr_DELTA_SECRET_set_old_cipher,
   14843             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CIPHER_VALUE")
   14844             :         },
   14845             :         {
   14846             :                 .name = discard_const_p(char, "old_cipher_set_time"),
   14847             :                 .get = py_netr_DELTA_SECRET_get_old_cipher_set_time,
   14848             :                 .set = py_netr_DELTA_SECRET_set_old_cipher_set_time,
   14849             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   14850             :         },
   14851             :         {
   14852             :                 .name = discard_const_p(char, "SecurityInformation"),
   14853             :                 .get = py_netr_DELTA_SECRET_get_SecurityInformation,
   14854             :                 .set = py_netr_DELTA_SECRET_set_SecurityInformation,
   14855             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14856             :         },
   14857             :         {
   14858             :                 .name = discard_const_p(char, "sdbuf"),
   14859             :                 .get = py_netr_DELTA_SECRET_get_sdbuf,
   14860             :                 .set = py_netr_DELTA_SECRET_set_sdbuf,
   14861             :                 .doc = discard_const_p(char, "PIDL-generated element of base type sec_desc_buf")
   14862             :         },
   14863             :         {
   14864             :                 .name = discard_const_p(char, "unknown1"),
   14865             :                 .get = py_netr_DELTA_SECRET_get_unknown1,
   14866             :                 .set = py_netr_DELTA_SECRET_set_unknown1,
   14867             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   14868             :         },
   14869             :         {
   14870             :                 .name = discard_const_p(char, "unknown2"),
   14871             :                 .get = py_netr_DELTA_SECRET_get_unknown2,
   14872             :                 .set = py_netr_DELTA_SECRET_set_unknown2,
   14873             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   14874             :         },
   14875             :         {
   14876             :                 .name = discard_const_p(char, "unknown3"),
   14877             :                 .get = py_netr_DELTA_SECRET_get_unknown3,
   14878             :                 .set = py_netr_DELTA_SECRET_set_unknown3,
   14879             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   14880             :         },
   14881             :         {
   14882             :                 .name = discard_const_p(char, "unknown4"),
   14883             :                 .get = py_netr_DELTA_SECRET_get_unknown4,
   14884             :                 .set = py_netr_DELTA_SECRET_set_unknown4,
   14885             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   14886             :         },
   14887             :         {
   14888             :                 .name = discard_const_p(char, "unknown5"),
   14889             :                 .get = py_netr_DELTA_SECRET_get_unknown5,
   14890             :                 .set = py_netr_DELTA_SECRET_set_unknown5,
   14891             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14892             :         },
   14893             :         {
   14894             :                 .name = discard_const_p(char, "unknown6"),
   14895             :                 .get = py_netr_DELTA_SECRET_get_unknown6,
   14896             :                 .set = py_netr_DELTA_SECRET_set_unknown6,
   14897             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14898             :         },
   14899             :         {
   14900             :                 .name = discard_const_p(char, "unknown7"),
   14901             :                 .get = py_netr_DELTA_SECRET_get_unknown7,
   14902             :                 .set = py_netr_DELTA_SECRET_set_unknown7,
   14903             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14904             :         },
   14905             :         {
   14906             :                 .name = discard_const_p(char, "unknown8"),
   14907             :                 .get = py_netr_DELTA_SECRET_get_unknown8,
   14908             :                 .set = py_netr_DELTA_SECRET_set_unknown8,
   14909             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14910             :         },
   14911             :         { .name = NULL }
   14912             : };
   14913             : 
   14914           0 : static PyObject *py_netr_DELTA_SECRET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14915             : {
   14916           0 :         return pytalloc_new(struct netr_DELTA_SECRET, type);
   14917             : }
   14918             : 
   14919             : 
   14920             : static PyTypeObject netr_DELTA_SECRET_Type = {
   14921             :         PyVarObject_HEAD_INIT(NULL, 0)
   14922             :         .tp_name = "netlogon.netr_DELTA_SECRET",
   14923             :         .tp_getset = py_netr_DELTA_SECRET_getsetters,
   14924             :         .tp_methods = NULL,
   14925             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   14926             :         .tp_new = py_netr_DELTA_SECRET_new,
   14927             : };
   14928             : 
   14929           0 : static PyObject *py_import_netr_DELTA_UNION(TALLOC_CTX *mem_ctx, int level, union netr_DELTA_UNION *in)
   14930             : {
   14931             :         PyObject *ret;
   14932             : 
   14933           0 :         switch (level) {
   14934           0 :                 case NETR_DELTA_DOMAIN:
   14935           0 :                         if (in->domain == NULL) {
   14936           0 :                                 ret = Py_None;
   14937           0 :                                 Py_INCREF(ret);
   14938             :                         } else {
   14939           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_DOMAIN_Type, in->domain, in->domain);
   14940             :                         }
   14941           0 :                         return ret;
   14942             : 
   14943           0 :                 case NETR_DELTA_GROUP:
   14944           0 :                         if (in->group == NULL) {
   14945           0 :                                 ret = Py_None;
   14946           0 :                                 Py_INCREF(ret);
   14947             :                         } else {
   14948           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_GROUP_Type, in->group, in->group);
   14949             :                         }
   14950           0 :                         return ret;
   14951             : 
   14952           0 :                 case NETR_DELTA_DELETE_GROUP:
   14953           0 :                         ret = Py_None;
   14954           0 :                         Py_INCREF(ret);
   14955           0 :                         return ret;
   14956             : 
   14957           0 :                 case NETR_DELTA_RENAME_GROUP:
   14958           0 :                         if (in->rename_group == NULL) {
   14959           0 :                                 ret = Py_None;
   14960           0 :                                 Py_INCREF(ret);
   14961             :                         } else {
   14962           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_RENAME_Type, in->rename_group, in->rename_group);
   14963             :                         }
   14964           0 :                         return ret;
   14965             : 
   14966           0 :                 case NETR_DELTA_USER:
   14967           0 :                         if (in->user == NULL) {
   14968           0 :                                 ret = Py_None;
   14969           0 :                                 Py_INCREF(ret);
   14970             :                         } else {
   14971           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_USER_Type, in->user, in->user);
   14972             :                         }
   14973           0 :                         return ret;
   14974             : 
   14975           0 :                 case NETR_DELTA_DELETE_USER:
   14976           0 :                         ret = Py_None;
   14977           0 :                         Py_INCREF(ret);
   14978           0 :                         return ret;
   14979             : 
   14980           0 :                 case NETR_DELTA_RENAME_USER:
   14981           0 :                         if (in->rename_user == NULL) {
   14982           0 :                                 ret = Py_None;
   14983           0 :                                 Py_INCREF(ret);
   14984             :                         } else {
   14985           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_RENAME_Type, in->rename_user, in->rename_user);
   14986             :                         }
   14987           0 :                         return ret;
   14988             : 
   14989           0 :                 case NETR_DELTA_GROUP_MEMBER:
   14990           0 :                         if (in->group_member == NULL) {
   14991           0 :                                 ret = Py_None;
   14992           0 :                                 Py_INCREF(ret);
   14993             :                         } else {
   14994           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_GROUP_MEMBER_Type, in->group_member, in->group_member);
   14995             :                         }
   14996           0 :                         return ret;
   14997             : 
   14998           0 :                 case NETR_DELTA_ALIAS:
   14999           0 :                         if (in->alias == NULL) {
   15000           0 :                                 ret = Py_None;
   15001           0 :                                 Py_INCREF(ret);
   15002             :                         } else {
   15003           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_ALIAS_Type, in->alias, in->alias);
   15004             :                         }
   15005           0 :                         return ret;
   15006             : 
   15007           0 :                 case NETR_DELTA_DELETE_ALIAS:
   15008           0 :                         ret = Py_None;
   15009           0 :                         Py_INCREF(ret);
   15010           0 :                         return ret;
   15011             : 
   15012           0 :                 case NETR_DELTA_RENAME_ALIAS:
   15013           0 :                         if (in->rename_alias == NULL) {
   15014           0 :                                 ret = Py_None;
   15015           0 :                                 Py_INCREF(ret);
   15016             :                         } else {
   15017           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_RENAME_Type, in->rename_alias, in->rename_alias);
   15018             :                         }
   15019           0 :                         return ret;
   15020             : 
   15021           0 :                 case NETR_DELTA_ALIAS_MEMBER:
   15022           0 :                         if (in->alias_member == NULL) {
   15023           0 :                                 ret = Py_None;
   15024           0 :                                 Py_INCREF(ret);
   15025             :                         } else {
   15026           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_ALIAS_MEMBER_Type, in->alias_member, in->alias_member);
   15027             :                         }
   15028           0 :                         return ret;
   15029             : 
   15030           0 :                 case NETR_DELTA_POLICY:
   15031           0 :                         if (in->policy == NULL) {
   15032           0 :                                 ret = Py_None;
   15033           0 :                                 Py_INCREF(ret);
   15034             :                         } else {
   15035           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_POLICY_Type, in->policy, in->policy);
   15036             :                         }
   15037           0 :                         return ret;
   15038             : 
   15039           0 :                 case NETR_DELTA_TRUSTED_DOMAIN:
   15040           0 :                         if (in->trusted_domain == NULL) {
   15041           0 :                                 ret = Py_None;
   15042           0 :                                 Py_INCREF(ret);
   15043             :                         } else {
   15044           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_TRUSTED_DOMAIN_Type, in->trusted_domain, in->trusted_domain);
   15045             :                         }
   15046           0 :                         return ret;
   15047             : 
   15048           0 :                 case NETR_DELTA_DELETE_TRUST:
   15049           0 :                         ret = Py_None;
   15050           0 :                         Py_INCREF(ret);
   15051           0 :                         return ret;
   15052             : 
   15053           0 :                 case NETR_DELTA_ACCOUNT:
   15054           0 :                         if (in->account == NULL) {
   15055           0 :                                 ret = Py_None;
   15056           0 :                                 Py_INCREF(ret);
   15057             :                         } else {
   15058           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_ACCOUNT_Type, in->account, in->account);
   15059             :                         }
   15060           0 :                         return ret;
   15061             : 
   15062           0 :                 case NETR_DELTA_DELETE_ACCOUNT:
   15063           0 :                         ret = Py_None;
   15064           0 :                         Py_INCREF(ret);
   15065           0 :                         return ret;
   15066             : 
   15067           0 :                 case NETR_DELTA_SECRET:
   15068           0 :                         if (in->secret == NULL) {
   15069           0 :                                 ret = Py_None;
   15070           0 :                                 Py_INCREF(ret);
   15071             :                         } else {
   15072           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_SECRET_Type, in->secret, in->secret);
   15073             :                         }
   15074           0 :                         return ret;
   15075             : 
   15076           0 :                 case NETR_DELTA_DELETE_SECRET:
   15077           0 :                         ret = Py_None;
   15078           0 :                         Py_INCREF(ret);
   15079           0 :                         return ret;
   15080             : 
   15081           0 :                 case NETR_DELTA_DELETE_GROUP2:
   15082           0 :                         if (in->delete_group == NULL) {
   15083           0 :                                 ret = Py_None;
   15084           0 :                                 Py_INCREF(ret);
   15085             :                         } else {
   15086           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_DELETE_USER_Type, in->delete_group, in->delete_group);
   15087             :                         }
   15088           0 :                         return ret;
   15089             : 
   15090           0 :                 case NETR_DELTA_DELETE_USER2:
   15091           0 :                         if (in->delete_user == NULL) {
   15092           0 :                                 ret = Py_None;
   15093           0 :                                 Py_INCREF(ret);
   15094             :                         } else {
   15095           0 :                                 ret = pytalloc_reference_ex(&netr_DELTA_DELETE_USER_Type, in->delete_user, in->delete_user);
   15096             :                         }
   15097           0 :                         return ret;
   15098             : 
   15099           0 :                 case NETR_DELTA_MODIFY_COUNT:
   15100           0 :                         if (in->modified_count == NULL) {
   15101           0 :                                 ret = Py_None;
   15102           0 :                                 Py_INCREF(ret);
   15103             :                         } else {
   15104           0 :                                 ret = PyLong_FromUnsignedLongLong(*in->modified_count);
   15105             :                         }
   15106           0 :                         return ret;
   15107             : 
   15108           0 :                 default:
   15109           0 :                         ret = Py_None;
   15110           0 :                         Py_INCREF(ret);
   15111           0 :                         return ret;
   15112             : 
   15113             :         }
   15114             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   15115             :         return NULL;
   15116             : }
   15117             : 
   15118           0 : static union netr_DELTA_UNION *py_export_netr_DELTA_UNION(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   15119             : {
   15120           0 :         union netr_DELTA_UNION *ret = talloc_zero(mem_ctx, union netr_DELTA_UNION);
   15121           0 :         switch (level) {
   15122           0 :                 case NETR_DELTA_DOMAIN:
   15123           0 :                         if (in == NULL) {
   15124           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->domain");
   15125           0 :                                 talloc_free(ret); return NULL;
   15126             :                         }
   15127           0 :                         if (in == Py_None) {
   15128           0 :                                 ret->domain = NULL;
   15129             :                         } else {
   15130           0 :                                 ret->domain = NULL;
   15131           0 :                                 PY_CHECK_TYPE(&netr_DELTA_DOMAIN_Type, in, talloc_free(ret); return NULL;);
   15132           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15133           0 :                                         PyErr_NoMemory();
   15134           0 :                                         talloc_free(ret); return NULL;
   15135             :                                 }
   15136           0 :                                 ret->domain = (struct netr_DELTA_DOMAIN *)pytalloc_get_ptr(in);
   15137             :                         }
   15138           0 :                         break;
   15139             : 
   15140           0 :                 case NETR_DELTA_GROUP:
   15141           0 :                         if (in == NULL) {
   15142           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->group");
   15143           0 :                                 talloc_free(ret); return NULL;
   15144             :                         }
   15145           0 :                         if (in == Py_None) {
   15146           0 :                                 ret->group = NULL;
   15147             :                         } else {
   15148           0 :                                 ret->group = NULL;
   15149           0 :                                 PY_CHECK_TYPE(&netr_DELTA_GROUP_Type, in, talloc_free(ret); return NULL;);
   15150           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15151           0 :                                         PyErr_NoMemory();
   15152           0 :                                         talloc_free(ret); return NULL;
   15153             :                                 }
   15154           0 :                                 ret->group = (struct netr_DELTA_GROUP *)pytalloc_get_ptr(in);
   15155             :                         }
   15156           0 :                         break;
   15157             : 
   15158           0 :                 case NETR_DELTA_DELETE_GROUP:
   15159           0 :                         break;
   15160             : 
   15161           0 :                 case NETR_DELTA_RENAME_GROUP:
   15162           0 :                         if (in == NULL) {
   15163           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rename_group");
   15164           0 :                                 talloc_free(ret); return NULL;
   15165             :                         }
   15166           0 :                         if (in == Py_None) {
   15167           0 :                                 ret->rename_group = NULL;
   15168             :                         } else {
   15169           0 :                                 ret->rename_group = NULL;
   15170           0 :                                 PY_CHECK_TYPE(&netr_DELTA_RENAME_Type, in, talloc_free(ret); return NULL;);
   15171           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15172           0 :                                         PyErr_NoMemory();
   15173           0 :                                         talloc_free(ret); return NULL;
   15174             :                                 }
   15175           0 :                                 ret->rename_group = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(in);
   15176             :                         }
   15177           0 :                         break;
   15178             : 
   15179           0 :                 case NETR_DELTA_USER:
   15180           0 :                         if (in == NULL) {
   15181           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->user");
   15182           0 :                                 talloc_free(ret); return NULL;
   15183             :                         }
   15184           0 :                         if (in == Py_None) {
   15185           0 :                                 ret->user = NULL;
   15186             :                         } else {
   15187           0 :                                 ret->user = NULL;
   15188           0 :                                 PY_CHECK_TYPE(&netr_DELTA_USER_Type, in, talloc_free(ret); return NULL;);
   15189           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15190           0 :                                         PyErr_NoMemory();
   15191           0 :                                         talloc_free(ret); return NULL;
   15192             :                                 }
   15193           0 :                                 ret->user = (struct netr_DELTA_USER *)pytalloc_get_ptr(in);
   15194             :                         }
   15195           0 :                         break;
   15196             : 
   15197           0 :                 case NETR_DELTA_DELETE_USER:
   15198           0 :                         break;
   15199             : 
   15200           0 :                 case NETR_DELTA_RENAME_USER:
   15201           0 :                         if (in == NULL) {
   15202           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rename_user");
   15203           0 :                                 talloc_free(ret); return NULL;
   15204             :                         }
   15205           0 :                         if (in == Py_None) {
   15206           0 :                                 ret->rename_user = NULL;
   15207             :                         } else {
   15208           0 :                                 ret->rename_user = NULL;
   15209           0 :                                 PY_CHECK_TYPE(&netr_DELTA_RENAME_Type, in, talloc_free(ret); return NULL;);
   15210           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15211           0 :                                         PyErr_NoMemory();
   15212           0 :                                         talloc_free(ret); return NULL;
   15213             :                                 }
   15214           0 :                                 ret->rename_user = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(in);
   15215             :                         }
   15216           0 :                         break;
   15217             : 
   15218           0 :                 case NETR_DELTA_GROUP_MEMBER:
   15219           0 :                         if (in == NULL) {
   15220           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->group_member");
   15221           0 :                                 talloc_free(ret); return NULL;
   15222             :                         }
   15223           0 :                         if (in == Py_None) {
   15224           0 :                                 ret->group_member = NULL;
   15225             :                         } else {
   15226           0 :                                 ret->group_member = NULL;
   15227           0 :                                 PY_CHECK_TYPE(&netr_DELTA_GROUP_MEMBER_Type, in, talloc_free(ret); return NULL;);
   15228           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15229           0 :                                         PyErr_NoMemory();
   15230           0 :                                         talloc_free(ret); return NULL;
   15231             :                                 }
   15232           0 :                                 ret->group_member = (struct netr_DELTA_GROUP_MEMBER *)pytalloc_get_ptr(in);
   15233             :                         }
   15234           0 :                         break;
   15235             : 
   15236           0 :                 case NETR_DELTA_ALIAS:
   15237           0 :                         if (in == NULL) {
   15238           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->alias");
   15239           0 :                                 talloc_free(ret); return NULL;
   15240             :                         }
   15241           0 :                         if (in == Py_None) {
   15242           0 :                                 ret->alias = NULL;
   15243             :                         } else {
   15244           0 :                                 ret->alias = NULL;
   15245           0 :                                 PY_CHECK_TYPE(&netr_DELTA_ALIAS_Type, in, talloc_free(ret); return NULL;);
   15246           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15247           0 :                                         PyErr_NoMemory();
   15248           0 :                                         talloc_free(ret); return NULL;
   15249             :                                 }
   15250           0 :                                 ret->alias = (struct netr_DELTA_ALIAS *)pytalloc_get_ptr(in);
   15251             :                         }
   15252           0 :                         break;
   15253             : 
   15254           0 :                 case NETR_DELTA_DELETE_ALIAS:
   15255           0 :                         break;
   15256             : 
   15257           0 :                 case NETR_DELTA_RENAME_ALIAS:
   15258           0 :                         if (in == NULL) {
   15259           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rename_alias");
   15260           0 :                                 talloc_free(ret); return NULL;
   15261             :                         }
   15262           0 :                         if (in == Py_None) {
   15263           0 :                                 ret->rename_alias = NULL;
   15264             :                         } else {
   15265           0 :                                 ret->rename_alias = NULL;
   15266           0 :                                 PY_CHECK_TYPE(&netr_DELTA_RENAME_Type, in, talloc_free(ret); return NULL;);
   15267           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15268           0 :                                         PyErr_NoMemory();
   15269           0 :                                         talloc_free(ret); return NULL;
   15270             :                                 }
   15271           0 :                                 ret->rename_alias = (struct netr_DELTA_RENAME *)pytalloc_get_ptr(in);
   15272             :                         }
   15273           0 :                         break;
   15274             : 
   15275           0 :                 case NETR_DELTA_ALIAS_MEMBER:
   15276           0 :                         if (in == NULL) {
   15277           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->alias_member");
   15278           0 :                                 talloc_free(ret); return NULL;
   15279             :                         }
   15280           0 :                         if (in == Py_None) {
   15281           0 :                                 ret->alias_member = NULL;
   15282             :                         } else {
   15283           0 :                                 ret->alias_member = NULL;
   15284           0 :                                 PY_CHECK_TYPE(&netr_DELTA_ALIAS_MEMBER_Type, in, talloc_free(ret); return NULL;);
   15285           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15286           0 :                                         PyErr_NoMemory();
   15287           0 :                                         talloc_free(ret); return NULL;
   15288             :                                 }
   15289           0 :                                 ret->alias_member = (struct netr_DELTA_ALIAS_MEMBER *)pytalloc_get_ptr(in);
   15290             :                         }
   15291           0 :                         break;
   15292             : 
   15293           0 :                 case NETR_DELTA_POLICY:
   15294           0 :                         if (in == NULL) {
   15295           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->policy");
   15296           0 :                                 talloc_free(ret); return NULL;
   15297             :                         }
   15298           0 :                         if (in == Py_None) {
   15299           0 :                                 ret->policy = NULL;
   15300             :                         } else {
   15301           0 :                                 ret->policy = NULL;
   15302           0 :                                 PY_CHECK_TYPE(&netr_DELTA_POLICY_Type, in, talloc_free(ret); return NULL;);
   15303           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15304           0 :                                         PyErr_NoMemory();
   15305           0 :                                         talloc_free(ret); return NULL;
   15306             :                                 }
   15307           0 :                                 ret->policy = (struct netr_DELTA_POLICY *)pytalloc_get_ptr(in);
   15308             :                         }
   15309           0 :                         break;
   15310             : 
   15311           0 :                 case NETR_DELTA_TRUSTED_DOMAIN:
   15312           0 :                         if (in == NULL) {
   15313           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->trusted_domain");
   15314           0 :                                 talloc_free(ret); return NULL;
   15315             :                         }
   15316           0 :                         if (in == Py_None) {
   15317           0 :                                 ret->trusted_domain = NULL;
   15318             :                         } else {
   15319           0 :                                 ret->trusted_domain = NULL;
   15320           0 :                                 PY_CHECK_TYPE(&netr_DELTA_TRUSTED_DOMAIN_Type, in, talloc_free(ret); return NULL;);
   15321           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15322           0 :                                         PyErr_NoMemory();
   15323           0 :                                         talloc_free(ret); return NULL;
   15324             :                                 }
   15325           0 :                                 ret->trusted_domain = (struct netr_DELTA_TRUSTED_DOMAIN *)pytalloc_get_ptr(in);
   15326             :                         }
   15327           0 :                         break;
   15328             : 
   15329           0 :                 case NETR_DELTA_DELETE_TRUST:
   15330           0 :                         break;
   15331             : 
   15332           0 :                 case NETR_DELTA_ACCOUNT:
   15333           0 :                         if (in == NULL) {
   15334           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->account");
   15335           0 :                                 talloc_free(ret); return NULL;
   15336             :                         }
   15337           0 :                         if (in == Py_None) {
   15338           0 :                                 ret->account = NULL;
   15339             :                         } else {
   15340           0 :                                 ret->account = NULL;
   15341           0 :                                 PY_CHECK_TYPE(&netr_DELTA_ACCOUNT_Type, in, talloc_free(ret); return NULL;);
   15342           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15343           0 :                                         PyErr_NoMemory();
   15344           0 :                                         talloc_free(ret); return NULL;
   15345             :                                 }
   15346           0 :                                 ret->account = (struct netr_DELTA_ACCOUNT *)pytalloc_get_ptr(in);
   15347             :                         }
   15348           0 :                         break;
   15349             : 
   15350           0 :                 case NETR_DELTA_DELETE_ACCOUNT:
   15351           0 :                         break;
   15352             : 
   15353           0 :                 case NETR_DELTA_SECRET:
   15354           0 :                         if (in == NULL) {
   15355           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->secret");
   15356           0 :                                 talloc_free(ret); return NULL;
   15357             :                         }
   15358           0 :                         if (in == Py_None) {
   15359           0 :                                 ret->secret = NULL;
   15360             :                         } else {
   15361           0 :                                 ret->secret = NULL;
   15362           0 :                                 PY_CHECK_TYPE(&netr_DELTA_SECRET_Type, in, talloc_free(ret); return NULL;);
   15363           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15364           0 :                                         PyErr_NoMemory();
   15365           0 :                                         talloc_free(ret); return NULL;
   15366             :                                 }
   15367           0 :                                 ret->secret = (struct netr_DELTA_SECRET *)pytalloc_get_ptr(in);
   15368             :                         }
   15369           0 :                         break;
   15370             : 
   15371           0 :                 case NETR_DELTA_DELETE_SECRET:
   15372           0 :                         break;
   15373             : 
   15374           0 :                 case NETR_DELTA_DELETE_GROUP2:
   15375           0 :                         if (in == NULL) {
   15376           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->delete_group");
   15377           0 :                                 talloc_free(ret); return NULL;
   15378             :                         }
   15379           0 :                         if (in == Py_None) {
   15380           0 :                                 ret->delete_group = NULL;
   15381             :                         } else {
   15382           0 :                                 ret->delete_group = NULL;
   15383           0 :                                 PY_CHECK_TYPE(&netr_DELTA_DELETE_USER_Type, in, talloc_free(ret); return NULL;);
   15384           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15385           0 :                                         PyErr_NoMemory();
   15386           0 :                                         talloc_free(ret); return NULL;
   15387             :                                 }
   15388           0 :                                 ret->delete_group = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(in);
   15389             :                         }
   15390           0 :                         break;
   15391             : 
   15392           0 :                 case NETR_DELTA_DELETE_USER2:
   15393           0 :                         if (in == NULL) {
   15394           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->delete_user");
   15395           0 :                                 talloc_free(ret); return NULL;
   15396             :                         }
   15397           0 :                         if (in == Py_None) {
   15398           0 :                                 ret->delete_user = NULL;
   15399             :                         } else {
   15400           0 :                                 ret->delete_user = NULL;
   15401           0 :                                 PY_CHECK_TYPE(&netr_DELTA_DELETE_USER_Type, in, talloc_free(ret); return NULL;);
   15402           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15403           0 :                                         PyErr_NoMemory();
   15404           0 :                                         talloc_free(ret); return NULL;
   15405             :                                 }
   15406           0 :                                 ret->delete_user = (struct netr_DELTA_DELETE_USER *)pytalloc_get_ptr(in);
   15407             :                         }
   15408           0 :                         break;
   15409             : 
   15410           0 :                 case NETR_DELTA_MODIFY_COUNT:
   15411           0 :                         if (in == NULL) {
   15412           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->modified_count");
   15413           0 :                                 talloc_free(ret); return NULL;
   15414             :                         }
   15415           0 :                         if (in == Py_None) {
   15416           0 :                                 ret->modified_count = NULL;
   15417             :                         } else {
   15418           0 :                                 ret->modified_count = talloc_ptrtype(mem_ctx, ret->modified_count);
   15419           0 :                                 if (ret->modified_count == NULL) {
   15420           0 :                                         PyErr_NoMemory();
   15421           0 :                                         talloc_free(ret); return NULL;
   15422             :                                 }
   15423             :                                 {
   15424           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*ret->modified_count));
   15425           0 :                                         if (PyLong_Check(in)) {
   15426             :                                                 unsigned long long test_var;
   15427           0 :                                                 test_var = PyLong_AsUnsignedLongLong(in);
   15428           0 :                                                 if (PyErr_Occurred() != NULL) {
   15429           0 :                                                         talloc_free(ret); return NULL;
   15430             :                                                 }
   15431           0 :                                                 if (test_var > uint_max) {
   15432           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   15433             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   15434           0 :                                                         talloc_free(ret); return NULL;
   15435             :                                                 }
   15436           0 :                                                 *ret->modified_count = test_var;
   15437             :                                         } else {
   15438           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",\
   15439             :                                                   PyLong_Type.tp_name);
   15440           0 :                                                 talloc_free(ret); return NULL;
   15441             :                                         }
   15442             :                                 }
   15443             :                         }
   15444           0 :                         break;
   15445             : 
   15446           0 :                 default:
   15447           0 :                         break;
   15448             : 
   15449             :         }
   15450             : 
   15451           0 :         return ret;
   15452             : }
   15453             : 
   15454           0 : static PyObject *py_netr_DELTA_UNION_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15455             : {
   15456           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   15457           0 :         PyObject *mem_ctx_obj = NULL;
   15458           0 :         TALLOC_CTX *mem_ctx = NULL;
   15459           0 :         int level = 0;
   15460           0 :         PyObject *in_obj = NULL;
   15461           0 :         union netr_DELTA_UNION *in = NULL;
   15462             : 
   15463           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   15464             :                 discard_const_p(char *, kwnames),
   15465             :                 &mem_ctx_obj,
   15466             :                 &level,
   15467             :                 &in_obj)) {
   15468           0 :                 return NULL;
   15469             :         }
   15470           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   15471           0 :         if (mem_ctx == NULL) {
   15472           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   15473           0 :                 return NULL;
   15474             :         }
   15475           0 :         in = (union netr_DELTA_UNION *)pytalloc_get_ptr(in_obj);
   15476           0 :         if (in == NULL) {
   15477           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_DELTA_UNION!");
   15478           0 :                 return NULL;
   15479             :         }
   15480             : 
   15481           0 :         return py_import_netr_DELTA_UNION(mem_ctx, level, in);
   15482             : }
   15483             : 
   15484           0 : static PyObject *py_netr_DELTA_UNION_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15485             : {
   15486           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   15487           0 :         PyObject *mem_ctx_obj = NULL;
   15488           0 :         TALLOC_CTX *mem_ctx = NULL;
   15489           0 :         int level = 0;
   15490           0 :         PyObject *in = NULL;
   15491           0 :         union netr_DELTA_UNION *out = NULL;
   15492             : 
   15493           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   15494             :                 discard_const_p(char *, kwnames),
   15495             :                 &mem_ctx_obj,
   15496             :                 &level,
   15497             :                 &in)) {
   15498           0 :                 return NULL;
   15499             :         }
   15500           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   15501           0 :         if (mem_ctx == NULL) {
   15502           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   15503           0 :                 return NULL;
   15504             :         }
   15505             : 
   15506           0 :         out = py_export_netr_DELTA_UNION(mem_ctx, level, in);
   15507           0 :         if (out == NULL) {
   15508           0 :                 return NULL;
   15509             :         }
   15510             : 
   15511           0 :         return pytalloc_GenericObject_reference(out);
   15512             : }
   15513             : 
   15514             : static PyMethodDef py_netr_DELTA_UNION_methods[] = {
   15515             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DELTA_UNION_import),
   15516             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   15517             :                 "T.__import__(mem_ctx, level, in) => ret." },
   15518             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DELTA_UNION_export),
   15519             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   15520             :                 "T.__export__(mem_ctx, level, in) => ret." },
   15521             :         { NULL, NULL, 0, NULL }
   15522             : };
   15523             : 
   15524           0 : static PyObject *py_netr_DELTA_UNION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15525             : {
   15526           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   15527           0 :         return NULL;
   15528             : }
   15529             : 
   15530             : 
   15531             : static PyTypeObject netr_DELTA_UNION_Type = {
   15532             :         PyVarObject_HEAD_INIT(NULL, 0)
   15533             :         .tp_name = "netlogon.netr_DELTA_UNION",
   15534             :         .tp_getset = NULL,
   15535             :         .tp_methods = py_netr_DELTA_UNION_methods,
   15536             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   15537             :         .tp_new = py_netr_DELTA_UNION_new,
   15538             : };
   15539             : 
   15540           0 : static PyObject *py_import_netr_DELTA_ID_UNION(TALLOC_CTX *mem_ctx, int level, union netr_DELTA_ID_UNION *in)
   15541             : {
   15542             :         PyObject *ret;
   15543             : 
   15544           0 :         switch (level) {
   15545           0 :                 case NETR_DELTA_DOMAIN:
   15546           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15547           0 :                         return ret;
   15548             : 
   15549           0 :                 case NETR_DELTA_GROUP:
   15550           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15551           0 :                         return ret;
   15552             : 
   15553           0 :                 case NETR_DELTA_DELETE_GROUP:
   15554           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15555           0 :                         return ret;
   15556             : 
   15557           0 :                 case NETR_DELTA_RENAME_GROUP:
   15558           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15559           0 :                         return ret;
   15560             : 
   15561           0 :                 case NETR_DELTA_USER:
   15562           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15563           0 :                         return ret;
   15564             : 
   15565           0 :                 case NETR_DELTA_DELETE_USER:
   15566           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15567           0 :                         return ret;
   15568             : 
   15569           0 :                 case NETR_DELTA_RENAME_USER:
   15570           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15571           0 :                         return ret;
   15572             : 
   15573           0 :                 case NETR_DELTA_GROUP_MEMBER:
   15574           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15575           0 :                         return ret;
   15576             : 
   15577           0 :                 case NETR_DELTA_ALIAS:
   15578           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15579           0 :                         return ret;
   15580             : 
   15581           0 :                 case NETR_DELTA_DELETE_ALIAS:
   15582           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15583           0 :                         return ret;
   15584             : 
   15585           0 :                 case NETR_DELTA_RENAME_ALIAS:
   15586           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15587           0 :                         return ret;
   15588             : 
   15589           0 :                 case NETR_DELTA_ALIAS_MEMBER:
   15590           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15591           0 :                         return ret;
   15592             : 
   15593           0 :                 case NETR_DELTA_POLICY:
   15594           0 :                         if (in->sid == NULL) {
   15595           0 :                                 ret = Py_None;
   15596           0 :                                 Py_INCREF(ret);
   15597             :                         } else {
   15598           0 :                                 ret = pytalloc_reference_ex(dom_sid_Type, in->sid, in->sid);
   15599             :                         }
   15600           0 :                         return ret;
   15601             : 
   15602           0 :                 case NETR_DELTA_TRUSTED_DOMAIN:
   15603           0 :                         if (in->sid == NULL) {
   15604           0 :                                 ret = Py_None;
   15605           0 :                                 Py_INCREF(ret);
   15606             :                         } else {
   15607           0 :                                 ret = pytalloc_reference_ex(dom_sid_Type, in->sid, in->sid);
   15608             :                         }
   15609           0 :                         return ret;
   15610             : 
   15611           0 :                 case NETR_DELTA_DELETE_TRUST:
   15612           0 :                         if (in->sid == NULL) {
   15613           0 :                                 ret = Py_None;
   15614           0 :                                 Py_INCREF(ret);
   15615             :                         } else {
   15616           0 :                                 ret = pytalloc_reference_ex(dom_sid_Type, in->sid, in->sid);
   15617             :                         }
   15618           0 :                         return ret;
   15619             : 
   15620           0 :                 case NETR_DELTA_ACCOUNT:
   15621           0 :                         if (in->sid == NULL) {
   15622           0 :                                 ret = Py_None;
   15623           0 :                                 Py_INCREF(ret);
   15624             :                         } else {
   15625           0 :                                 ret = pytalloc_reference_ex(dom_sid_Type, in->sid, in->sid);
   15626             :                         }
   15627           0 :                         return ret;
   15628             : 
   15629           0 :                 case NETR_DELTA_DELETE_ACCOUNT:
   15630           0 :                         if (in->sid == NULL) {
   15631           0 :                                 ret = Py_None;
   15632           0 :                                 Py_INCREF(ret);
   15633             :                         } else {
   15634           0 :                                 ret = pytalloc_reference_ex(dom_sid_Type, in->sid, in->sid);
   15635             :                         }
   15636           0 :                         return ret;
   15637             : 
   15638           0 :                 case NETR_DELTA_SECRET:
   15639           0 :                         if (in->name == NULL) {
   15640           0 :                                 ret = Py_None;
   15641           0 :                                 Py_INCREF(ret);
   15642             :                         } else {
   15643           0 :                                 if (in->name == NULL) {
   15644           0 :                                         ret = Py_None;
   15645           0 :                                         Py_INCREF(ret);
   15646             :                                 } else {
   15647           0 :                                         ret = PyUnicode_Decode(in->name, strlen(in->name), "utf-8", "ignore");
   15648             :                                 }
   15649             :                         }
   15650           0 :                         return ret;
   15651             : 
   15652           0 :                 case NETR_DELTA_DELETE_SECRET:
   15653           0 :                         if (in->name == NULL) {
   15654           0 :                                 ret = Py_None;
   15655           0 :                                 Py_INCREF(ret);
   15656             :                         } else {
   15657           0 :                                 if (in->name == NULL) {
   15658           0 :                                         ret = Py_None;
   15659           0 :                                         Py_INCREF(ret);
   15660             :                                 } else {
   15661           0 :                                         ret = PyUnicode_Decode(in->name, strlen(in->name), "utf-8", "ignore");
   15662             :                                 }
   15663             :                         }
   15664           0 :                         return ret;
   15665             : 
   15666           0 :                 case NETR_DELTA_DELETE_GROUP2:
   15667           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15668           0 :                         return ret;
   15669             : 
   15670           0 :                 case NETR_DELTA_DELETE_USER2:
   15671           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->rid);
   15672           0 :                         return ret;
   15673             : 
   15674           0 :                 case NETR_DELTA_MODIFY_COUNT:
   15675           0 :                         ret = Py_None;
   15676           0 :                         Py_INCREF(ret);
   15677           0 :                         return ret;
   15678             : 
   15679           0 :                 default:
   15680           0 :                         ret = Py_None;
   15681           0 :                         Py_INCREF(ret);
   15682           0 :                         return ret;
   15683             : 
   15684             :         }
   15685             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   15686             :         return NULL;
   15687             : }
   15688             : 
   15689           0 : static union netr_DELTA_ID_UNION *py_export_netr_DELTA_ID_UNION(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   15690             : {
   15691           0 :         union netr_DELTA_ID_UNION *ret = talloc_zero(mem_ctx, union netr_DELTA_ID_UNION);
   15692           0 :         switch (level) {
   15693           0 :                 case NETR_DELTA_DOMAIN:
   15694           0 :                         if (in == NULL) {
   15695           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   15696           0 :                                 talloc_free(ret); return NULL;
   15697             :                         }
   15698             :                         {
   15699           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   15700           0 :                                 if (PyLong_Check(in)) {
   15701             :                                         unsigned long long test_var;
   15702           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   15703           0 :                                         if (PyErr_Occurred() != NULL) {
   15704           0 :                                                 talloc_free(ret); return NULL;
   15705             :                                         }
   15706           0 :                                         if (test_var > uint_max) {
   15707           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   15708             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   15709           0 :                                                 talloc_free(ret); return NULL;
   15710             :                                         }
   15711           0 :                                         ret->rid = test_var;
   15712             :                                 } else {
   15713           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   15714             :                                           PyLong_Type.tp_name);
   15715           0 :                                         talloc_free(ret); return NULL;
   15716             :                                 }
   15717             :                         }
   15718           0 :                         break;
   15719             : 
   15720           0 :                 case NETR_DELTA_GROUP:
   15721           0 :                         if (in == NULL) {
   15722           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   15723           0 :                                 talloc_free(ret); return NULL;
   15724             :                         }
   15725             :                         {
   15726           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   15727           0 :                                 if (PyLong_Check(in)) {
   15728             :                                         unsigned long long test_var;
   15729           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   15730           0 :                                         if (PyErr_Occurred() != NULL) {
   15731           0 :                                                 talloc_free(ret); return NULL;
   15732             :                                         }
   15733           0 :                                         if (test_var > uint_max) {
   15734           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   15735             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   15736           0 :                                                 talloc_free(ret); return NULL;
   15737             :                                         }
   15738           0 :                                         ret->rid = test_var;
   15739             :                                 } else {
   15740           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   15741             :                                           PyLong_Type.tp_name);
   15742           0 :                                         talloc_free(ret); return NULL;
   15743             :                                 }
   15744             :                         }
   15745           0 :                         break;
   15746             : 
   15747           0 :                 case NETR_DELTA_DELETE_GROUP:
   15748           0 :                         if (in == NULL) {
   15749           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   15750           0 :                                 talloc_free(ret); return NULL;
   15751             :                         }
   15752             :                         {
   15753           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   15754           0 :                                 if (PyLong_Check(in)) {
   15755             :                                         unsigned long long test_var;
   15756           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   15757           0 :                                         if (PyErr_Occurred() != NULL) {
   15758           0 :                                                 talloc_free(ret); return NULL;
   15759             :                                         }
   15760           0 :                                         if (test_var > uint_max) {
   15761           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   15762             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   15763           0 :                                                 talloc_free(ret); return NULL;
   15764             :                                         }
   15765           0 :                                         ret->rid = test_var;
   15766             :                                 } else {
   15767           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   15768             :                                           PyLong_Type.tp_name);
   15769           0 :                                         talloc_free(ret); return NULL;
   15770             :                                 }
   15771             :                         }
   15772           0 :                         break;
   15773             : 
   15774           0 :                 case NETR_DELTA_RENAME_GROUP:
   15775           0 :                         if (in == NULL) {
   15776           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   15777           0 :                                 talloc_free(ret); return NULL;
   15778             :                         }
   15779             :                         {
   15780           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   15781           0 :                                 if (PyLong_Check(in)) {
   15782             :                                         unsigned long long test_var;
   15783           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   15784           0 :                                         if (PyErr_Occurred() != NULL) {
   15785           0 :                                                 talloc_free(ret); return NULL;
   15786             :                                         }
   15787           0 :                                         if (test_var > uint_max) {
   15788           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   15789             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   15790           0 :                                                 talloc_free(ret); return NULL;
   15791             :                                         }
   15792           0 :                                         ret->rid = test_var;
   15793             :                                 } else {
   15794           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   15795             :                                           PyLong_Type.tp_name);
   15796           0 :                                         talloc_free(ret); return NULL;
   15797             :                                 }
   15798             :                         }
   15799           0 :                         break;
   15800             : 
   15801           0 :                 case NETR_DELTA_USER:
   15802           0 :                         if (in == NULL) {
   15803           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   15804           0 :                                 talloc_free(ret); return NULL;
   15805             :                         }
   15806             :                         {
   15807           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   15808           0 :                                 if (PyLong_Check(in)) {
   15809             :                                         unsigned long long test_var;
   15810           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   15811           0 :                                         if (PyErr_Occurred() != NULL) {
   15812           0 :                                                 talloc_free(ret); return NULL;
   15813             :                                         }
   15814           0 :                                         if (test_var > uint_max) {
   15815           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   15816             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   15817           0 :                                                 talloc_free(ret); return NULL;
   15818             :                                         }
   15819           0 :                                         ret->rid = test_var;
   15820             :                                 } else {
   15821           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   15822             :                                           PyLong_Type.tp_name);
   15823           0 :                                         talloc_free(ret); return NULL;
   15824             :                                 }
   15825             :                         }
   15826           0 :                         break;
   15827             : 
   15828           0 :                 case NETR_DELTA_DELETE_USER:
   15829           0 :                         if (in == NULL) {
   15830           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   15831           0 :                                 talloc_free(ret); return NULL;
   15832             :                         }
   15833             :                         {
   15834           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   15835           0 :                                 if (PyLong_Check(in)) {
   15836             :                                         unsigned long long test_var;
   15837           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   15838           0 :                                         if (PyErr_Occurred() != NULL) {
   15839           0 :                                                 talloc_free(ret); return NULL;
   15840             :                                         }
   15841           0 :                                         if (test_var > uint_max) {
   15842           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   15843             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   15844           0 :                                                 talloc_free(ret); return NULL;
   15845             :                                         }
   15846           0 :                                         ret->rid = test_var;
   15847             :                                 } else {
   15848           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   15849             :                                           PyLong_Type.tp_name);
   15850           0 :                                         talloc_free(ret); return NULL;
   15851             :                                 }
   15852             :                         }
   15853           0 :                         break;
   15854             : 
   15855           0 :                 case NETR_DELTA_RENAME_USER:
   15856           0 :                         if (in == NULL) {
   15857           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   15858           0 :                                 talloc_free(ret); return NULL;
   15859             :                         }
   15860             :                         {
   15861           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   15862           0 :                                 if (PyLong_Check(in)) {
   15863             :                                         unsigned long long test_var;
   15864           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   15865           0 :                                         if (PyErr_Occurred() != NULL) {
   15866           0 :                                                 talloc_free(ret); return NULL;
   15867             :                                         }
   15868           0 :                                         if (test_var > uint_max) {
   15869           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   15870             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   15871           0 :                                                 talloc_free(ret); return NULL;
   15872             :                                         }
   15873           0 :                                         ret->rid = test_var;
   15874             :                                 } else {
   15875           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   15876             :                                           PyLong_Type.tp_name);
   15877           0 :                                         talloc_free(ret); return NULL;
   15878             :                                 }
   15879             :                         }
   15880           0 :                         break;
   15881             : 
   15882           0 :                 case NETR_DELTA_GROUP_MEMBER:
   15883           0 :                         if (in == NULL) {
   15884           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   15885           0 :                                 talloc_free(ret); return NULL;
   15886             :                         }
   15887             :                         {
   15888           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   15889           0 :                                 if (PyLong_Check(in)) {
   15890             :                                         unsigned long long test_var;
   15891           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   15892           0 :                                         if (PyErr_Occurred() != NULL) {
   15893           0 :                                                 talloc_free(ret); return NULL;
   15894             :                                         }
   15895           0 :                                         if (test_var > uint_max) {
   15896           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   15897             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   15898           0 :                                                 talloc_free(ret); return NULL;
   15899             :                                         }
   15900           0 :                                         ret->rid = test_var;
   15901             :                                 } else {
   15902           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   15903             :                                           PyLong_Type.tp_name);
   15904           0 :                                         talloc_free(ret); return NULL;
   15905             :                                 }
   15906             :                         }
   15907           0 :                         break;
   15908             : 
   15909           0 :                 case NETR_DELTA_ALIAS:
   15910           0 :                         if (in == NULL) {
   15911           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   15912           0 :                                 talloc_free(ret); return NULL;
   15913             :                         }
   15914             :                         {
   15915           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   15916           0 :                                 if (PyLong_Check(in)) {
   15917             :                                         unsigned long long test_var;
   15918           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   15919           0 :                                         if (PyErr_Occurred() != NULL) {
   15920           0 :                                                 talloc_free(ret); return NULL;
   15921             :                                         }
   15922           0 :                                         if (test_var > uint_max) {
   15923           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   15924             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   15925           0 :                                                 talloc_free(ret); return NULL;
   15926             :                                         }
   15927           0 :                                         ret->rid = test_var;
   15928             :                                 } else {
   15929           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   15930             :                                           PyLong_Type.tp_name);
   15931           0 :                                         talloc_free(ret); return NULL;
   15932             :                                 }
   15933             :                         }
   15934           0 :                         break;
   15935             : 
   15936           0 :                 case NETR_DELTA_DELETE_ALIAS:
   15937           0 :                         if (in == NULL) {
   15938           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   15939           0 :                                 talloc_free(ret); return NULL;
   15940             :                         }
   15941             :                         {
   15942           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   15943           0 :                                 if (PyLong_Check(in)) {
   15944             :                                         unsigned long long test_var;
   15945           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   15946           0 :                                         if (PyErr_Occurred() != NULL) {
   15947           0 :                                                 talloc_free(ret); return NULL;
   15948             :                                         }
   15949           0 :                                         if (test_var > uint_max) {
   15950           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   15951             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   15952           0 :                                                 talloc_free(ret); return NULL;
   15953             :                                         }
   15954           0 :                                         ret->rid = test_var;
   15955             :                                 } else {
   15956           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   15957             :                                           PyLong_Type.tp_name);
   15958           0 :                                         talloc_free(ret); return NULL;
   15959             :                                 }
   15960             :                         }
   15961           0 :                         break;
   15962             : 
   15963           0 :                 case NETR_DELTA_RENAME_ALIAS:
   15964           0 :                         if (in == NULL) {
   15965           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   15966           0 :                                 talloc_free(ret); return NULL;
   15967             :                         }
   15968             :                         {
   15969           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   15970           0 :                                 if (PyLong_Check(in)) {
   15971             :                                         unsigned long long test_var;
   15972           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   15973           0 :                                         if (PyErr_Occurred() != NULL) {
   15974           0 :                                                 talloc_free(ret); return NULL;
   15975             :                                         }
   15976           0 :                                         if (test_var > uint_max) {
   15977           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   15978             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   15979           0 :                                                 talloc_free(ret); return NULL;
   15980             :                                         }
   15981           0 :                                         ret->rid = test_var;
   15982             :                                 } else {
   15983           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   15984             :                                           PyLong_Type.tp_name);
   15985           0 :                                         talloc_free(ret); return NULL;
   15986             :                                 }
   15987             :                         }
   15988           0 :                         break;
   15989             : 
   15990           0 :                 case NETR_DELTA_ALIAS_MEMBER:
   15991           0 :                         if (in == NULL) {
   15992           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   15993           0 :                                 talloc_free(ret); return NULL;
   15994             :                         }
   15995             :                         {
   15996           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   15997           0 :                                 if (PyLong_Check(in)) {
   15998             :                                         unsigned long long test_var;
   15999           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   16000           0 :                                         if (PyErr_Occurred() != NULL) {
   16001           0 :                                                 talloc_free(ret); return NULL;
   16002             :                                         }
   16003           0 :                                         if (test_var > uint_max) {
   16004           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   16005             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   16006           0 :                                                 talloc_free(ret); return NULL;
   16007             :                                         }
   16008           0 :                                         ret->rid = test_var;
   16009             :                                 } else {
   16010           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   16011             :                                           PyLong_Type.tp_name);
   16012           0 :                                         talloc_free(ret); return NULL;
   16013             :                                 }
   16014             :                         }
   16015           0 :                         break;
   16016             : 
   16017           0 :                 case NETR_DELTA_POLICY:
   16018           0 :                         if (in == NULL) {
   16019           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->sid");
   16020           0 :                                 talloc_free(ret); return NULL;
   16021             :                         }
   16022           0 :                         if (in == Py_None) {
   16023           0 :                                 ret->sid = NULL;
   16024             :                         } else {
   16025           0 :                                 ret->sid = NULL;
   16026           0 :                                 PY_CHECK_TYPE(dom_sid_Type, in, talloc_free(ret); return NULL;);
   16027           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   16028           0 :                                         PyErr_NoMemory();
   16029           0 :                                         talloc_free(ret); return NULL;
   16030             :                                 }
   16031           0 :                                 ret->sid = (struct dom_sid *)pytalloc_get_ptr(in);
   16032             :                         }
   16033           0 :                         break;
   16034             : 
   16035           0 :                 case NETR_DELTA_TRUSTED_DOMAIN:
   16036           0 :                         if (in == NULL) {
   16037           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->sid");
   16038           0 :                                 talloc_free(ret); return NULL;
   16039             :                         }
   16040           0 :                         if (in == Py_None) {
   16041           0 :                                 ret->sid = NULL;
   16042             :                         } else {
   16043           0 :                                 ret->sid = NULL;
   16044           0 :                                 PY_CHECK_TYPE(dom_sid_Type, in, talloc_free(ret); return NULL;);
   16045           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   16046           0 :                                         PyErr_NoMemory();
   16047           0 :                                         talloc_free(ret); return NULL;
   16048             :                                 }
   16049           0 :                                 ret->sid = (struct dom_sid *)pytalloc_get_ptr(in);
   16050             :                         }
   16051           0 :                         break;
   16052             : 
   16053           0 :                 case NETR_DELTA_DELETE_TRUST:
   16054           0 :                         if (in == NULL) {
   16055           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->sid");
   16056           0 :                                 talloc_free(ret); return NULL;
   16057             :                         }
   16058           0 :                         if (in == Py_None) {
   16059           0 :                                 ret->sid = NULL;
   16060             :                         } else {
   16061           0 :                                 ret->sid = NULL;
   16062           0 :                                 PY_CHECK_TYPE(dom_sid_Type, in, talloc_free(ret); return NULL;);
   16063           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   16064           0 :                                         PyErr_NoMemory();
   16065           0 :                                         talloc_free(ret); return NULL;
   16066             :                                 }
   16067           0 :                                 ret->sid = (struct dom_sid *)pytalloc_get_ptr(in);
   16068             :                         }
   16069           0 :                         break;
   16070             : 
   16071           0 :                 case NETR_DELTA_ACCOUNT:
   16072           0 :                         if (in == NULL) {
   16073           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->sid");
   16074           0 :                                 talloc_free(ret); return NULL;
   16075             :                         }
   16076           0 :                         if (in == Py_None) {
   16077           0 :                                 ret->sid = NULL;
   16078             :                         } else {
   16079           0 :                                 ret->sid = NULL;
   16080           0 :                                 PY_CHECK_TYPE(dom_sid_Type, in, talloc_free(ret); return NULL;);
   16081           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   16082           0 :                                         PyErr_NoMemory();
   16083           0 :                                         talloc_free(ret); return NULL;
   16084             :                                 }
   16085           0 :                                 ret->sid = (struct dom_sid *)pytalloc_get_ptr(in);
   16086             :                         }
   16087           0 :                         break;
   16088             : 
   16089           0 :                 case NETR_DELTA_DELETE_ACCOUNT:
   16090           0 :                         if (in == NULL) {
   16091           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->sid");
   16092           0 :                                 talloc_free(ret); return NULL;
   16093             :                         }
   16094           0 :                         if (in == Py_None) {
   16095           0 :                                 ret->sid = NULL;
   16096             :                         } else {
   16097           0 :                                 ret->sid = NULL;
   16098           0 :                                 PY_CHECK_TYPE(dom_sid_Type, in, talloc_free(ret); return NULL;);
   16099           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   16100           0 :                                         PyErr_NoMemory();
   16101           0 :                                         talloc_free(ret); return NULL;
   16102             :                                 }
   16103           0 :                                 ret->sid = (struct dom_sid *)pytalloc_get_ptr(in);
   16104             :                         }
   16105           0 :                         break;
   16106             : 
   16107           0 :                 case NETR_DELTA_SECRET:
   16108           0 :                         if (in == NULL) {
   16109           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->name");
   16110           0 :                                 talloc_free(ret); return NULL;
   16111             :                         }
   16112           0 :                         if (in == Py_None) {
   16113           0 :                                 ret->name = NULL;
   16114             :                         } else {
   16115           0 :                                 ret->name = NULL;
   16116             :                                 {
   16117             :                                         const char *test_str;
   16118             :                                         const char *talloc_str;
   16119           0 :                                         PyObject *unicode = NULL;
   16120           0 :                                         if (PyUnicode_Check(in)) {
   16121           0 :                                                 unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   16122           0 :                                                 if (unicode == NULL) {
   16123           0 :                                                         PyErr_NoMemory();
   16124           0 :                                                         talloc_free(ret); return NULL;
   16125             :                                                 }
   16126           0 :                                                 test_str = PyBytes_AS_STRING(unicode);
   16127           0 :                                         } else if (PyBytes_Check(in)) {
   16128           0 :                                                 test_str = PyBytes_AS_STRING(in);
   16129             :                                         } else {
   16130           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   16131           0 :                                                 talloc_free(ret); return NULL;
   16132             :                                         }
   16133           0 :                                         talloc_str = talloc_strdup(mem_ctx, test_str);
   16134           0 :                                         if (unicode != NULL) {
   16135           0 :                                                 Py_DECREF(unicode);
   16136             :                                         }
   16137           0 :                                         if (talloc_str == NULL) {
   16138           0 :                                                 PyErr_NoMemory();
   16139           0 :                                                 talloc_free(ret); return NULL;
   16140             :                                         }
   16141           0 :                                         ret->name = talloc_str;
   16142             :                                 }
   16143             :                         }
   16144           0 :                         break;
   16145             : 
   16146           0 :                 case NETR_DELTA_DELETE_SECRET:
   16147           0 :                         if (in == NULL) {
   16148           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->name");
   16149           0 :                                 talloc_free(ret); return NULL;
   16150             :                         }
   16151           0 :                         if (in == Py_None) {
   16152           0 :                                 ret->name = NULL;
   16153             :                         } else {
   16154           0 :                                 ret->name = NULL;
   16155             :                                 {
   16156             :                                         const char *test_str;
   16157             :                                         const char *talloc_str;
   16158           0 :                                         PyObject *unicode = NULL;
   16159           0 :                                         if (PyUnicode_Check(in)) {
   16160           0 :                                                 unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   16161           0 :                                                 if (unicode == NULL) {
   16162           0 :                                                         PyErr_NoMemory();
   16163           0 :                                                         talloc_free(ret); return NULL;
   16164             :                                                 }
   16165           0 :                                                 test_str = PyBytes_AS_STRING(unicode);
   16166           0 :                                         } else if (PyBytes_Check(in)) {
   16167           0 :                                                 test_str = PyBytes_AS_STRING(in);
   16168             :                                         } else {
   16169           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   16170           0 :                                                 talloc_free(ret); return NULL;
   16171             :                                         }
   16172           0 :                                         talloc_str = talloc_strdup(mem_ctx, test_str);
   16173           0 :                                         if (unicode != NULL) {
   16174           0 :                                                 Py_DECREF(unicode);
   16175             :                                         }
   16176           0 :                                         if (talloc_str == NULL) {
   16177           0 :                                                 PyErr_NoMemory();
   16178           0 :                                                 talloc_free(ret); return NULL;
   16179             :                                         }
   16180           0 :                                         ret->name = talloc_str;
   16181             :                                 }
   16182             :                         }
   16183           0 :                         break;
   16184             : 
   16185           0 :                 case NETR_DELTA_DELETE_GROUP2:
   16186           0 :                         if (in == NULL) {
   16187           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   16188           0 :                                 talloc_free(ret); return NULL;
   16189             :                         }
   16190             :                         {
   16191           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   16192           0 :                                 if (PyLong_Check(in)) {
   16193             :                                         unsigned long long test_var;
   16194           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   16195           0 :                                         if (PyErr_Occurred() != NULL) {
   16196           0 :                                                 talloc_free(ret); return NULL;
   16197             :                                         }
   16198           0 :                                         if (test_var > uint_max) {
   16199           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   16200             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   16201           0 :                                                 talloc_free(ret); return NULL;
   16202             :                                         }
   16203           0 :                                         ret->rid = test_var;
   16204             :                                 } else {
   16205           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   16206             :                                           PyLong_Type.tp_name);
   16207           0 :                                         talloc_free(ret); return NULL;
   16208             :                                 }
   16209             :                         }
   16210           0 :                         break;
   16211             : 
   16212           0 :                 case NETR_DELTA_DELETE_USER2:
   16213           0 :                         if (in == NULL) {
   16214           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->rid");
   16215           0 :                                 talloc_free(ret); return NULL;
   16216             :                         }
   16217             :                         {
   16218           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->rid));
   16219           0 :                                 if (PyLong_Check(in)) {
   16220             :                                         unsigned long long test_var;
   16221           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   16222           0 :                                         if (PyErr_Occurred() != NULL) {
   16223           0 :                                                 talloc_free(ret); return NULL;
   16224             :                                         }
   16225           0 :                                         if (test_var > uint_max) {
   16226           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   16227             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   16228           0 :                                                 talloc_free(ret); return NULL;
   16229             :                                         }
   16230           0 :                                         ret->rid = test_var;
   16231             :                                 } else {
   16232           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   16233             :                                           PyLong_Type.tp_name);
   16234           0 :                                         talloc_free(ret); return NULL;
   16235             :                                 }
   16236             :                         }
   16237           0 :                         break;
   16238             : 
   16239           0 :                 case NETR_DELTA_MODIFY_COUNT:
   16240           0 :                         break;
   16241             : 
   16242           0 :                 default:
   16243           0 :                         break;
   16244             : 
   16245             :         }
   16246             : 
   16247           0 :         return ret;
   16248             : }
   16249             : 
   16250           0 : static PyObject *py_netr_DELTA_ID_UNION_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16251             : {
   16252           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   16253           0 :         PyObject *mem_ctx_obj = NULL;
   16254           0 :         TALLOC_CTX *mem_ctx = NULL;
   16255           0 :         int level = 0;
   16256           0 :         PyObject *in_obj = NULL;
   16257           0 :         union netr_DELTA_ID_UNION *in = NULL;
   16258             : 
   16259           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   16260             :                 discard_const_p(char *, kwnames),
   16261             :                 &mem_ctx_obj,
   16262             :                 &level,
   16263             :                 &in_obj)) {
   16264           0 :                 return NULL;
   16265             :         }
   16266           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   16267           0 :         if (mem_ctx == NULL) {
   16268           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   16269           0 :                 return NULL;
   16270             :         }
   16271           0 :         in = (union netr_DELTA_ID_UNION *)pytalloc_get_ptr(in_obj);
   16272           0 :         if (in == NULL) {
   16273           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_DELTA_ID_UNION!");
   16274           0 :                 return NULL;
   16275             :         }
   16276             : 
   16277           0 :         return py_import_netr_DELTA_ID_UNION(mem_ctx, level, in);
   16278             : }
   16279             : 
   16280           0 : static PyObject *py_netr_DELTA_ID_UNION_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16281             : {
   16282           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   16283           0 :         PyObject *mem_ctx_obj = NULL;
   16284           0 :         TALLOC_CTX *mem_ctx = NULL;
   16285           0 :         int level = 0;
   16286           0 :         PyObject *in = NULL;
   16287           0 :         union netr_DELTA_ID_UNION *out = NULL;
   16288             : 
   16289           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   16290             :                 discard_const_p(char *, kwnames),
   16291             :                 &mem_ctx_obj,
   16292             :                 &level,
   16293             :                 &in)) {
   16294           0 :                 return NULL;
   16295             :         }
   16296           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   16297           0 :         if (mem_ctx == NULL) {
   16298           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   16299           0 :                 return NULL;
   16300             :         }
   16301             : 
   16302           0 :         out = py_export_netr_DELTA_ID_UNION(mem_ctx, level, in);
   16303           0 :         if (out == NULL) {
   16304           0 :                 return NULL;
   16305             :         }
   16306             : 
   16307           0 :         return pytalloc_GenericObject_reference(out);
   16308             : }
   16309             : 
   16310             : static PyMethodDef py_netr_DELTA_ID_UNION_methods[] = {
   16311             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DELTA_ID_UNION_import),
   16312             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   16313             :                 "T.__import__(mem_ctx, level, in) => ret." },
   16314             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DELTA_ID_UNION_export),
   16315             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   16316             :                 "T.__export__(mem_ctx, level, in) => ret." },
   16317             :         { NULL, NULL, 0, NULL }
   16318             : };
   16319             : 
   16320           0 : static PyObject *py_netr_DELTA_ID_UNION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16321             : {
   16322           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   16323           0 :         return NULL;
   16324             : }
   16325             : 
   16326             : 
   16327             : static PyTypeObject netr_DELTA_ID_UNION_Type = {
   16328             :         PyVarObject_HEAD_INIT(NULL, 0)
   16329             :         .tp_name = "netlogon.netr_DELTA_ID_UNION",
   16330             :         .tp_getset = NULL,
   16331             :         .tp_methods = py_netr_DELTA_ID_UNION_methods,
   16332             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16333             :         .tp_new = py_netr_DELTA_ID_UNION_new,
   16334             : };
   16335             : 
   16336             : 
   16337           0 : static PyObject *py_netr_DELTA_ENUM_get_delta_type(PyObject *obj, void *closure)
   16338             : {
   16339           0 :         struct netr_DELTA_ENUM *object = (struct netr_DELTA_ENUM *)pytalloc_get_ptr(obj);
   16340             :         PyObject *py_delta_type;
   16341           0 :         py_delta_type = PyLong_FromLong((uint16_t)object->delta_type);
   16342           0 :         return py_delta_type;
   16343             : }
   16344             : 
   16345           0 : static int py_netr_DELTA_ENUM_set_delta_type(PyObject *py_obj, PyObject *value, void *closure)
   16346             : {
   16347           0 :         struct netr_DELTA_ENUM *object = (struct netr_DELTA_ENUM *)pytalloc_get_ptr(py_obj);
   16348           0 :         if (value == NULL) {
   16349           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->delta_type");
   16350           0 :                 return -1;
   16351             :         }
   16352             :         {
   16353           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->delta_type));
   16354           0 :                 if (PyLong_Check(value)) {
   16355             :                         unsigned long long test_var;
   16356           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16357           0 :                         if (PyErr_Occurred() != NULL) {
   16358           0 :                                 return -1;
   16359             :                         }
   16360           0 :                         if (test_var > uint_max) {
   16361           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   16362             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16363           0 :                                 return -1;
   16364             :                         }
   16365           0 :                         object->delta_type = test_var;
   16366             :                 } else {
   16367           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   16368             :                           PyLong_Type.tp_name);
   16369           0 :                         return -1;
   16370             :                 }
   16371             :         }
   16372           0 :         return 0;
   16373             : }
   16374             : 
   16375           0 : static PyObject *py_netr_DELTA_ENUM_get_delta_id_union(PyObject *obj, void *closure)
   16376             : {
   16377           0 :         struct netr_DELTA_ENUM *object = (struct netr_DELTA_ENUM *)pytalloc_get_ptr(obj);
   16378             :         PyObject *py_delta_id_union;
   16379           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");
   16380           0 :         if (py_delta_id_union == NULL) {
   16381           0 :                 return NULL;
   16382             :         }
   16383           0 :         return py_delta_id_union;
   16384             : }
   16385             : 
   16386           0 : static int py_netr_DELTA_ENUM_set_delta_id_union(PyObject *py_obj, PyObject *value, void *closure)
   16387             : {
   16388           0 :         struct netr_DELTA_ENUM *object = (struct netr_DELTA_ENUM *)pytalloc_get_ptr(py_obj);
   16389           0 :         if (value == NULL) {
   16390           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->delta_id_union");
   16391           0 :                 return -1;
   16392             :         }
   16393             :         {
   16394             :                 union netr_DELTA_ID_UNION *delta_id_union_switch_0;
   16395           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");
   16396           0 :                 if (delta_id_union_switch_0 == NULL) {
   16397           0 :                         return -1;
   16398             :                 }
   16399           0 :                 object->delta_id_union = *delta_id_union_switch_0;
   16400             :         }
   16401           0 :         return 0;
   16402             : }
   16403             : 
   16404           0 : static PyObject *py_netr_DELTA_ENUM_get_delta_union(PyObject *obj, void *closure)
   16405             : {
   16406           0 :         struct netr_DELTA_ENUM *object = (struct netr_DELTA_ENUM *)pytalloc_get_ptr(obj);
   16407             :         PyObject *py_delta_union;
   16408           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");
   16409           0 :         if (py_delta_union == NULL) {
   16410           0 :                 return NULL;
   16411             :         }
   16412           0 :         return py_delta_union;
   16413             : }
   16414             : 
   16415           0 : static int py_netr_DELTA_ENUM_set_delta_union(PyObject *py_obj, PyObject *value, void *closure)
   16416             : {
   16417           0 :         struct netr_DELTA_ENUM *object = (struct netr_DELTA_ENUM *)pytalloc_get_ptr(py_obj);
   16418           0 :         if (value == NULL) {
   16419           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->delta_union");
   16420           0 :                 return -1;
   16421             :         }
   16422             :         {
   16423             :                 union netr_DELTA_UNION *delta_union_switch_0;
   16424           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");
   16425           0 :                 if (delta_union_switch_0 == NULL) {
   16426           0 :                         return -1;
   16427             :                 }
   16428           0 :                 object->delta_union = *delta_union_switch_0;
   16429             :         }
   16430           0 :         return 0;
   16431             : }
   16432             : 
   16433             : static PyGetSetDef py_netr_DELTA_ENUM_getsetters[] = {
   16434             :         {
   16435             :                 .name = discard_const_p(char, "delta_type"),
   16436             :                 .get = py_netr_DELTA_ENUM_get_delta_type,
   16437             :                 .set = py_netr_DELTA_ENUM_set_delta_type,
   16438             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DeltaEnum")
   16439             :         },
   16440             :         {
   16441             :                 .name = discard_const_p(char, "delta_id_union"),
   16442             :                 .get = py_netr_DELTA_ENUM_get_delta_id_union,
   16443             :                 .set = py_netr_DELTA_ENUM_set_delta_id_union,
   16444             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_ID_UNION")
   16445             :         },
   16446             :         {
   16447             :                 .name = discard_const_p(char, "delta_union"),
   16448             :                 .get = py_netr_DELTA_ENUM_get_delta_union,
   16449             :                 .set = py_netr_DELTA_ENUM_set_delta_union,
   16450             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_UNION")
   16451             :         },
   16452             :         { .name = NULL }
   16453             : };
   16454             : 
   16455           0 : static PyObject *py_netr_DELTA_ENUM_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16456             : {
   16457           0 :         return pytalloc_new(struct netr_DELTA_ENUM, type);
   16458             : }
   16459             : 
   16460             : 
   16461             : static PyTypeObject netr_DELTA_ENUM_Type = {
   16462             :         PyVarObject_HEAD_INIT(NULL, 0)
   16463             :         .tp_name = "netlogon.netr_DELTA_ENUM",
   16464             :         .tp_getset = py_netr_DELTA_ENUM_getsetters,
   16465             :         .tp_methods = NULL,
   16466             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16467             :         .tp_new = py_netr_DELTA_ENUM_new,
   16468             : };
   16469             : 
   16470             : 
   16471           0 : static PyObject *py_netr_DELTA_ENUM_ARRAY_get_num_deltas(PyObject *obj, void *closure)
   16472             : {
   16473           0 :         struct netr_DELTA_ENUM_ARRAY *object = (struct netr_DELTA_ENUM_ARRAY *)pytalloc_get_ptr(obj);
   16474             :         PyObject *py_num_deltas;
   16475           0 :         py_num_deltas = PyLong_FromUnsignedLongLong((uint32_t)object->num_deltas);
   16476           0 :         return py_num_deltas;
   16477             : }
   16478             : 
   16479           0 : static int py_netr_DELTA_ENUM_ARRAY_set_num_deltas(PyObject *py_obj, PyObject *value, void *closure)
   16480             : {
   16481           0 :         struct netr_DELTA_ENUM_ARRAY *object = (struct netr_DELTA_ENUM_ARRAY *)pytalloc_get_ptr(py_obj);
   16482           0 :         if (value == NULL) {
   16483           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_deltas");
   16484           0 :                 return -1;
   16485             :         }
   16486             :         {
   16487           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_deltas));
   16488           0 :                 if (PyLong_Check(value)) {
   16489             :                         unsigned long long test_var;
   16490           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16491           0 :                         if (PyErr_Occurred() != NULL) {
   16492           0 :                                 return -1;
   16493             :                         }
   16494           0 :                         if (test_var > uint_max) {
   16495           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   16496             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16497           0 :                                 return -1;
   16498             :                         }
   16499           0 :                         object->num_deltas = test_var;
   16500             :                 } else {
   16501           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   16502             :                           PyLong_Type.tp_name);
   16503           0 :                         return -1;
   16504             :                 }
   16505             :         }
   16506           0 :         return 0;
   16507             : }
   16508             : 
   16509           0 : static PyObject *py_netr_DELTA_ENUM_ARRAY_get_delta_enum(PyObject *obj, void *closure)
   16510             : {
   16511           0 :         struct netr_DELTA_ENUM_ARRAY *object = (struct netr_DELTA_ENUM_ARRAY *)pytalloc_get_ptr(obj);
   16512             :         PyObject *py_delta_enum;
   16513           0 :         if (object->delta_enum == NULL) {
   16514           0 :                 Py_RETURN_NONE;
   16515             :         }
   16516           0 :         if (object->delta_enum == NULL) {
   16517           0 :                 py_delta_enum = Py_None;
   16518           0 :                 Py_INCREF(py_delta_enum);
   16519             :         } else {
   16520           0 :                 py_delta_enum = PyList_New(object->num_deltas);
   16521           0 :                 if (py_delta_enum == NULL) {
   16522           0 :                         return NULL;
   16523             :                 }
   16524             :                 {
   16525             :                         int delta_enum_cntr_1;
   16526           0 :                         for (delta_enum_cntr_1 = 0; delta_enum_cntr_1 < (object->num_deltas); delta_enum_cntr_1++) {
   16527             :                                 PyObject *py_delta_enum_1;
   16528           0 :                                 py_delta_enum_1 = pytalloc_reference_ex(&netr_DELTA_ENUM_Type, object->delta_enum, &object->delta_enum[delta_enum_cntr_1]);
   16529           0 :                                 PyList_SetItem(py_delta_enum, delta_enum_cntr_1, py_delta_enum_1);
   16530             :                         }
   16531             :                 }
   16532             :         }
   16533           0 :         return py_delta_enum;
   16534             : }
   16535             : 
   16536           0 : static int py_netr_DELTA_ENUM_ARRAY_set_delta_enum(PyObject *py_obj, PyObject *value, void *closure)
   16537             : {
   16538           0 :         struct netr_DELTA_ENUM_ARRAY *object = (struct netr_DELTA_ENUM_ARRAY *)pytalloc_get_ptr(py_obj);
   16539           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->delta_enum));
   16540           0 :         if (value == NULL) {
   16541           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->delta_enum");
   16542           0 :                 return -1;
   16543             :         }
   16544           0 :         if (value == Py_None) {
   16545           0 :                 object->delta_enum = NULL;
   16546             :         } else {
   16547           0 :                 object->delta_enum = NULL;
   16548           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   16549             :                 {
   16550             :                         int delta_enum_cntr_1;
   16551           0 :                         object->delta_enum = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->delta_enum, PyList_GET_SIZE(value));
   16552           0 :                         if (!object->delta_enum) { return -1;; }
   16553           0 :                         talloc_set_name_const(object->delta_enum, "ARRAY: object->delta_enum");
   16554           0 :                         for (delta_enum_cntr_1 = 0; delta_enum_cntr_1 < PyList_GET_SIZE(value); delta_enum_cntr_1++) {
   16555           0 :                                 if (PyList_GET_ITEM(value, delta_enum_cntr_1) == NULL) {
   16556           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->delta_enum[delta_enum_cntr_1]");
   16557           0 :                                         return -1;
   16558             :                                 }
   16559           0 :                                 PY_CHECK_TYPE(&netr_DELTA_ENUM_Type, PyList_GET_ITEM(value, delta_enum_cntr_1), return -1;);
   16560           0 :                                 if (talloc_reference(object->delta_enum, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, delta_enum_cntr_1))) == NULL) {
   16561           0 :                                         PyErr_NoMemory();
   16562           0 :                                         return -1;
   16563             :                                 }
   16564           0 :                                 object->delta_enum[delta_enum_cntr_1] = *(struct netr_DELTA_ENUM *)pytalloc_get_ptr(PyList_GET_ITEM(value, delta_enum_cntr_1));
   16565             :                         }
   16566             :                 }
   16567             :         }
   16568           0 :         return 0;
   16569             : }
   16570             : 
   16571             : static PyGetSetDef py_netr_DELTA_ENUM_ARRAY_getsetters[] = {
   16572             :         {
   16573             :                 .name = discard_const_p(char, "num_deltas"),
   16574             :                 .get = py_netr_DELTA_ENUM_ARRAY_get_num_deltas,
   16575             :                 .set = py_netr_DELTA_ENUM_ARRAY_set_num_deltas,
   16576             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16577             :         },
   16578             :         {
   16579             :                 .name = discard_const_p(char, "delta_enum"),
   16580             :                 .get = py_netr_DELTA_ENUM_ARRAY_get_delta_enum,
   16581             :                 .set = py_netr_DELTA_ENUM_ARRAY_set_delta_enum,
   16582             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_ENUM")
   16583             :         },
   16584             :         { .name = NULL }
   16585             : };
   16586             : 
   16587           0 : static PyObject *py_netr_DELTA_ENUM_ARRAY_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16588             : {
   16589           0 :         return pytalloc_new(struct netr_DELTA_ENUM_ARRAY, type);
   16590             : }
   16591             : 
   16592             : 
   16593             : static PyTypeObject netr_DELTA_ENUM_ARRAY_Type = {
   16594             :         PyVarObject_HEAD_INIT(NULL, 0)
   16595             :         .tp_name = "netlogon.netr_DELTA_ENUM_ARRAY",
   16596             :         .tp_getset = py_netr_DELTA_ENUM_ARRAY_getsetters,
   16597             :         .tp_methods = NULL,
   16598             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16599             :         .tp_new = py_netr_DELTA_ENUM_ARRAY_new,
   16600             : };
   16601             : 
   16602             : 
   16603           0 : static PyObject *py_netr_UAS_INFO_0_get_computer_name(PyObject *obj, void *closure)
   16604             : {
   16605           0 :         struct netr_UAS_INFO_0 *object = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(obj);
   16606             :         PyObject *py_computer_name;
   16607           0 :         py_computer_name = PyList_New(16);
   16608           0 :         if (py_computer_name == NULL) {
   16609           0 :                 return NULL;
   16610             :         }
   16611             :         {
   16612             :                 int computer_name_cntr_0;
   16613           0 :                 for (computer_name_cntr_0 = 0; computer_name_cntr_0 < (16); computer_name_cntr_0++) {
   16614             :                         PyObject *py_computer_name_0;
   16615           0 :                         py_computer_name_0 = PyLong_FromLong((uint16_t)object->computer_name[computer_name_cntr_0]);
   16616           0 :                         PyList_SetItem(py_computer_name, computer_name_cntr_0, py_computer_name_0);
   16617             :                 }
   16618             :         }
   16619           0 :         return py_computer_name;
   16620             : }
   16621             : 
   16622           0 : static int py_netr_UAS_INFO_0_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   16623             : {
   16624           0 :         struct netr_UAS_INFO_0 *object = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(py_obj);
   16625           0 :         if (value == NULL) {
   16626           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->computer_name");
   16627           0 :                 return -1;
   16628             :         }
   16629           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   16630             :         {
   16631             :                 int computer_name_cntr_0;
   16632           0 :                 if (ARRAY_SIZE(object->computer_name) != PyList_GET_SIZE(value)) {
   16633           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));
   16634           0 :                         return -1;
   16635             :                 }
   16636           0 :                 for (computer_name_cntr_0 = 0; computer_name_cntr_0 < PyList_GET_SIZE(value); computer_name_cntr_0++) {
   16637           0 :                         if (PyList_GET_ITEM(value, computer_name_cntr_0) == NULL) {
   16638           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->computer_name[computer_name_cntr_0]");
   16639           0 :                                 return -1;
   16640             :                         }
   16641             :                         {
   16642           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->computer_name[computer_name_cntr_0]));
   16643           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, computer_name_cntr_0))) {
   16644             :                                         unsigned long long test_var;
   16645           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, computer_name_cntr_0));
   16646           0 :                                         if (PyErr_Occurred() != NULL) {
   16647           0 :                                                 return -1;
   16648             :                                         }
   16649           0 :                                         if (test_var > uint_max) {
   16650           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   16651             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   16652           0 :                                                 return -1;
   16653             :                                         }
   16654           0 :                                         object->computer_name[computer_name_cntr_0] = test_var;
   16655             :                                 } else {
   16656           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   16657             :                                           PyLong_Type.tp_name);
   16658           0 :                                         return -1;
   16659             :                                 }
   16660             :                         }
   16661             :                 }
   16662             :         }
   16663           0 :         return 0;
   16664             : }
   16665             : 
   16666           0 : static PyObject *py_netr_UAS_INFO_0_get_timecreated(PyObject *obj, void *closure)
   16667             : {
   16668           0 :         struct netr_UAS_INFO_0 *object = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(obj);
   16669             :         PyObject *py_timecreated;
   16670           0 :         py_timecreated = PyLong_FromUnsignedLongLong((uint32_t)object->timecreated);
   16671           0 :         return py_timecreated;
   16672             : }
   16673             : 
   16674           0 : static int py_netr_UAS_INFO_0_set_timecreated(PyObject *py_obj, PyObject *value, void *closure)
   16675             : {
   16676           0 :         struct netr_UAS_INFO_0 *object = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(py_obj);
   16677           0 :         if (value == NULL) {
   16678           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->timecreated");
   16679           0 :                 return -1;
   16680             :         }
   16681             :         {
   16682           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->timecreated));
   16683           0 :                 if (PyLong_Check(value)) {
   16684             :                         unsigned long long test_var;
   16685           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16686           0 :                         if (PyErr_Occurred() != NULL) {
   16687           0 :                                 return -1;
   16688             :                         }
   16689           0 :                         if (test_var > uint_max) {
   16690           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   16691             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16692           0 :                                 return -1;
   16693             :                         }
   16694           0 :                         object->timecreated = test_var;
   16695             :                 } else {
   16696           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   16697             :                           PyLong_Type.tp_name);
   16698           0 :                         return -1;
   16699             :                 }
   16700             :         }
   16701           0 :         return 0;
   16702             : }
   16703             : 
   16704           0 : static PyObject *py_netr_UAS_INFO_0_get_serial_number(PyObject *obj, void *closure)
   16705             : {
   16706           0 :         struct netr_UAS_INFO_0 *object = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(obj);
   16707             :         PyObject *py_serial_number;
   16708           0 :         py_serial_number = PyLong_FromUnsignedLongLong((uint32_t)object->serial_number);
   16709           0 :         return py_serial_number;
   16710             : }
   16711             : 
   16712           0 : static int py_netr_UAS_INFO_0_set_serial_number(PyObject *py_obj, PyObject *value, void *closure)
   16713             : {
   16714           0 :         struct netr_UAS_INFO_0 *object = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(py_obj);
   16715           0 :         if (value == NULL) {
   16716           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->serial_number");
   16717           0 :                 return -1;
   16718             :         }
   16719             :         {
   16720           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->serial_number));
   16721           0 :                 if (PyLong_Check(value)) {
   16722             :                         unsigned long long test_var;
   16723           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16724           0 :                         if (PyErr_Occurred() != NULL) {
   16725           0 :                                 return -1;
   16726             :                         }
   16727           0 :                         if (test_var > uint_max) {
   16728           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   16729             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16730           0 :                                 return -1;
   16731             :                         }
   16732           0 :                         object->serial_number = test_var;
   16733             :                 } else {
   16734           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   16735             :                           PyLong_Type.tp_name);
   16736           0 :                         return -1;
   16737             :                 }
   16738             :         }
   16739           0 :         return 0;
   16740             : }
   16741             : 
   16742             : static PyGetSetDef py_netr_UAS_INFO_0_getsetters[] = {
   16743             :         {
   16744             :                 .name = discard_const_p(char, "computer_name"),
   16745             :                 .get = py_netr_UAS_INFO_0_get_computer_name,
   16746             :                 .set = py_netr_UAS_INFO_0_set_computer_name,
   16747             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   16748             :         },
   16749             :         {
   16750             :                 .name = discard_const_p(char, "timecreated"),
   16751             :                 .get = py_netr_UAS_INFO_0_get_timecreated,
   16752             :                 .set = py_netr_UAS_INFO_0_set_timecreated,
   16753             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16754             :         },
   16755             :         {
   16756             :                 .name = discard_const_p(char, "serial_number"),
   16757             :                 .get = py_netr_UAS_INFO_0_get_serial_number,
   16758             :                 .set = py_netr_UAS_INFO_0_set_serial_number,
   16759             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16760             :         },
   16761             :         { .name = NULL }
   16762             : };
   16763             : 
   16764           0 : static PyObject *py_netr_UAS_INFO_0_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16765             : {
   16766           0 :         return pytalloc_new(struct netr_UAS_INFO_0, type);
   16767             : }
   16768             : 
   16769             : 
   16770             : static PyTypeObject netr_UAS_INFO_0_Type = {
   16771             :         PyVarObject_HEAD_INIT(NULL, 0)
   16772             :         .tp_name = "netlogon.netr_UAS_INFO_0",
   16773             :         .tp_getset = py_netr_UAS_INFO_0_getsetters,
   16774             :         .tp_methods = NULL,
   16775             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16776             :         .tp_new = py_netr_UAS_INFO_0_new,
   16777             : };
   16778             : 
   16779             : 
   16780           0 : static PyObject *py_netr_AccountBuffer_get_blob(PyObject *obj, void *closure)
   16781             : {
   16782           0 :         struct netr_AccountBuffer *object = (struct netr_AccountBuffer *)pytalloc_get_ptr(obj);
   16783             :         PyObject *py_blob;
   16784           0 :         py_blob = PyBytes_FromStringAndSize((char *)(object->blob).data, (object->blob).length);
   16785           0 :         return py_blob;
   16786             : }
   16787             : 
   16788           0 : static int py_netr_AccountBuffer_set_blob(PyObject *py_obj, PyObject *value, void *closure)
   16789             : {
   16790           0 :         struct netr_AccountBuffer *object = (struct netr_AccountBuffer *)pytalloc_get_ptr(py_obj);
   16791           0 :         if (value == NULL) {
   16792           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->blob");
   16793           0 :                 return -1;
   16794             :         }
   16795           0 :         object->blob = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   16796           0 :         return 0;
   16797             : }
   16798             : 
   16799             : static PyGetSetDef py_netr_AccountBuffer_getsetters[] = {
   16800             :         {
   16801             :                 .name = discard_const_p(char, "blob"),
   16802             :                 .get = py_netr_AccountBuffer_get_blob,
   16803             :                 .set = py_netr_AccountBuffer_set_blob,
   16804             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   16805             :         },
   16806             :         { .name = NULL }
   16807             : };
   16808             : 
   16809           0 : static PyObject *py_netr_AccountBuffer_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16810             : {
   16811           0 :         return pytalloc_new(struct netr_AccountBuffer, type);
   16812             : }
   16813             : 
   16814             : 
   16815             : static PyTypeObject netr_AccountBuffer_Type = {
   16816             :         PyVarObject_HEAD_INIT(NULL, 0)
   16817             :         .tp_name = "netlogon.netr_AccountBuffer",
   16818             :         .tp_getset = py_netr_AccountBuffer_getsetters,
   16819             :         .tp_methods = NULL,
   16820             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16821             :         .tp_new = py_netr_AccountBuffer_new,
   16822             : };
   16823             : 
   16824             : 
   16825           0 : static PyObject *py_netr_NETLOGON_INFO_1_get_flags(PyObject *obj, void *closure)
   16826             : {
   16827           0 :         struct netr_NETLOGON_INFO_1 *object = (struct netr_NETLOGON_INFO_1 *)pytalloc_get_ptr(obj);
   16828             :         PyObject *py_flags;
   16829           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->flags);
   16830           0 :         return py_flags;
   16831             : }
   16832             : 
   16833           0 : static int py_netr_NETLOGON_INFO_1_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   16834             : {
   16835           0 :         struct netr_NETLOGON_INFO_1 *object = (struct netr_NETLOGON_INFO_1 *)pytalloc_get_ptr(py_obj);
   16836           0 :         if (value == NULL) {
   16837           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
   16838           0 :                 return -1;
   16839             :         }
   16840             :         {
   16841           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
   16842           0 :                 if (PyLong_Check(value)) {
   16843             :                         unsigned long long test_var;
   16844           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16845           0 :                         if (PyErr_Occurred() != NULL) {
   16846           0 :                                 return -1;
   16847             :                         }
   16848           0 :                         if (test_var > uint_max) {
   16849           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   16850             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16851           0 :                                 return -1;
   16852             :                         }
   16853           0 :                         object->flags = test_var;
   16854             :                 } else {
   16855           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   16856             :                           PyLong_Type.tp_name);
   16857           0 :                         return -1;
   16858             :                 }
   16859             :         }
   16860           0 :         return 0;
   16861             : }
   16862             : 
   16863           0 : static PyObject *py_netr_NETLOGON_INFO_1_get_pdc_connection_status(PyObject *obj, void *closure)
   16864             : {
   16865           0 :         struct netr_NETLOGON_INFO_1 *object = (struct netr_NETLOGON_INFO_1 *)pytalloc_get_ptr(obj);
   16866             :         PyObject *py_pdc_connection_status;
   16867           0 :         py_pdc_connection_status = PyErr_FromWERROR(object->pdc_connection_status);
   16868           0 :         return py_pdc_connection_status;
   16869             : }
   16870             : 
   16871           0 : static int py_netr_NETLOGON_INFO_1_set_pdc_connection_status(PyObject *py_obj, PyObject *value, void *closure)
   16872             : {
   16873           0 :         struct netr_NETLOGON_INFO_1 *object = (struct netr_NETLOGON_INFO_1 *)pytalloc_get_ptr(py_obj);
   16874           0 :         if (value == NULL) {
   16875           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pdc_connection_status");
   16876           0 :                 return -1;
   16877             :         }
   16878           0 :         object->pdc_connection_status = W_ERROR(PyLong_AsLong(value));
   16879           0 :         return 0;
   16880             : }
   16881             : 
   16882             : static PyGetSetDef py_netr_NETLOGON_INFO_1_getsetters[] = {
   16883             :         {
   16884             :                 .name = discard_const_p(char, "flags"),
   16885             :                 .get = py_netr_NETLOGON_INFO_1_get_flags,
   16886             :                 .set = py_netr_NETLOGON_INFO_1_set_flags,
   16887             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_InfoFlags")
   16888             :         },
   16889             :         {
   16890             :                 .name = discard_const_p(char, "pdc_connection_status"),
   16891             :                 .get = py_netr_NETLOGON_INFO_1_get_pdc_connection_status,
   16892             :                 .set = py_netr_NETLOGON_INFO_1_set_pdc_connection_status,
   16893             :                 .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
   16894             :         },
   16895             :         { .name = NULL }
   16896             : };
   16897             : 
   16898           0 : static PyObject *py_netr_NETLOGON_INFO_1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16899             : {
   16900           0 :         return pytalloc_new(struct netr_NETLOGON_INFO_1, type);
   16901             : }
   16902             : 
   16903             : 
   16904             : static PyTypeObject netr_NETLOGON_INFO_1_Type = {
   16905             :         PyVarObject_HEAD_INIT(NULL, 0)
   16906             :         .tp_name = "netlogon.netr_NETLOGON_INFO_1",
   16907             :         .tp_getset = py_netr_NETLOGON_INFO_1_getsetters,
   16908             :         .tp_methods = NULL,
   16909             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16910             :         .tp_new = py_netr_NETLOGON_INFO_1_new,
   16911             : };
   16912             : 
   16913             : 
   16914          53 : static PyObject *py_netr_NETLOGON_INFO_2_get_flags(PyObject *obj, void *closure)
   16915             : {
   16916          53 :         struct netr_NETLOGON_INFO_2 *object = (struct netr_NETLOGON_INFO_2 *)pytalloc_get_ptr(obj);
   16917             :         PyObject *py_flags;
   16918          53 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->flags);
   16919          53 :         return py_flags;
   16920             : }
   16921             : 
   16922           0 : static int py_netr_NETLOGON_INFO_2_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   16923             : {
   16924           0 :         struct netr_NETLOGON_INFO_2 *object = (struct netr_NETLOGON_INFO_2 *)pytalloc_get_ptr(py_obj);
   16925           0 :         if (value == NULL) {
   16926           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
   16927           0 :                 return -1;
   16928             :         }
   16929             :         {
   16930           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
   16931           0 :                 if (PyLong_Check(value)) {
   16932             :                         unsigned long long test_var;
   16933           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16934           0 :                         if (PyErr_Occurred() != NULL) {
   16935           0 :                                 return -1;
   16936             :                         }
   16937           0 :                         if (test_var > uint_max) {
   16938           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   16939             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16940           0 :                                 return -1;
   16941             :                         }
   16942           0 :                         object->flags = test_var;
   16943             :                 } else {
   16944           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   16945             :                           PyLong_Type.tp_name);
   16946           0 :                         return -1;
   16947             :                 }
   16948             :         }
   16949           0 :         return 0;
   16950             : }
   16951             : 
   16952         106 : static PyObject *py_netr_NETLOGON_INFO_2_get_pdc_connection_status(PyObject *obj, void *closure)
   16953             : {
   16954         106 :         struct netr_NETLOGON_INFO_2 *object = (struct netr_NETLOGON_INFO_2 *)pytalloc_get_ptr(obj);
   16955             :         PyObject *py_pdc_connection_status;
   16956         106 :         py_pdc_connection_status = PyErr_FromWERROR(object->pdc_connection_status);
   16957         106 :         return py_pdc_connection_status;
   16958             : }
   16959             : 
   16960           0 : static int py_netr_NETLOGON_INFO_2_set_pdc_connection_status(PyObject *py_obj, PyObject *value, void *closure)
   16961             : {
   16962           0 :         struct netr_NETLOGON_INFO_2 *object = (struct netr_NETLOGON_INFO_2 *)pytalloc_get_ptr(py_obj);
   16963           0 :         if (value == NULL) {
   16964           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pdc_connection_status");
   16965           0 :                 return -1;
   16966             :         }
   16967           0 :         object->pdc_connection_status = W_ERROR(PyLong_AsLong(value));
   16968           0 :         return 0;
   16969             : }
   16970             : 
   16971         109 : static PyObject *py_netr_NETLOGON_INFO_2_get_trusted_dc_name(PyObject *obj, void *closure)
   16972             : {
   16973         109 :         struct netr_NETLOGON_INFO_2 *object = (struct netr_NETLOGON_INFO_2 *)pytalloc_get_ptr(obj);
   16974             :         PyObject *py_trusted_dc_name;
   16975         109 :         if (object->trusted_dc_name == NULL) {
   16976           0 :                 Py_RETURN_NONE;
   16977             :         }
   16978         109 :         if (object->trusted_dc_name == NULL) {
   16979           0 :                 py_trusted_dc_name = Py_None;
   16980           0 :                 Py_INCREF(py_trusted_dc_name);
   16981             :         } else {
   16982         109 :                 if (object->trusted_dc_name == NULL) {
   16983           0 :                         py_trusted_dc_name = Py_None;
   16984           0 :                         Py_INCREF(py_trusted_dc_name);
   16985             :                 } else {
   16986         109 :                         py_trusted_dc_name = PyUnicode_Decode(object->trusted_dc_name, strlen(object->trusted_dc_name), "utf-8", "ignore");
   16987             :                 }
   16988             :         }
   16989         109 :         return py_trusted_dc_name;
   16990             : }
   16991             : 
   16992           0 : static int py_netr_NETLOGON_INFO_2_set_trusted_dc_name(PyObject *py_obj, PyObject *value, void *closure)
   16993             : {
   16994           0 :         struct netr_NETLOGON_INFO_2 *object = (struct netr_NETLOGON_INFO_2 *)pytalloc_get_ptr(py_obj);
   16995           0 :         if (value == NULL) {
   16996           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->trusted_dc_name");
   16997           0 :                 return -1;
   16998             :         }
   16999           0 :         if (value == Py_None) {
   17000           0 :                 object->trusted_dc_name = NULL;
   17001             :         } else {
   17002           0 :                 object->trusted_dc_name = NULL;
   17003             :                 {
   17004             :                         const char *test_str;
   17005             :                         const char *talloc_str;
   17006           0 :                         PyObject *unicode = NULL;
   17007           0 :                         if (PyUnicode_Check(value)) {
   17008           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   17009           0 :                                 if (unicode == NULL) {
   17010           0 :                                         PyErr_NoMemory();
   17011           0 :                                         return -1;
   17012             :                                 }
   17013           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   17014           0 :                         } else if (PyBytes_Check(value)) {
   17015           0 :                                 test_str = PyBytes_AS_STRING(value);
   17016             :                         } else {
   17017           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   17018           0 :                                 return -1;
   17019             :                         }
   17020           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   17021           0 :                         if (unicode != NULL) {
   17022           0 :                                 Py_DECREF(unicode);
   17023             :                         }
   17024           0 :                         if (talloc_str == NULL) {
   17025           0 :                                 PyErr_NoMemory();
   17026           0 :                                 return -1;
   17027             :                         }
   17028           0 :                         object->trusted_dc_name = talloc_str;
   17029             :                 }
   17030             :         }
   17031           0 :         return 0;
   17032             : }
   17033             : 
   17034         162 : static PyObject *py_netr_NETLOGON_INFO_2_get_tc_connection_status(PyObject *obj, void *closure)
   17035             : {
   17036         162 :         struct netr_NETLOGON_INFO_2 *object = (struct netr_NETLOGON_INFO_2 *)pytalloc_get_ptr(obj);
   17037             :         PyObject *py_tc_connection_status;
   17038         162 :         py_tc_connection_status = PyErr_FromWERROR(object->tc_connection_status);
   17039         162 :         return py_tc_connection_status;
   17040             : }
   17041             : 
   17042           0 : static int py_netr_NETLOGON_INFO_2_set_tc_connection_status(PyObject *py_obj, PyObject *value, void *closure)
   17043             : {
   17044           0 :         struct netr_NETLOGON_INFO_2 *object = (struct netr_NETLOGON_INFO_2 *)pytalloc_get_ptr(py_obj);
   17045           0 :         if (value == NULL) {
   17046           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->tc_connection_status");
   17047           0 :                 return -1;
   17048             :         }
   17049           0 :         object->tc_connection_status = W_ERROR(PyLong_AsLong(value));
   17050           0 :         return 0;
   17051             : }
   17052             : 
   17053             : static PyGetSetDef py_netr_NETLOGON_INFO_2_getsetters[] = {
   17054             :         {
   17055             :                 .name = discard_const_p(char, "flags"),
   17056             :                 .get = py_netr_NETLOGON_INFO_2_get_flags,
   17057             :                 .set = py_netr_NETLOGON_INFO_2_set_flags,
   17058             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_InfoFlags")
   17059             :         },
   17060             :         {
   17061             :                 .name = discard_const_p(char, "pdc_connection_status"),
   17062             :                 .get = py_netr_NETLOGON_INFO_2_get_pdc_connection_status,
   17063             :                 .set = py_netr_NETLOGON_INFO_2_set_pdc_connection_status,
   17064             :                 .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
   17065             :         },
   17066             :         {
   17067             :                 .name = discard_const_p(char, "trusted_dc_name"),
   17068             :                 .get = py_netr_NETLOGON_INFO_2_get_trusted_dc_name,
   17069             :                 .set = py_netr_NETLOGON_INFO_2_set_trusted_dc_name,
   17070             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   17071             :         },
   17072             :         {
   17073             :                 .name = discard_const_p(char, "tc_connection_status"),
   17074             :                 .get = py_netr_NETLOGON_INFO_2_get_tc_connection_status,
   17075             :                 .set = py_netr_NETLOGON_INFO_2_set_tc_connection_status,
   17076             :                 .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
   17077             :         },
   17078             :         { .name = NULL }
   17079             : };
   17080             : 
   17081           0 : static PyObject *py_netr_NETLOGON_INFO_2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17082             : {
   17083           0 :         return pytalloc_new(struct netr_NETLOGON_INFO_2, type);
   17084             : }
   17085             : 
   17086             : 
   17087             : static PyTypeObject netr_NETLOGON_INFO_2_Type = {
   17088             :         PyVarObject_HEAD_INIT(NULL, 0)
   17089             :         .tp_name = "netlogon.netr_NETLOGON_INFO_2",
   17090             :         .tp_getset = py_netr_NETLOGON_INFO_2_getsetters,
   17091             :         .tp_methods = NULL,
   17092             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17093             :         .tp_new = py_netr_NETLOGON_INFO_2_new,
   17094             : };
   17095             : 
   17096             : 
   17097           0 : static PyObject *py_netr_NETLOGON_INFO_3_get_flags(PyObject *obj, void *closure)
   17098             : {
   17099           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(obj);
   17100             :         PyObject *py_flags;
   17101           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->flags);
   17102           0 :         return py_flags;
   17103             : }
   17104             : 
   17105           0 : static int py_netr_NETLOGON_INFO_3_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   17106             : {
   17107           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(py_obj);
   17108           0 :         if (value == NULL) {
   17109           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
   17110           0 :                 return -1;
   17111             :         }
   17112             :         {
   17113           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
   17114           0 :                 if (PyLong_Check(value)) {
   17115             :                         unsigned long long test_var;
   17116           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17117           0 :                         if (PyErr_Occurred() != NULL) {
   17118           0 :                                 return -1;
   17119             :                         }
   17120           0 :                         if (test_var > uint_max) {
   17121           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   17122             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17123           0 :                                 return -1;
   17124             :                         }
   17125           0 :                         object->flags = test_var;
   17126             :                 } else {
   17127           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   17128             :                           PyLong_Type.tp_name);
   17129           0 :                         return -1;
   17130             :                 }
   17131             :         }
   17132           0 :         return 0;
   17133             : }
   17134             : 
   17135           0 : static PyObject *py_netr_NETLOGON_INFO_3_get_logon_attempts(PyObject *obj, void *closure)
   17136             : {
   17137           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(obj);
   17138             :         PyObject *py_logon_attempts;
   17139           0 :         py_logon_attempts = PyLong_FromUnsignedLongLong((uint32_t)object->logon_attempts);
   17140           0 :         return py_logon_attempts;
   17141             : }
   17142             : 
   17143           0 : static int py_netr_NETLOGON_INFO_3_set_logon_attempts(PyObject *py_obj, PyObject *value, void *closure)
   17144             : {
   17145           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(py_obj);
   17146           0 :         if (value == NULL) {
   17147           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->logon_attempts");
   17148           0 :                 return -1;
   17149             :         }
   17150             :         {
   17151           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->logon_attempts));
   17152           0 :                 if (PyLong_Check(value)) {
   17153             :                         unsigned long long test_var;
   17154           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17155           0 :                         if (PyErr_Occurred() != NULL) {
   17156           0 :                                 return -1;
   17157             :                         }
   17158           0 :                         if (test_var > uint_max) {
   17159           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   17160             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17161           0 :                                 return -1;
   17162             :                         }
   17163           0 :                         object->logon_attempts = test_var;
   17164             :                 } else {
   17165           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   17166             :                           PyLong_Type.tp_name);
   17167           0 :                         return -1;
   17168             :                 }
   17169             :         }
   17170           0 :         return 0;
   17171             : }
   17172             : 
   17173           0 : static PyObject *py_netr_NETLOGON_INFO_3_get_unknown1(PyObject *obj, void *closure)
   17174             : {
   17175           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(obj);
   17176             :         PyObject *py_unknown1;
   17177           0 :         py_unknown1 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown1);
   17178           0 :         return py_unknown1;
   17179             : }
   17180             : 
   17181           0 : static int py_netr_NETLOGON_INFO_3_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   17182             : {
   17183           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(py_obj);
   17184           0 :         if (value == NULL) {
   17185           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
   17186           0 :                 return -1;
   17187             :         }
   17188             :         {
   17189           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown1));
   17190           0 :                 if (PyLong_Check(value)) {
   17191             :                         unsigned long long test_var;
   17192           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17193           0 :                         if (PyErr_Occurred() != NULL) {
   17194           0 :                                 return -1;
   17195             :                         }
   17196           0 :                         if (test_var > uint_max) {
   17197           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   17198             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17199           0 :                                 return -1;
   17200             :                         }
   17201           0 :                         object->unknown1 = test_var;
   17202             :                 } else {
   17203           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   17204             :                           PyLong_Type.tp_name);
   17205           0 :                         return -1;
   17206             :                 }
   17207             :         }
   17208           0 :         return 0;
   17209             : }
   17210             : 
   17211           0 : static PyObject *py_netr_NETLOGON_INFO_3_get_unknown2(PyObject *obj, void *closure)
   17212             : {
   17213           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(obj);
   17214             :         PyObject *py_unknown2;
   17215           0 :         py_unknown2 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown2);
   17216           0 :         return py_unknown2;
   17217             : }
   17218             : 
   17219           0 : static int py_netr_NETLOGON_INFO_3_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   17220             : {
   17221           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(py_obj);
   17222           0 :         if (value == NULL) {
   17223           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
   17224           0 :                 return -1;
   17225             :         }
   17226             :         {
   17227           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown2));
   17228           0 :                 if (PyLong_Check(value)) {
   17229             :                         unsigned long long test_var;
   17230           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17231           0 :                         if (PyErr_Occurred() != NULL) {
   17232           0 :                                 return -1;
   17233             :                         }
   17234           0 :                         if (test_var > uint_max) {
   17235           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   17236             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17237           0 :                                 return -1;
   17238             :                         }
   17239           0 :                         object->unknown2 = test_var;
   17240             :                 } else {
   17241           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   17242             :                           PyLong_Type.tp_name);
   17243           0 :                         return -1;
   17244             :                 }
   17245             :         }
   17246           0 :         return 0;
   17247             : }
   17248             : 
   17249           0 : static PyObject *py_netr_NETLOGON_INFO_3_get_unknown3(PyObject *obj, void *closure)
   17250             : {
   17251           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(obj);
   17252             :         PyObject *py_unknown3;
   17253           0 :         py_unknown3 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown3);
   17254           0 :         return py_unknown3;
   17255             : }
   17256             : 
   17257           0 : static int py_netr_NETLOGON_INFO_3_set_unknown3(PyObject *py_obj, PyObject *value, void *closure)
   17258             : {
   17259           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(py_obj);
   17260           0 :         if (value == NULL) {
   17261           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown3");
   17262           0 :                 return -1;
   17263             :         }
   17264             :         {
   17265           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown3));
   17266           0 :                 if (PyLong_Check(value)) {
   17267             :                         unsigned long long test_var;
   17268           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17269           0 :                         if (PyErr_Occurred() != NULL) {
   17270           0 :                                 return -1;
   17271             :                         }
   17272           0 :                         if (test_var > uint_max) {
   17273           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   17274             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17275           0 :                                 return -1;
   17276             :                         }
   17277           0 :                         object->unknown3 = test_var;
   17278             :                 } else {
   17279           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   17280             :                           PyLong_Type.tp_name);
   17281           0 :                         return -1;
   17282             :                 }
   17283             :         }
   17284           0 :         return 0;
   17285             : }
   17286             : 
   17287           0 : static PyObject *py_netr_NETLOGON_INFO_3_get_unknown4(PyObject *obj, void *closure)
   17288             : {
   17289           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(obj);
   17290             :         PyObject *py_unknown4;
   17291           0 :         py_unknown4 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown4);
   17292           0 :         return py_unknown4;
   17293             : }
   17294             : 
   17295           0 : static int py_netr_NETLOGON_INFO_3_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   17296             : {
   17297           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(py_obj);
   17298           0 :         if (value == NULL) {
   17299           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
   17300           0 :                 return -1;
   17301             :         }
   17302             :         {
   17303           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown4));
   17304           0 :                 if (PyLong_Check(value)) {
   17305             :                         unsigned long long test_var;
   17306           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17307           0 :                         if (PyErr_Occurred() != NULL) {
   17308           0 :                                 return -1;
   17309             :                         }
   17310           0 :                         if (test_var > uint_max) {
   17311           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   17312             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17313           0 :                                 return -1;
   17314             :                         }
   17315           0 :                         object->unknown4 = test_var;
   17316             :                 } else {
   17317           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   17318             :                           PyLong_Type.tp_name);
   17319           0 :                         return -1;
   17320             :                 }
   17321             :         }
   17322           0 :         return 0;
   17323             : }
   17324             : 
   17325           0 : static PyObject *py_netr_NETLOGON_INFO_3_get_unknown5(PyObject *obj, void *closure)
   17326             : {
   17327           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(obj);
   17328             :         PyObject *py_unknown5;
   17329           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown5);
   17330           0 :         return py_unknown5;
   17331             : }
   17332             : 
   17333           0 : static int py_netr_NETLOGON_INFO_3_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
   17334             : {
   17335           0 :         struct netr_NETLOGON_INFO_3 *object = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(py_obj);
   17336           0 :         if (value == NULL) {
   17337           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown5");
   17338           0 :                 return -1;
   17339             :         }
   17340             :         {
   17341           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
   17342           0 :                 if (PyLong_Check(value)) {
   17343             :                         unsigned long long test_var;
   17344           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17345           0 :                         if (PyErr_Occurred() != NULL) {
   17346           0 :                                 return -1;
   17347             :                         }
   17348           0 :                         if (test_var > uint_max) {
   17349           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   17350             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17351           0 :                                 return -1;
   17352             :                         }
   17353           0 :                         object->unknown5 = test_var;
   17354             :                 } else {
   17355           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   17356             :                           PyLong_Type.tp_name);
   17357           0 :                         return -1;
   17358             :                 }
   17359             :         }
   17360           0 :         return 0;
   17361             : }
   17362             : 
   17363             : static PyGetSetDef py_netr_NETLOGON_INFO_3_getsetters[] = {
   17364             :         {
   17365             :                 .name = discard_const_p(char, "flags"),
   17366             :                 .get = py_netr_NETLOGON_INFO_3_get_flags,
   17367             :                 .set = py_netr_NETLOGON_INFO_3_set_flags,
   17368             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_InfoFlags")
   17369             :         },
   17370             :         {
   17371             :                 .name = discard_const_p(char, "logon_attempts"),
   17372             :                 .get = py_netr_NETLOGON_INFO_3_get_logon_attempts,
   17373             :                 .set = py_netr_NETLOGON_INFO_3_set_logon_attempts,
   17374             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17375             :         },
   17376             :         {
   17377             :                 .name = discard_const_p(char, "unknown1"),
   17378             :                 .get = py_netr_NETLOGON_INFO_3_get_unknown1,
   17379             :                 .set = py_netr_NETLOGON_INFO_3_set_unknown1,
   17380             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17381             :         },
   17382             :         {
   17383             :                 .name = discard_const_p(char, "unknown2"),
   17384             :                 .get = py_netr_NETLOGON_INFO_3_get_unknown2,
   17385             :                 .set = py_netr_NETLOGON_INFO_3_set_unknown2,
   17386             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17387             :         },
   17388             :         {
   17389             :                 .name = discard_const_p(char, "unknown3"),
   17390             :                 .get = py_netr_NETLOGON_INFO_3_get_unknown3,
   17391             :                 .set = py_netr_NETLOGON_INFO_3_set_unknown3,
   17392             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17393             :         },
   17394             :         {
   17395             :                 .name = discard_const_p(char, "unknown4"),
   17396             :                 .get = py_netr_NETLOGON_INFO_3_get_unknown4,
   17397             :                 .set = py_netr_NETLOGON_INFO_3_set_unknown4,
   17398             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17399             :         },
   17400             :         {
   17401             :                 .name = discard_const_p(char, "unknown5"),
   17402             :                 .get = py_netr_NETLOGON_INFO_3_get_unknown5,
   17403             :                 .set = py_netr_NETLOGON_INFO_3_set_unknown5,
   17404             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17405             :         },
   17406             :         { .name = NULL }
   17407             : };
   17408             : 
   17409           0 : static PyObject *py_netr_NETLOGON_INFO_3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17410             : {
   17411           0 :         return pytalloc_new(struct netr_NETLOGON_INFO_3, type);
   17412             : }
   17413             : 
   17414             : 
   17415             : static PyTypeObject netr_NETLOGON_INFO_3_Type = {
   17416             :         PyVarObject_HEAD_INIT(NULL, 0)
   17417             :         .tp_name = "netlogon.netr_NETLOGON_INFO_3",
   17418             :         .tp_getset = py_netr_NETLOGON_INFO_3_getsetters,
   17419             :         .tp_methods = NULL,
   17420             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17421             :         .tp_new = py_netr_NETLOGON_INFO_3_new,
   17422             : };
   17423             : 
   17424             : 
   17425           0 : static PyObject *py_netr_NETLOGON_INFO_4_get_trusted_dc_name(PyObject *obj, void *closure)
   17426             : {
   17427           0 :         struct netr_NETLOGON_INFO_4 *object = (struct netr_NETLOGON_INFO_4 *)pytalloc_get_ptr(obj);
   17428             :         PyObject *py_trusted_dc_name;
   17429           0 :         if (object->trusted_dc_name == NULL) {
   17430           0 :                 Py_RETURN_NONE;
   17431             :         }
   17432           0 :         if (object->trusted_dc_name == NULL) {
   17433           0 :                 py_trusted_dc_name = Py_None;
   17434           0 :                 Py_INCREF(py_trusted_dc_name);
   17435             :         } else {
   17436           0 :                 if (object->trusted_dc_name == NULL) {
   17437           0 :                         py_trusted_dc_name = Py_None;
   17438           0 :                         Py_INCREF(py_trusted_dc_name);
   17439             :                 } else {
   17440           0 :                         py_trusted_dc_name = PyUnicode_Decode(object->trusted_dc_name, strlen(object->trusted_dc_name), "utf-8", "ignore");
   17441             :                 }
   17442             :         }
   17443           0 :         return py_trusted_dc_name;
   17444             : }
   17445             : 
   17446           0 : static int py_netr_NETLOGON_INFO_4_set_trusted_dc_name(PyObject *py_obj, PyObject *value, void *closure)
   17447             : {
   17448           0 :         struct netr_NETLOGON_INFO_4 *object = (struct netr_NETLOGON_INFO_4 *)pytalloc_get_ptr(py_obj);
   17449           0 :         if (value == NULL) {
   17450           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->trusted_dc_name");
   17451           0 :                 return -1;
   17452             :         }
   17453           0 :         if (value == Py_None) {
   17454           0 :                 object->trusted_dc_name = NULL;
   17455             :         } else {
   17456           0 :                 object->trusted_dc_name = NULL;
   17457             :                 {
   17458             :                         const char *test_str;
   17459             :                         const char *talloc_str;
   17460           0 :                         PyObject *unicode = NULL;
   17461           0 :                         if (PyUnicode_Check(value)) {
   17462           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   17463           0 :                                 if (unicode == NULL) {
   17464           0 :                                         PyErr_NoMemory();
   17465           0 :                                         return -1;
   17466             :                                 }
   17467           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   17468           0 :                         } else if (PyBytes_Check(value)) {
   17469           0 :                                 test_str = PyBytes_AS_STRING(value);
   17470             :                         } else {
   17471           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   17472           0 :                                 return -1;
   17473             :                         }
   17474           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   17475           0 :                         if (unicode != NULL) {
   17476           0 :                                 Py_DECREF(unicode);
   17477             :                         }
   17478           0 :                         if (talloc_str == NULL) {
   17479           0 :                                 PyErr_NoMemory();
   17480           0 :                                 return -1;
   17481             :                         }
   17482           0 :                         object->trusted_dc_name = talloc_str;
   17483             :                 }
   17484             :         }
   17485           0 :         return 0;
   17486             : }
   17487             : 
   17488           0 : static PyObject *py_netr_NETLOGON_INFO_4_get_trusted_domain_name(PyObject *obj, void *closure)
   17489             : {
   17490           0 :         struct netr_NETLOGON_INFO_4 *object = (struct netr_NETLOGON_INFO_4 *)pytalloc_get_ptr(obj);
   17491             :         PyObject *py_trusted_domain_name;
   17492           0 :         if (object->trusted_domain_name == NULL) {
   17493           0 :                 Py_RETURN_NONE;
   17494             :         }
   17495           0 :         if (object->trusted_domain_name == NULL) {
   17496           0 :                 py_trusted_domain_name = Py_None;
   17497           0 :                 Py_INCREF(py_trusted_domain_name);
   17498             :         } else {
   17499           0 :                 if (object->trusted_domain_name == NULL) {
   17500           0 :                         py_trusted_domain_name = Py_None;
   17501           0 :                         Py_INCREF(py_trusted_domain_name);
   17502             :                 } else {
   17503           0 :                         py_trusted_domain_name = PyUnicode_Decode(object->trusted_domain_name, strlen(object->trusted_domain_name), "utf-8", "ignore");
   17504             :                 }
   17505             :         }
   17506           0 :         return py_trusted_domain_name;
   17507             : }
   17508             : 
   17509           0 : static int py_netr_NETLOGON_INFO_4_set_trusted_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   17510             : {
   17511           0 :         struct netr_NETLOGON_INFO_4 *object = (struct netr_NETLOGON_INFO_4 *)pytalloc_get_ptr(py_obj);
   17512           0 :         if (value == NULL) {
   17513           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->trusted_domain_name");
   17514           0 :                 return -1;
   17515             :         }
   17516           0 :         if (value == Py_None) {
   17517           0 :                 object->trusted_domain_name = NULL;
   17518             :         } else {
   17519           0 :                 object->trusted_domain_name = NULL;
   17520             :                 {
   17521             :                         const char *test_str;
   17522             :                         const char *talloc_str;
   17523           0 :                         PyObject *unicode = NULL;
   17524           0 :                         if (PyUnicode_Check(value)) {
   17525           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   17526           0 :                                 if (unicode == NULL) {
   17527           0 :                                         PyErr_NoMemory();
   17528           0 :                                         return -1;
   17529             :                                 }
   17530           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   17531           0 :                         } else if (PyBytes_Check(value)) {
   17532           0 :                                 test_str = PyBytes_AS_STRING(value);
   17533             :                         } else {
   17534           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   17535           0 :                                 return -1;
   17536             :                         }
   17537           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   17538           0 :                         if (unicode != NULL) {
   17539           0 :                                 Py_DECREF(unicode);
   17540             :                         }
   17541           0 :                         if (talloc_str == NULL) {
   17542           0 :                                 PyErr_NoMemory();
   17543           0 :                                 return -1;
   17544             :                         }
   17545           0 :                         object->trusted_domain_name = talloc_str;
   17546             :                 }
   17547             :         }
   17548           0 :         return 0;
   17549             : }
   17550             : 
   17551             : static PyGetSetDef py_netr_NETLOGON_INFO_4_getsetters[] = {
   17552             :         {
   17553             :                 .name = discard_const_p(char, "trusted_dc_name"),
   17554             :                 .get = py_netr_NETLOGON_INFO_4_get_trusted_dc_name,
   17555             :                 .set = py_netr_NETLOGON_INFO_4_set_trusted_dc_name,
   17556             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   17557             :         },
   17558             :         {
   17559             :                 .name = discard_const_p(char, "trusted_domain_name"),
   17560             :                 .get = py_netr_NETLOGON_INFO_4_get_trusted_domain_name,
   17561             :                 .set = py_netr_NETLOGON_INFO_4_set_trusted_domain_name,
   17562             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   17563             :         },
   17564             :         { .name = NULL }
   17565             : };
   17566             : 
   17567           0 : static PyObject *py_netr_NETLOGON_INFO_4_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17568             : {
   17569           0 :         return pytalloc_new(struct netr_NETLOGON_INFO_4, type);
   17570             : }
   17571             : 
   17572             : 
   17573             : static PyTypeObject netr_NETLOGON_INFO_4_Type = {
   17574             :         PyVarObject_HEAD_INIT(NULL, 0)
   17575             :         .tp_name = "netlogon.netr_NETLOGON_INFO_4",
   17576             :         .tp_getset = py_netr_NETLOGON_INFO_4_getsetters,
   17577             :         .tp_methods = NULL,
   17578             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17579             :         .tp_new = py_netr_NETLOGON_INFO_4_new,
   17580             : };
   17581             : 
   17582          81 : static PyObject *py_import_netr_CONTROL_QUERY_INFORMATION(TALLOC_CTX *mem_ctx, int level, union netr_CONTROL_QUERY_INFORMATION *in)
   17583             : {
   17584             :         PyObject *ret;
   17585             : 
   17586          81 :         switch (level) {
   17587           0 :                 case 1:
   17588           0 :                         if (in->info1 == NULL) {
   17589           0 :                                 ret = Py_None;
   17590           0 :                                 Py_INCREF(ret);
   17591             :                         } else {
   17592           0 :                                 ret = pytalloc_reference_ex(&netr_NETLOGON_INFO_1_Type, in->info1, in->info1);
   17593             :                         }
   17594           0 :                         return ret;
   17595             : 
   17596          81 :                 case 2:
   17597          81 :                         if (in->info2 == NULL) {
   17598           0 :                                 ret = Py_None;
   17599           0 :                                 Py_INCREF(ret);
   17600             :                         } else {
   17601          81 :                                 ret = pytalloc_reference_ex(&netr_NETLOGON_INFO_2_Type, in->info2, in->info2);
   17602             :                         }
   17603          81 :                         return ret;
   17604             : 
   17605           0 :                 case 3:
   17606           0 :                         if (in->info3 == NULL) {
   17607           0 :                                 ret = Py_None;
   17608           0 :                                 Py_INCREF(ret);
   17609             :                         } else {
   17610           0 :                                 ret = pytalloc_reference_ex(&netr_NETLOGON_INFO_3_Type, in->info3, in->info3);
   17611             :                         }
   17612           0 :                         return ret;
   17613             : 
   17614           0 :                 case 4:
   17615           0 :                         if (in->info4 == NULL) {
   17616           0 :                                 ret = Py_None;
   17617           0 :                                 Py_INCREF(ret);
   17618             :                         } else {
   17619           0 :                                 ret = pytalloc_reference_ex(&netr_NETLOGON_INFO_4_Type, in->info4, in->info4);
   17620             :                         }
   17621           0 :                         return ret;
   17622             : 
   17623           0 :                 default:
   17624           0 :                         ret = Py_None;
   17625           0 :                         Py_INCREF(ret);
   17626           0 :                         return ret;
   17627             : 
   17628             :         }
   17629             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   17630             :         return NULL;
   17631             : }
   17632             : 
   17633           0 : static union netr_CONTROL_QUERY_INFORMATION *py_export_netr_CONTROL_QUERY_INFORMATION(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   17634             : {
   17635           0 :         union netr_CONTROL_QUERY_INFORMATION *ret = talloc_zero(mem_ctx, union netr_CONTROL_QUERY_INFORMATION);
   17636           0 :         switch (level) {
   17637           0 :                 case 1:
   17638           0 :                         if (in == NULL) {
   17639           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1");
   17640           0 :                                 talloc_free(ret); return NULL;
   17641             :                         }
   17642           0 :                         if (in == Py_None) {
   17643           0 :                                 ret->info1 = NULL;
   17644             :                         } else {
   17645           0 :                                 ret->info1 = NULL;
   17646           0 :                                 PY_CHECK_TYPE(&netr_NETLOGON_INFO_1_Type, in, talloc_free(ret); return NULL;);
   17647           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   17648           0 :                                         PyErr_NoMemory();
   17649           0 :                                         talloc_free(ret); return NULL;
   17650             :                                 }
   17651           0 :                                 ret->info1 = (struct netr_NETLOGON_INFO_1 *)pytalloc_get_ptr(in);
   17652             :                         }
   17653           0 :                         break;
   17654             : 
   17655           0 :                 case 2:
   17656           0 :                         if (in == NULL) {
   17657           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info2");
   17658           0 :                                 talloc_free(ret); return NULL;
   17659             :                         }
   17660           0 :                         if (in == Py_None) {
   17661           0 :                                 ret->info2 = NULL;
   17662             :                         } else {
   17663           0 :                                 ret->info2 = NULL;
   17664           0 :                                 PY_CHECK_TYPE(&netr_NETLOGON_INFO_2_Type, in, talloc_free(ret); return NULL;);
   17665           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   17666           0 :                                         PyErr_NoMemory();
   17667           0 :                                         talloc_free(ret); return NULL;
   17668             :                                 }
   17669           0 :                                 ret->info2 = (struct netr_NETLOGON_INFO_2 *)pytalloc_get_ptr(in);
   17670             :                         }
   17671           0 :                         break;
   17672             : 
   17673           0 :                 case 3:
   17674           0 :                         if (in == NULL) {
   17675           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info3");
   17676           0 :                                 talloc_free(ret); return NULL;
   17677             :                         }
   17678           0 :                         if (in == Py_None) {
   17679           0 :                                 ret->info3 = NULL;
   17680             :                         } else {
   17681           0 :                                 ret->info3 = NULL;
   17682           0 :                                 PY_CHECK_TYPE(&netr_NETLOGON_INFO_3_Type, in, talloc_free(ret); return NULL;);
   17683           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   17684           0 :                                         PyErr_NoMemory();
   17685           0 :                                         talloc_free(ret); return NULL;
   17686             :                                 }
   17687           0 :                                 ret->info3 = (struct netr_NETLOGON_INFO_3 *)pytalloc_get_ptr(in);
   17688             :                         }
   17689           0 :                         break;
   17690             : 
   17691           0 :                 case 4:
   17692           0 :                         if (in == NULL) {
   17693           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info4");
   17694           0 :                                 talloc_free(ret); return NULL;
   17695             :                         }
   17696           0 :                         if (in == Py_None) {
   17697           0 :                                 ret->info4 = NULL;
   17698             :                         } else {
   17699           0 :                                 ret->info4 = NULL;
   17700           0 :                                 PY_CHECK_TYPE(&netr_NETLOGON_INFO_4_Type, in, talloc_free(ret); return NULL;);
   17701           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   17702           0 :                                         PyErr_NoMemory();
   17703           0 :                                         talloc_free(ret); return NULL;
   17704             :                                 }
   17705           0 :                                 ret->info4 = (struct netr_NETLOGON_INFO_4 *)pytalloc_get_ptr(in);
   17706             :                         }
   17707           0 :                         break;
   17708             : 
   17709           0 :                 default:
   17710           0 :                         break;
   17711             : 
   17712             :         }
   17713             : 
   17714           0 :         return ret;
   17715             : }
   17716             : 
   17717          81 : static PyObject *py_netr_CONTROL_QUERY_INFORMATION_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17718             : {
   17719          81 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   17720          81 :         PyObject *mem_ctx_obj = NULL;
   17721          81 :         TALLOC_CTX *mem_ctx = NULL;
   17722          81 :         int level = 0;
   17723          81 :         PyObject *in_obj = NULL;
   17724          81 :         union netr_CONTROL_QUERY_INFORMATION *in = NULL;
   17725             : 
   17726          81 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   17727             :                 discard_const_p(char *, kwnames),
   17728             :                 &mem_ctx_obj,
   17729             :                 &level,
   17730             :                 &in_obj)) {
   17731           0 :                 return NULL;
   17732             :         }
   17733          81 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   17734          81 :         if (mem_ctx == NULL) {
   17735           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   17736           0 :                 return NULL;
   17737             :         }
   17738          81 :         in = (union netr_CONTROL_QUERY_INFORMATION *)pytalloc_get_ptr(in_obj);
   17739          81 :         if (in == NULL) {
   17740           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_CONTROL_QUERY_INFORMATION!");
   17741           0 :                 return NULL;
   17742             :         }
   17743             : 
   17744          81 :         return py_import_netr_CONTROL_QUERY_INFORMATION(mem_ctx, level, in);
   17745             : }
   17746             : 
   17747           0 : static PyObject *py_netr_CONTROL_QUERY_INFORMATION_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17748             : {
   17749           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   17750           0 :         PyObject *mem_ctx_obj = NULL;
   17751           0 :         TALLOC_CTX *mem_ctx = NULL;
   17752           0 :         int level = 0;
   17753           0 :         PyObject *in = NULL;
   17754           0 :         union netr_CONTROL_QUERY_INFORMATION *out = NULL;
   17755             : 
   17756           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   17757             :                 discard_const_p(char *, kwnames),
   17758             :                 &mem_ctx_obj,
   17759             :                 &level,
   17760             :                 &in)) {
   17761           0 :                 return NULL;
   17762             :         }
   17763           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   17764           0 :         if (mem_ctx == NULL) {
   17765           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   17766           0 :                 return NULL;
   17767             :         }
   17768             : 
   17769           0 :         out = py_export_netr_CONTROL_QUERY_INFORMATION(mem_ctx, level, in);
   17770           0 :         if (out == NULL) {
   17771           0 :                 return NULL;
   17772             :         }
   17773             : 
   17774           0 :         return pytalloc_GenericObject_reference(out);
   17775             : }
   17776             : 
   17777             : static PyMethodDef py_netr_CONTROL_QUERY_INFORMATION_methods[] = {
   17778             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_CONTROL_QUERY_INFORMATION_import),
   17779             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   17780             :                 "T.__import__(mem_ctx, level, in) => ret." },
   17781             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_CONTROL_QUERY_INFORMATION_export),
   17782             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   17783             :                 "T.__export__(mem_ctx, level, in) => ret." },
   17784             :         { NULL, NULL, 0, NULL }
   17785             : };
   17786             : 
   17787           0 : static PyObject *py_netr_CONTROL_QUERY_INFORMATION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17788             : {
   17789           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   17790           0 :         return NULL;
   17791             : }
   17792             : 
   17793             : 
   17794             : static PyTypeObject netr_CONTROL_QUERY_INFORMATION_Type = {
   17795             :         PyVarObject_HEAD_INIT(NULL, 0)
   17796             :         .tp_name = "netlogon.netr_CONTROL_QUERY_INFORMATION",
   17797             :         .tp_getset = NULL,
   17798             :         .tp_methods = py_netr_CONTROL_QUERY_INFORMATION_methods,
   17799             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17800             :         .tp_new = py_netr_CONTROL_QUERY_INFORMATION_new,
   17801             : };
   17802             : 
   17803           0 : static PyObject *py_import_netr_CONTROL_DATA_INFORMATION(TALLOC_CTX *mem_ctx, int level, union netr_CONTROL_DATA_INFORMATION *in)
   17804             : {
   17805             :         PyObject *ret;
   17806             : 
   17807           0 :         switch (level) {
   17808           0 :                 case NETLOGON_CONTROL_REDISCOVER:
   17809           0 :                         if (in->domain == NULL) {
   17810           0 :                                 ret = Py_None;
   17811           0 :                                 Py_INCREF(ret);
   17812             :                         } else {
   17813           0 :                                 if (in->domain == NULL) {
   17814           0 :                                         ret = Py_None;
   17815           0 :                                         Py_INCREF(ret);
   17816             :                                 } else {
   17817           0 :                                         ret = PyUnicode_Decode(in->domain, strlen(in->domain), "utf-8", "ignore");
   17818             :                                 }
   17819             :                         }
   17820           0 :                         return ret;
   17821             : 
   17822           0 :                 case NETLOGON_CONTROL_TC_QUERY:
   17823           0 :                         if (in->domain == NULL) {
   17824           0 :                                 ret = Py_None;
   17825           0 :                                 Py_INCREF(ret);
   17826             :                         } else {
   17827           0 :                                 if (in->domain == NULL) {
   17828           0 :                                         ret = Py_None;
   17829           0 :                                         Py_INCREF(ret);
   17830             :                                 } else {
   17831           0 :                                         ret = PyUnicode_Decode(in->domain, strlen(in->domain), "utf-8", "ignore");
   17832             :                                 }
   17833             :                         }
   17834           0 :                         return ret;
   17835             : 
   17836           0 :                 case NETLOGON_CONTROL_TRANSPORT_NOTIFY:
   17837           0 :                         if (in->domain == NULL) {
   17838           0 :                                 ret = Py_None;
   17839           0 :                                 Py_INCREF(ret);
   17840             :                         } else {
   17841           0 :                                 if (in->domain == NULL) {
   17842           0 :                                         ret = Py_None;
   17843           0 :                                         Py_INCREF(ret);
   17844             :                                 } else {
   17845           0 :                                         ret = PyUnicode_Decode(in->domain, strlen(in->domain), "utf-8", "ignore");
   17846             :                                 }
   17847             :                         }
   17848           0 :                         return ret;
   17849             : 
   17850           0 :                 case NETLOGON_CONTROL_CHANGE_PASSWORD:
   17851           0 :                         if (in->domain == NULL) {
   17852           0 :                                 ret = Py_None;
   17853           0 :                                 Py_INCREF(ret);
   17854             :                         } else {
   17855           0 :                                 if (in->domain == NULL) {
   17856           0 :                                         ret = Py_None;
   17857           0 :                                         Py_INCREF(ret);
   17858             :                                 } else {
   17859           0 :                                         ret = PyUnicode_Decode(in->domain, strlen(in->domain), "utf-8", "ignore");
   17860             :                                 }
   17861             :                         }
   17862           0 :                         return ret;
   17863             : 
   17864           0 :                 case NETLOGON_CONTROL_TC_VERIFY:
   17865           0 :                         if (in->domain == NULL) {
   17866           0 :                                 ret = Py_None;
   17867           0 :                                 Py_INCREF(ret);
   17868             :                         } else {
   17869           0 :                                 if (in->domain == NULL) {
   17870           0 :                                         ret = Py_None;
   17871           0 :                                         Py_INCREF(ret);
   17872             :                                 } else {
   17873           0 :                                         ret = PyUnicode_Decode(in->domain, strlen(in->domain), "utf-8", "ignore");
   17874             :                                 }
   17875             :                         }
   17876           0 :                         return ret;
   17877             : 
   17878           0 :                 case NETLOGON_CONTROL_FIND_USER:
   17879           0 :                         if (in->user == NULL) {
   17880           0 :                                 ret = Py_None;
   17881           0 :                                 Py_INCREF(ret);
   17882             :                         } else {
   17883           0 :                                 if (in->user == NULL) {
   17884           0 :                                         ret = Py_None;
   17885           0 :                                         Py_INCREF(ret);
   17886             :                                 } else {
   17887           0 :                                         ret = PyUnicode_Decode(in->user, strlen(in->user), "utf-8", "ignore");
   17888             :                                 }
   17889             :                         }
   17890           0 :                         return ret;
   17891             : 
   17892           0 :                 case NETLOGON_CONTROL_SET_DBFLAG:
   17893           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->debug_level);
   17894           0 :                         return ret;
   17895             : 
   17896           0 :                 default:
   17897           0 :                         ret = Py_None;
   17898           0 :                         Py_INCREF(ret);
   17899           0 :                         return ret;
   17900             : 
   17901             :         }
   17902             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   17903             :         return NULL;
   17904             : }
   17905             : 
   17906          81 : static union netr_CONTROL_DATA_INFORMATION *py_export_netr_CONTROL_DATA_INFORMATION(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   17907             : {
   17908          81 :         union netr_CONTROL_DATA_INFORMATION *ret = talloc_zero(mem_ctx, union netr_CONTROL_DATA_INFORMATION);
   17909          81 :         switch (level) {
   17910          28 :                 case NETLOGON_CONTROL_REDISCOVER:
   17911          28 :                         if (in == NULL) {
   17912           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->domain");
   17913           0 :                                 talloc_free(ret); return NULL;
   17914             :                         }
   17915          28 :                         if (in == Py_None) {
   17916           0 :                                 ret->domain = NULL;
   17917             :                         } else {
   17918          28 :                                 ret->domain = NULL;
   17919             :                                 {
   17920             :                                         const char *test_str;
   17921             :                                         const char *talloc_str;
   17922          28 :                                         PyObject *unicode = NULL;
   17923          28 :                                         if (PyUnicode_Check(in)) {
   17924          28 :                                                 unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   17925          28 :                                                 if (unicode == NULL) {
   17926           0 :                                                         PyErr_NoMemory();
   17927           0 :                                                         talloc_free(ret); return NULL;
   17928             :                                                 }
   17929          28 :                                                 test_str = PyBytes_AS_STRING(unicode);
   17930           0 :                                         } else if (PyBytes_Check(in)) {
   17931           0 :                                                 test_str = PyBytes_AS_STRING(in);
   17932             :                                         } else {
   17933           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   17934           0 :                                                 talloc_free(ret); return NULL;
   17935             :                                         }
   17936          28 :                                         talloc_str = talloc_strdup(mem_ctx, test_str);
   17937          28 :                                         if (unicode != NULL) {
   17938          28 :                                                 Py_DECREF(unicode);
   17939             :                                         }
   17940          28 :                                         if (talloc_str == NULL) {
   17941           0 :                                                 PyErr_NoMemory();
   17942           0 :                                                 talloc_free(ret); return NULL;
   17943             :                                         }
   17944          28 :                                         ret->domain = talloc_str;
   17945             :                                 }
   17946             :                         }
   17947          28 :                         break;
   17948             : 
   17949           0 :                 case NETLOGON_CONTROL_TC_QUERY:
   17950           0 :                         if (in == NULL) {
   17951           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->domain");
   17952           0 :                                 talloc_free(ret); return NULL;
   17953             :                         }
   17954           0 :                         if (in == Py_None) {
   17955           0 :                                 ret->domain = NULL;
   17956             :                         } else {
   17957           0 :                                 ret->domain = NULL;
   17958             :                                 {
   17959             :                                         const char *test_str;
   17960             :                                         const char *talloc_str;
   17961           0 :                                         PyObject *unicode = NULL;
   17962           0 :                                         if (PyUnicode_Check(in)) {
   17963           0 :                                                 unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   17964           0 :                                                 if (unicode == NULL) {
   17965           0 :                                                         PyErr_NoMemory();
   17966           0 :                                                         talloc_free(ret); return NULL;
   17967             :                                                 }
   17968           0 :                                                 test_str = PyBytes_AS_STRING(unicode);
   17969           0 :                                         } else if (PyBytes_Check(in)) {
   17970           0 :                                                 test_str = PyBytes_AS_STRING(in);
   17971             :                                         } else {
   17972           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   17973           0 :                                                 talloc_free(ret); return NULL;
   17974             :                                         }
   17975           0 :                                         talloc_str = talloc_strdup(mem_ctx, test_str);
   17976           0 :                                         if (unicode != NULL) {
   17977           0 :                                                 Py_DECREF(unicode);
   17978             :                                         }
   17979           0 :                                         if (talloc_str == NULL) {
   17980           0 :                                                 PyErr_NoMemory();
   17981           0 :                                                 talloc_free(ret); return NULL;
   17982             :                                         }
   17983           0 :                                         ret->domain = talloc_str;
   17984             :                                 }
   17985             :                         }
   17986           0 :                         break;
   17987             : 
   17988           0 :                 case NETLOGON_CONTROL_TRANSPORT_NOTIFY:
   17989           0 :                         if (in == NULL) {
   17990           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->domain");
   17991           0 :                                 talloc_free(ret); return NULL;
   17992             :                         }
   17993           0 :                         if (in == Py_None) {
   17994           0 :                                 ret->domain = NULL;
   17995             :                         } else {
   17996           0 :                                 ret->domain = NULL;
   17997             :                                 {
   17998             :                                         const char *test_str;
   17999             :                                         const char *talloc_str;
   18000           0 :                                         PyObject *unicode = NULL;
   18001           0 :                                         if (PyUnicode_Check(in)) {
   18002           0 :                                                 unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   18003           0 :                                                 if (unicode == NULL) {
   18004           0 :                                                         PyErr_NoMemory();
   18005           0 :                                                         talloc_free(ret); return NULL;
   18006             :                                                 }
   18007           0 :                                                 test_str = PyBytes_AS_STRING(unicode);
   18008           0 :                                         } else if (PyBytes_Check(in)) {
   18009           0 :                                                 test_str = PyBytes_AS_STRING(in);
   18010             :                                         } else {
   18011           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   18012           0 :                                                 talloc_free(ret); return NULL;
   18013             :                                         }
   18014           0 :                                         talloc_str = talloc_strdup(mem_ctx, test_str);
   18015           0 :                                         if (unicode != NULL) {
   18016           0 :                                                 Py_DECREF(unicode);
   18017             :                                         }
   18018           0 :                                         if (talloc_str == NULL) {
   18019           0 :                                                 PyErr_NoMemory();
   18020           0 :                                                 talloc_free(ret); return NULL;
   18021             :                                         }
   18022           0 :                                         ret->domain = talloc_str;
   18023             :                                 }
   18024             :                         }
   18025           0 :                         break;
   18026             : 
   18027           0 :                 case NETLOGON_CONTROL_CHANGE_PASSWORD:
   18028           0 :                         if (in == NULL) {
   18029           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->domain");
   18030           0 :                                 talloc_free(ret); return NULL;
   18031             :                         }
   18032           0 :                         if (in == Py_None) {
   18033           0 :                                 ret->domain = NULL;
   18034             :                         } else {
   18035           0 :                                 ret->domain = NULL;
   18036             :                                 {
   18037             :                                         const char *test_str;
   18038             :                                         const char *talloc_str;
   18039           0 :                                         PyObject *unicode = NULL;
   18040           0 :                                         if (PyUnicode_Check(in)) {
   18041           0 :                                                 unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   18042           0 :                                                 if (unicode == NULL) {
   18043           0 :                                                         PyErr_NoMemory();
   18044           0 :                                                         talloc_free(ret); return NULL;
   18045             :                                                 }
   18046           0 :                                                 test_str = PyBytes_AS_STRING(unicode);
   18047           0 :                                         } else if (PyBytes_Check(in)) {
   18048           0 :                                                 test_str = PyBytes_AS_STRING(in);
   18049             :                                         } else {
   18050           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   18051           0 :                                                 talloc_free(ret); return NULL;
   18052             :                                         }
   18053           0 :                                         talloc_str = talloc_strdup(mem_ctx, test_str);
   18054           0 :                                         if (unicode != NULL) {
   18055           0 :                                                 Py_DECREF(unicode);
   18056             :                                         }
   18057           0 :                                         if (talloc_str == NULL) {
   18058           0 :                                                 PyErr_NoMemory();
   18059           0 :                                                 talloc_free(ret); return NULL;
   18060             :                                         }
   18061           0 :                                         ret->domain = talloc_str;
   18062             :                                 }
   18063             :                         }
   18064           0 :                         break;
   18065             : 
   18066          53 :                 case NETLOGON_CONTROL_TC_VERIFY:
   18067          53 :                         if (in == NULL) {
   18068           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->domain");
   18069           0 :                                 talloc_free(ret); return NULL;
   18070             :                         }
   18071          53 :                         if (in == Py_None) {
   18072           0 :                                 ret->domain = NULL;
   18073             :                         } else {
   18074          53 :                                 ret->domain = NULL;
   18075             :                                 {
   18076             :                                         const char *test_str;
   18077             :                                         const char *talloc_str;
   18078          53 :                                         PyObject *unicode = NULL;
   18079          53 :                                         if (PyUnicode_Check(in)) {
   18080          53 :                                                 unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   18081          53 :                                                 if (unicode == NULL) {
   18082           0 :                                                         PyErr_NoMemory();
   18083           0 :                                                         talloc_free(ret); return NULL;
   18084             :                                                 }
   18085          53 :                                                 test_str = PyBytes_AS_STRING(unicode);
   18086           0 :                                         } else if (PyBytes_Check(in)) {
   18087           0 :                                                 test_str = PyBytes_AS_STRING(in);
   18088             :                                         } else {
   18089           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   18090           0 :                                                 talloc_free(ret); return NULL;
   18091             :                                         }
   18092          53 :                                         talloc_str = talloc_strdup(mem_ctx, test_str);
   18093          53 :                                         if (unicode != NULL) {
   18094          53 :                                                 Py_DECREF(unicode);
   18095             :                                         }
   18096          53 :                                         if (talloc_str == NULL) {
   18097           0 :                                                 PyErr_NoMemory();
   18098           0 :                                                 talloc_free(ret); return NULL;
   18099             :                                         }
   18100          53 :                                         ret->domain = talloc_str;
   18101             :                                 }
   18102             :                         }
   18103          53 :                         break;
   18104             : 
   18105           0 :                 case NETLOGON_CONTROL_FIND_USER:
   18106           0 :                         if (in == NULL) {
   18107           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->user");
   18108           0 :                                 talloc_free(ret); return NULL;
   18109             :                         }
   18110           0 :                         if (in == Py_None) {
   18111           0 :                                 ret->user = NULL;
   18112             :                         } else {
   18113           0 :                                 ret->user = NULL;
   18114             :                                 {
   18115             :                                         const char *test_str;
   18116             :                                         const char *talloc_str;
   18117           0 :                                         PyObject *unicode = NULL;
   18118           0 :                                         if (PyUnicode_Check(in)) {
   18119           0 :                                                 unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   18120           0 :                                                 if (unicode == NULL) {
   18121           0 :                                                         PyErr_NoMemory();
   18122           0 :                                                         talloc_free(ret); return NULL;
   18123             :                                                 }
   18124           0 :                                                 test_str = PyBytes_AS_STRING(unicode);
   18125           0 :                                         } else if (PyBytes_Check(in)) {
   18126           0 :                                                 test_str = PyBytes_AS_STRING(in);
   18127             :                                         } else {
   18128           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   18129           0 :                                                 talloc_free(ret); return NULL;
   18130             :                                         }
   18131           0 :                                         talloc_str = talloc_strdup(mem_ctx, test_str);
   18132           0 :                                         if (unicode != NULL) {
   18133           0 :                                                 Py_DECREF(unicode);
   18134             :                                         }
   18135           0 :                                         if (talloc_str == NULL) {
   18136           0 :                                                 PyErr_NoMemory();
   18137           0 :                                                 talloc_free(ret); return NULL;
   18138             :                                         }
   18139           0 :                                         ret->user = talloc_str;
   18140             :                                 }
   18141             :                         }
   18142           0 :                         break;
   18143             : 
   18144           0 :                 case NETLOGON_CONTROL_SET_DBFLAG:
   18145           0 :                         if (in == NULL) {
   18146           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->debug_level");
   18147           0 :                                 talloc_free(ret); return NULL;
   18148             :                         }
   18149             :                         {
   18150           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->debug_level));
   18151           0 :                                 if (PyLong_Check(in)) {
   18152             :                                         unsigned long long test_var;
   18153           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   18154           0 :                                         if (PyErr_Occurred() != NULL) {
   18155           0 :                                                 talloc_free(ret); return NULL;
   18156             :                                         }
   18157           0 :                                         if (test_var > uint_max) {
   18158           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   18159             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   18160           0 :                                                 talloc_free(ret); return NULL;
   18161             :                                         }
   18162           0 :                                         ret->debug_level = test_var;
   18163             :                                 } else {
   18164           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   18165             :                                           PyLong_Type.tp_name);
   18166           0 :                                         talloc_free(ret); return NULL;
   18167             :                                 }
   18168             :                         }
   18169           0 :                         break;
   18170             : 
   18171           0 :                 default:
   18172           0 :                         break;
   18173             : 
   18174             :         }
   18175             : 
   18176          81 :         return ret;
   18177             : }
   18178             : 
   18179           0 : static PyObject *py_netr_CONTROL_DATA_INFORMATION_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18180             : {
   18181           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   18182           0 :         PyObject *mem_ctx_obj = NULL;
   18183           0 :         TALLOC_CTX *mem_ctx = NULL;
   18184           0 :         int level = 0;
   18185           0 :         PyObject *in_obj = NULL;
   18186           0 :         union netr_CONTROL_DATA_INFORMATION *in = NULL;
   18187             : 
   18188           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   18189             :                 discard_const_p(char *, kwnames),
   18190             :                 &mem_ctx_obj,
   18191             :                 &level,
   18192             :                 &in_obj)) {
   18193           0 :                 return NULL;
   18194             :         }
   18195           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   18196           0 :         if (mem_ctx == NULL) {
   18197           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   18198           0 :                 return NULL;
   18199             :         }
   18200           0 :         in = (union netr_CONTROL_DATA_INFORMATION *)pytalloc_get_ptr(in_obj);
   18201           0 :         if (in == NULL) {
   18202           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_CONTROL_DATA_INFORMATION!");
   18203           0 :                 return NULL;
   18204             :         }
   18205             : 
   18206           0 :         return py_import_netr_CONTROL_DATA_INFORMATION(mem_ctx, level, in);
   18207             : }
   18208             : 
   18209          81 : static PyObject *py_netr_CONTROL_DATA_INFORMATION_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18210             : {
   18211          81 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   18212          81 :         PyObject *mem_ctx_obj = NULL;
   18213          81 :         TALLOC_CTX *mem_ctx = NULL;
   18214          81 :         int level = 0;
   18215          81 :         PyObject *in = NULL;
   18216          81 :         union netr_CONTROL_DATA_INFORMATION *out = NULL;
   18217             : 
   18218          81 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   18219             :                 discard_const_p(char *, kwnames),
   18220             :                 &mem_ctx_obj,
   18221             :                 &level,
   18222             :                 &in)) {
   18223           0 :                 return NULL;
   18224             :         }
   18225          81 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   18226          81 :         if (mem_ctx == NULL) {
   18227           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   18228           0 :                 return NULL;
   18229             :         }
   18230             : 
   18231          81 :         out = py_export_netr_CONTROL_DATA_INFORMATION(mem_ctx, level, in);
   18232          81 :         if (out == NULL) {
   18233           0 :                 return NULL;
   18234             :         }
   18235             : 
   18236          81 :         return pytalloc_GenericObject_reference(out);
   18237             : }
   18238             : 
   18239             : static PyMethodDef py_netr_CONTROL_DATA_INFORMATION_methods[] = {
   18240             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_CONTROL_DATA_INFORMATION_import),
   18241             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   18242             :                 "T.__import__(mem_ctx, level, in) => ret." },
   18243             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_CONTROL_DATA_INFORMATION_export),
   18244             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   18245             :                 "T.__export__(mem_ctx, level, in) => ret." },
   18246             :         { NULL, NULL, 0, NULL }
   18247             : };
   18248             : 
   18249           0 : static PyObject *py_netr_CONTROL_DATA_INFORMATION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18250             : {
   18251           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   18252           0 :         return NULL;
   18253             : }
   18254             : 
   18255             : 
   18256             : static PyTypeObject netr_CONTROL_DATA_INFORMATION_Type = {
   18257             :         PyVarObject_HEAD_INIT(NULL, 0)
   18258             :         .tp_name = "netlogon.netr_CONTROL_DATA_INFORMATION",
   18259             :         .tp_getset = NULL,
   18260             :         .tp_methods = py_netr_CONTROL_DATA_INFORMATION_methods,
   18261             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   18262             :         .tp_new = py_netr_CONTROL_DATA_INFORMATION_new,
   18263             : };
   18264             : 
   18265           0 : static PyObject *py_import_netr_ChangeLogObject(TALLOC_CTX *mem_ctx, int level, union netr_ChangeLogObject *in)
   18266             : {
   18267             :         PyObject *ret;
   18268             : 
   18269           0 :         switch (level) {
   18270           0 :                 case NETR_CHANGELOG_SID_INCLUDED:
   18271           0 :                         ret = pytalloc_reference_ex(dom_sid_Type, mem_ctx, &in->object_sid);
   18272           0 :                         return ret;
   18273             : 
   18274           0 :                 case NETR_CHANGELOG_NAME_INCLUDED:
   18275           0 :                         ret = PyString_FromStringOrNULL(in->object_name);
   18276           0 :                         return ret;
   18277             : 
   18278           0 :                 default:
   18279           0 :                         ret = Py_None;
   18280           0 :                         Py_INCREF(ret);
   18281           0 :                         return ret;
   18282             : 
   18283             :         }
   18284             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   18285             :         return NULL;
   18286             : }
   18287             : 
   18288           0 : static union netr_ChangeLogObject *py_export_netr_ChangeLogObject(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   18289             : {
   18290           0 :         union netr_ChangeLogObject *ret = talloc_zero(mem_ctx, union netr_ChangeLogObject);
   18291           0 :         switch (level) {
   18292           0 :                 case NETR_CHANGELOG_SID_INCLUDED:
   18293           0 :                         if (in == NULL) {
   18294           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->object_sid");
   18295           0 :                                 talloc_free(ret); return NULL;
   18296             :                         }
   18297           0 :                         PY_CHECK_TYPE(dom_sid_Type, in, talloc_free(ret); return NULL;);
   18298           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   18299           0 :                                 PyErr_NoMemory();
   18300           0 :                                 talloc_free(ret); return NULL;
   18301             :                         }
   18302           0 :                         ret->object_sid = *(struct dom_sid *)pytalloc_get_ptr(in);
   18303           0 :                         break;
   18304             : 
   18305           0 :                 case NETR_CHANGELOG_NAME_INCLUDED:
   18306           0 :                         if (in == NULL) {
   18307           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->object_name");
   18308           0 :                                 talloc_free(ret); return NULL;
   18309             :                         }
   18310             :                         {
   18311             :                                 const char *test_str;
   18312             :                                 const char *talloc_str;
   18313           0 :                                 PyObject *unicode = NULL;
   18314           0 :                                 if (PyUnicode_Check(in)) {
   18315           0 :                                         unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
   18316           0 :                                         if (unicode == NULL) {
   18317           0 :                                                 PyErr_NoMemory();
   18318           0 :                                                 talloc_free(ret); return NULL;
   18319             :                                         }
   18320           0 :                                         test_str = PyBytes_AS_STRING(unicode);
   18321           0 :                                 } else if (PyBytes_Check(in)) {
   18322           0 :                                         test_str = PyBytes_AS_STRING(in);
   18323             :                                 } else {
   18324           0 :                                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
   18325           0 :                                         talloc_free(ret); return NULL;
   18326             :                                 }
   18327           0 :                                 talloc_str = talloc_strdup(mem_ctx, test_str);
   18328           0 :                                 if (unicode != NULL) {
   18329           0 :                                         Py_DECREF(unicode);
   18330             :                                 }
   18331           0 :                                 if (talloc_str == NULL) {
   18332           0 :                                         PyErr_NoMemory();
   18333           0 :                                         talloc_free(ret); return NULL;
   18334             :                                 }
   18335           0 :                                 ret->object_name = talloc_str;
   18336             :                         }
   18337           0 :                         break;
   18338             : 
   18339           0 :                 default:
   18340           0 :                         break;
   18341             : 
   18342             :         }
   18343             : 
   18344           0 :         return ret;
   18345             : }
   18346             : 
   18347           0 : static PyObject *py_netr_ChangeLogObject_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18348             : {
   18349           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   18350           0 :         PyObject *mem_ctx_obj = NULL;
   18351           0 :         TALLOC_CTX *mem_ctx = NULL;
   18352           0 :         int level = 0;
   18353           0 :         PyObject *in_obj = NULL;
   18354           0 :         union netr_ChangeLogObject *in = NULL;
   18355             : 
   18356           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   18357             :                 discard_const_p(char *, kwnames),
   18358             :                 &mem_ctx_obj,
   18359             :                 &level,
   18360             :                 &in_obj)) {
   18361           0 :                 return NULL;
   18362             :         }
   18363           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   18364           0 :         if (mem_ctx == NULL) {
   18365           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   18366           0 :                 return NULL;
   18367             :         }
   18368           0 :         in = (union netr_ChangeLogObject *)pytalloc_get_ptr(in_obj);
   18369           0 :         if (in == NULL) {
   18370           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_ChangeLogObject!");
   18371           0 :                 return NULL;
   18372             :         }
   18373             : 
   18374           0 :         return py_import_netr_ChangeLogObject(mem_ctx, level, in);
   18375             : }
   18376             : 
   18377           0 : static PyObject *py_netr_ChangeLogObject_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18378             : {
   18379           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   18380           0 :         PyObject *mem_ctx_obj = NULL;
   18381           0 :         TALLOC_CTX *mem_ctx = NULL;
   18382           0 :         int level = 0;
   18383           0 :         PyObject *in = NULL;
   18384           0 :         union netr_ChangeLogObject *out = NULL;
   18385             : 
   18386           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   18387             :                 discard_const_p(char *, kwnames),
   18388             :                 &mem_ctx_obj,
   18389             :                 &level,
   18390             :                 &in)) {
   18391           0 :                 return NULL;
   18392             :         }
   18393           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   18394           0 :         if (mem_ctx == NULL) {
   18395           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   18396           0 :                 return NULL;
   18397             :         }
   18398             : 
   18399           0 :         out = py_export_netr_ChangeLogObject(mem_ctx, level, in);
   18400           0 :         if (out == NULL) {
   18401           0 :                 return NULL;
   18402             :         }
   18403             : 
   18404           0 :         return pytalloc_GenericObject_reference(out);
   18405             : }
   18406             : 
   18407             : static PyMethodDef py_netr_ChangeLogObject_methods[] = {
   18408             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ChangeLogObject_import),
   18409             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   18410             :                 "T.__import__(mem_ctx, level, in) => ret." },
   18411             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ChangeLogObject_export),
   18412             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   18413             :                 "T.__export__(mem_ctx, level, in) => ret." },
   18414             :         { NULL, NULL, 0, NULL }
   18415             : };
   18416             : 
   18417           0 : static PyObject *py_netr_ChangeLogObject_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18418             : {
   18419           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   18420           0 :         return NULL;
   18421             : }
   18422             : 
   18423             : 
   18424             : static PyTypeObject netr_ChangeLogObject_Type = {
   18425             :         PyVarObject_HEAD_INIT(NULL, 0)
   18426             :         .tp_name = "netlogon.netr_ChangeLogObject",
   18427             :         .tp_getset = NULL,
   18428             :         .tp_methods = py_netr_ChangeLogObject_methods,
   18429             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   18430             :         .tp_new = py_netr_ChangeLogObject_new,
   18431             : };
   18432             : 
   18433             : 
   18434           0 : static PyObject *py_netr_ChangeLogEntry_get_serial_number1(PyObject *obj, void *closure)
   18435             : {
   18436           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(obj);
   18437             :         PyObject *py_serial_number1;
   18438           0 :         py_serial_number1 = PyLong_FromUnsignedLongLong((uint32_t)object->serial_number1);
   18439           0 :         return py_serial_number1;
   18440             : }
   18441             : 
   18442           0 : static int py_netr_ChangeLogEntry_set_serial_number1(PyObject *py_obj, PyObject *value, void *closure)
   18443             : {
   18444           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(py_obj);
   18445           0 :         if (value == NULL) {
   18446           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->serial_number1");
   18447           0 :                 return -1;
   18448             :         }
   18449             :         {
   18450           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->serial_number1));
   18451           0 :                 if (PyLong_Check(value)) {
   18452             :                         unsigned long long test_var;
   18453           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18454           0 :                         if (PyErr_Occurred() != NULL) {
   18455           0 :                                 return -1;
   18456             :                         }
   18457           0 :                         if (test_var > uint_max) {
   18458           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   18459             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18460           0 :                                 return -1;
   18461             :                         }
   18462           0 :                         object->serial_number1 = test_var;
   18463             :                 } else {
   18464           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   18465             :                           PyLong_Type.tp_name);
   18466           0 :                         return -1;
   18467             :                 }
   18468             :         }
   18469           0 :         return 0;
   18470             : }
   18471             : 
   18472           0 : static PyObject *py_netr_ChangeLogEntry_get_serial_number2(PyObject *obj, void *closure)
   18473             : {
   18474           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(obj);
   18475             :         PyObject *py_serial_number2;
   18476           0 :         py_serial_number2 = PyLong_FromUnsignedLongLong((uint32_t)object->serial_number2);
   18477           0 :         return py_serial_number2;
   18478             : }
   18479             : 
   18480           0 : static int py_netr_ChangeLogEntry_set_serial_number2(PyObject *py_obj, PyObject *value, void *closure)
   18481             : {
   18482           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(py_obj);
   18483           0 :         if (value == NULL) {
   18484           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->serial_number2");
   18485           0 :                 return -1;
   18486             :         }
   18487             :         {
   18488           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->serial_number2));
   18489           0 :                 if (PyLong_Check(value)) {
   18490             :                         unsigned long long test_var;
   18491           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18492           0 :                         if (PyErr_Occurred() != NULL) {
   18493           0 :                                 return -1;
   18494             :                         }
   18495           0 :                         if (test_var > uint_max) {
   18496           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   18497             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18498           0 :                                 return -1;
   18499             :                         }
   18500           0 :                         object->serial_number2 = test_var;
   18501             :                 } else {
   18502           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   18503             :                           PyLong_Type.tp_name);
   18504           0 :                         return -1;
   18505             :                 }
   18506             :         }
   18507           0 :         return 0;
   18508             : }
   18509             : 
   18510           0 : static PyObject *py_netr_ChangeLogEntry_get_object_rid(PyObject *obj, void *closure)
   18511             : {
   18512           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(obj);
   18513             :         PyObject *py_object_rid;
   18514           0 :         py_object_rid = PyLong_FromUnsignedLongLong((uint32_t)object->object_rid);
   18515           0 :         return py_object_rid;
   18516             : }
   18517             : 
   18518           0 : static int py_netr_ChangeLogEntry_set_object_rid(PyObject *py_obj, PyObject *value, void *closure)
   18519             : {
   18520           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(py_obj);
   18521           0 :         if (value == NULL) {
   18522           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->object_rid");
   18523           0 :                 return -1;
   18524             :         }
   18525             :         {
   18526           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->object_rid));
   18527           0 :                 if (PyLong_Check(value)) {
   18528             :                         unsigned long long test_var;
   18529           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18530           0 :                         if (PyErr_Occurred() != NULL) {
   18531           0 :                                 return -1;
   18532             :                         }
   18533           0 :                         if (test_var > uint_max) {
   18534           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   18535             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18536           0 :                                 return -1;
   18537             :                         }
   18538           0 :                         object->object_rid = test_var;
   18539             :                 } else {
   18540           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   18541             :                           PyLong_Type.tp_name);
   18542           0 :                         return -1;
   18543             :                 }
   18544             :         }
   18545           0 :         return 0;
   18546             : }
   18547             : 
   18548           0 : static PyObject *py_netr_ChangeLogEntry_get_flags(PyObject *obj, void *closure)
   18549             : {
   18550           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(obj);
   18551             :         PyObject *py_flags;
   18552           0 :         py_flags = PyLong_FromLong((uint16_t)object->flags);
   18553           0 :         return py_flags;
   18554             : }
   18555             : 
   18556           0 : static int py_netr_ChangeLogEntry_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   18557             : {
   18558           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(py_obj);
   18559           0 :         if (value == NULL) {
   18560           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
   18561           0 :                 return -1;
   18562             :         }
   18563             :         {
   18564           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
   18565           0 :                 if (PyLong_Check(value)) {
   18566             :                         unsigned long long test_var;
   18567           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18568           0 :                         if (PyErr_Occurred() != NULL) {
   18569           0 :                                 return -1;
   18570             :                         }
   18571           0 :                         if (test_var > uint_max) {
   18572           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   18573             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18574           0 :                                 return -1;
   18575             :                         }
   18576           0 :                         object->flags = test_var;
   18577             :                 } else {
   18578           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   18579             :                           PyLong_Type.tp_name);
   18580           0 :                         return -1;
   18581             :                 }
   18582             :         }
   18583           0 :         return 0;
   18584             : }
   18585             : 
   18586           0 : static PyObject *py_netr_ChangeLogEntry_get_db_index(PyObject *obj, void *closure)
   18587             : {
   18588           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(obj);
   18589             :         PyObject *py_db_index;
   18590           0 :         py_db_index = PyLong_FromLong((uint16_t)object->db_index);
   18591           0 :         return py_db_index;
   18592             : }
   18593             : 
   18594           0 : static int py_netr_ChangeLogEntry_set_db_index(PyObject *py_obj, PyObject *value, void *closure)
   18595             : {
   18596           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(py_obj);
   18597           0 :         if (value == NULL) {
   18598           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->db_index");
   18599           0 :                 return -1;
   18600             :         }
   18601             :         {
   18602           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->db_index));
   18603           0 :                 if (PyLong_Check(value)) {
   18604             :                         unsigned long long test_var;
   18605           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18606           0 :                         if (PyErr_Occurred() != NULL) {
   18607           0 :                                 return -1;
   18608             :                         }
   18609           0 :                         if (test_var > uint_max) {
   18610           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   18611             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18612           0 :                                 return -1;
   18613             :                         }
   18614           0 :                         object->db_index = test_var;
   18615             :                 } else {
   18616           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   18617             :                           PyLong_Type.tp_name);
   18618           0 :                         return -1;
   18619             :                 }
   18620             :         }
   18621           0 :         return 0;
   18622             : }
   18623             : 
   18624           0 : static PyObject *py_netr_ChangeLogEntry_get_delta_type(PyObject *obj, void *closure)
   18625             : {
   18626           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(obj);
   18627             :         PyObject *py_delta_type;
   18628           0 :         py_delta_type = PyLong_FromLong((uint16_t)object->delta_type);
   18629           0 :         return py_delta_type;
   18630             : }
   18631             : 
   18632           0 : static int py_netr_ChangeLogEntry_set_delta_type(PyObject *py_obj, PyObject *value, void *closure)
   18633             : {
   18634           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(py_obj);
   18635           0 :         if (value == NULL) {
   18636           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->delta_type");
   18637           0 :                 return -1;
   18638             :         }
   18639             :         {
   18640           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->delta_type));
   18641           0 :                 if (PyLong_Check(value)) {
   18642             :                         unsigned long long test_var;
   18643           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18644           0 :                         if (PyErr_Occurred() != NULL) {
   18645           0 :                                 return -1;
   18646             :                         }
   18647           0 :                         if (test_var > uint_max) {
   18648           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   18649             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18650           0 :                                 return -1;
   18651             :                         }
   18652           0 :                         object->delta_type = test_var;
   18653             :                 } else {
   18654           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   18655             :                           PyLong_Type.tp_name);
   18656           0 :                         return -1;
   18657             :                 }
   18658             :         }
   18659           0 :         return 0;
   18660             : }
   18661             : 
   18662           0 : static PyObject *py_netr_ChangeLogEntry_get_object(PyObject *obj, void *closure)
   18663             : {
   18664           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(obj);
   18665             :         PyObject *py_object;
   18666           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");
   18667           0 :         if (py_object == NULL) {
   18668           0 :                 return NULL;
   18669             :         }
   18670           0 :         return py_object;
   18671             : }
   18672             : 
   18673           0 : static int py_netr_ChangeLogEntry_set_object(PyObject *py_obj, PyObject *value, void *closure)
   18674             : {
   18675           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(py_obj);
   18676           0 :         if (value == NULL) {
   18677           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->object");
   18678           0 :                 return -1;
   18679             :         }
   18680             :         {
   18681             :                 union netr_ChangeLogObject *object_switch_0;
   18682           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");
   18683           0 :                 if (object_switch_0 == NULL) {
   18684           0 :                         return -1;
   18685             :                 }
   18686           0 :                 object->object = *object_switch_0;
   18687             :         }
   18688           0 :         return 0;
   18689             : }
   18690             : 
   18691             : static PyGetSetDef py_netr_ChangeLogEntry_getsetters[] = {
   18692             :         {
   18693             :                 .name = discard_const_p(char, "serial_number1"),
   18694             :                 .get = py_netr_ChangeLogEntry_get_serial_number1,
   18695             :                 .set = py_netr_ChangeLogEntry_set_serial_number1,
   18696             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   18697             :         },
   18698             :         {
   18699             :                 .name = discard_const_p(char, "serial_number2"),
   18700             :                 .get = py_netr_ChangeLogEntry_get_serial_number2,
   18701             :                 .set = py_netr_ChangeLogEntry_set_serial_number2,
   18702             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   18703             :         },
   18704             :         {
   18705             :                 .name = discard_const_p(char, "object_rid"),
   18706             :                 .get = py_netr_ChangeLogEntry_get_object_rid,
   18707             :                 .set = py_netr_ChangeLogEntry_set_object_rid,
   18708             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   18709             :         },
   18710             :         {
   18711             :                 .name = discard_const_p(char, "flags"),
   18712             :                 .get = py_netr_ChangeLogEntry_get_flags,
   18713             :                 .set = py_netr_ChangeLogEntry_set_flags,
   18714             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_ChangeLogFlags")
   18715             :         },
   18716             :         {
   18717             :                 .name = discard_const_p(char, "db_index"),
   18718             :                 .get = py_netr_ChangeLogEntry_get_db_index,
   18719             :                 .set = py_netr_ChangeLogEntry_set_db_index,
   18720             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SamDatabaseID8Bit")
   18721             :         },
   18722             :         {
   18723             :                 .name = discard_const_p(char, "delta_type"),
   18724             :                 .get = py_netr_ChangeLogEntry_get_delta_type,
   18725             :                 .set = py_netr_ChangeLogEntry_set_delta_type,
   18726             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DeltaEnum8Bit")
   18727             :         },
   18728             :         {
   18729             :                 .name = discard_const_p(char, "object"),
   18730             :                 .get = py_netr_ChangeLogEntry_get_object,
   18731             :                 .set = py_netr_ChangeLogEntry_set_object,
   18732             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_ChangeLogObject")
   18733             :         },
   18734             :         { .name = NULL }
   18735             : };
   18736             : 
   18737           0 : static PyObject *py_netr_ChangeLogEntry_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18738             : {
   18739           0 :         return pytalloc_new(struct netr_ChangeLogEntry, type);
   18740             : }
   18741             : 
   18742           0 : static PyObject *py_netr_ChangeLogEntry_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   18743             : {
   18744           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(py_obj);
   18745           0 :         PyObject *ret = NULL;
   18746             :         DATA_BLOB blob;
   18747             :         enum ndr_err_code err;
   18748           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   18749           0 :         if (tmp_ctx == NULL) {
   18750           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   18751           0 :                 return NULL;
   18752             :         }
   18753           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_ChangeLogEntry);
   18754           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   18755           0 :                 TALLOC_FREE(tmp_ctx);
   18756           0 :                 PyErr_SetNdrError(err);
   18757           0 :                 return NULL;
   18758             :         }
   18759             : 
   18760           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   18761           0 :         TALLOC_FREE(tmp_ctx);
   18762           0 :         return ret;
   18763             : }
   18764             : 
   18765           0 : static PyObject *py_netr_ChangeLogEntry_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   18766             : {
   18767           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(py_obj);
   18768           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   18769           0 :         Py_ssize_t blob_length = 0;
   18770             :         enum ndr_err_code err;
   18771           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   18772           0 :         PyObject *allow_remaining_obj = NULL;
   18773           0 :         bool allow_remaining = false;
   18774             : 
   18775           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   18776             :                 discard_const_p(char *, kwnames),
   18777             :                 &blob.data, &blob_length,
   18778             :                 &allow_remaining_obj)) {
   18779           0 :                 return NULL;
   18780             :         }
   18781           0 :         blob.length = blob_length;
   18782             : 
   18783           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   18784           0 :                 allow_remaining = true;
   18785             :         }
   18786             : 
   18787           0 :         if (allow_remaining) {
   18788           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_ChangeLogEntry);
   18789             :         } else {
   18790           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_ChangeLogEntry);
   18791             :         }
   18792           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   18793           0 :                 PyErr_SetNdrError(err);
   18794           0 :                 return NULL;
   18795             :         }
   18796             : 
   18797           0 :         Py_RETURN_NONE;
   18798             : }
   18799             : 
   18800           0 : static PyObject *py_netr_ChangeLogEntry_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   18801             : {
   18802           0 :         struct netr_ChangeLogEntry *object = (struct netr_ChangeLogEntry *)pytalloc_get_ptr(py_obj);
   18803             :         PyObject *ret;
   18804             :         char *retstr;
   18805             : 
   18806           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_ChangeLogEntry, "netr_ChangeLogEntry", object);
   18807           0 :         ret = PyUnicode_FromString(retstr);
   18808           0 :         talloc_free(retstr);
   18809             : 
   18810           0 :         return ret;
   18811             : }
   18812             : 
   18813             : static PyMethodDef py_netr_ChangeLogEntry_methods[] = {
   18814             :         { "__ndr_pack__", (PyCFunction)py_netr_ChangeLogEntry_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   18815             :         { "__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" },
   18816             :         { "__ndr_print__", (PyCFunction)py_netr_ChangeLogEntry_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   18817             :         { NULL, NULL, 0, NULL }
   18818             : };
   18819             : 
   18820             : 
   18821             : static PyTypeObject netr_ChangeLogEntry_Type = {
   18822             :         PyVarObject_HEAD_INIT(NULL, 0)
   18823             :         .tp_name = "netlogon.netr_ChangeLogEntry",
   18824             :         .tp_getset = py_netr_ChangeLogEntry_getsetters,
   18825             :         .tp_methods = py_netr_ChangeLogEntry_methods,
   18826             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   18827             :         .tp_new = py_netr_ChangeLogEntry_new,
   18828             : };
   18829             : 
   18830             : 
   18831           0 : static PyObject *py_netr_Blob_get_length(PyObject *obj, void *closure)
   18832             : {
   18833           0 :         struct netr_Blob *object = (struct netr_Blob *)pytalloc_get_ptr(obj);
   18834             :         PyObject *py_length;
   18835           0 :         py_length = PyLong_FromUnsignedLongLong((uint32_t)object->length);
   18836           0 :         return py_length;
   18837             : }
   18838             : 
   18839           0 : static int py_netr_Blob_set_length(PyObject *py_obj, PyObject *value, void *closure)
   18840             : {
   18841           0 :         struct netr_Blob *object = (struct netr_Blob *)pytalloc_get_ptr(py_obj);
   18842           0 :         if (value == NULL) {
   18843           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
   18844           0 :                 return -1;
   18845             :         }
   18846             :         {
   18847           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
   18848           0 :                 if (PyLong_Check(value)) {
   18849             :                         unsigned long long test_var;
   18850           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18851           0 :                         if (PyErr_Occurred() != NULL) {
   18852           0 :                                 return -1;
   18853             :                         }
   18854           0 :                         if (test_var > uint_max) {
   18855           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   18856             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18857           0 :                                 return -1;
   18858             :                         }
   18859           0 :                         object->length = test_var;
   18860             :                 } else {
   18861           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   18862             :                           PyLong_Type.tp_name);
   18863           0 :                         return -1;
   18864             :                 }
   18865             :         }
   18866           0 :         return 0;
   18867             : }
   18868             : 
   18869           0 : static PyObject *py_netr_Blob_get_data(PyObject *obj, void *closure)
   18870             : {
   18871           0 :         struct netr_Blob *object = (struct netr_Blob *)pytalloc_get_ptr(obj);
   18872             :         PyObject *py_data;
   18873           0 :         if (object->data == NULL) {
   18874           0 :                 Py_RETURN_NONE;
   18875             :         }
   18876           0 :         if (object->data == NULL) {
   18877           0 :                 py_data = Py_None;
   18878           0 :                 Py_INCREF(py_data);
   18879             :         } else {
   18880           0 :                 py_data = PyList_New(object->length);
   18881           0 :                 if (py_data == NULL) {
   18882           0 :                         return NULL;
   18883             :                 }
   18884             :                 {
   18885             :                         int data_cntr_1;
   18886           0 :                         for (data_cntr_1 = 0; data_cntr_1 < (object->length); data_cntr_1++) {
   18887             :                                 PyObject *py_data_1;
   18888           0 :                                 py_data_1 = PyLong_FromLong((uint16_t)object->data[data_cntr_1]);
   18889           0 :                                 PyList_SetItem(py_data, data_cntr_1, py_data_1);
   18890             :                         }
   18891             :                 }
   18892             :         }
   18893           0 :         return py_data;
   18894             : }
   18895             : 
   18896           0 : static int py_netr_Blob_set_data(PyObject *py_obj, PyObject *value, void *closure)
   18897             : {
   18898           0 :         struct netr_Blob *object = (struct netr_Blob *)pytalloc_get_ptr(py_obj);
   18899           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->data));
   18900           0 :         if (value == NULL) {
   18901           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data");
   18902           0 :                 return -1;
   18903             :         }
   18904           0 :         if (value == Py_None) {
   18905           0 :                 object->data = NULL;
   18906             :         } else {
   18907           0 :                 object->data = NULL;
   18908           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   18909             :                 {
   18910             :                         int data_cntr_1;
   18911           0 :                         object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
   18912           0 :                         if (!object->data) { return -1;; }
   18913           0 :                         talloc_set_name_const(object->data, "ARRAY: object->data");
   18914           0 :                         for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
   18915           0 :                                 if (PyList_GET_ITEM(value, data_cntr_1) == NULL) {
   18916           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data[data_cntr_1]");
   18917           0 :                                         return -1;
   18918             :                                 }
   18919             :                                 {
   18920           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->data[data_cntr_1]));
   18921           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_1))) {
   18922             :                                                 unsigned long long test_var;
   18923           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_1));
   18924           0 :                                                 if (PyErr_Occurred() != NULL) {
   18925           0 :                                                         return -1;
   18926             :                                                 }
   18927           0 :                                                 if (test_var > uint_max) {
   18928           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   18929             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   18930           0 :                                                         return -1;
   18931             :                                                 }
   18932           0 :                                                 object->data[data_cntr_1] = test_var;
   18933             :                                         } else {
   18934           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",\
   18935             :                                                   PyLong_Type.tp_name);
   18936           0 :                                                 return -1;
   18937             :                                         }
   18938             :                                 }
   18939             :                         }
   18940             :                 }
   18941             :         }
   18942           0 :         return 0;
   18943             : }
   18944             : 
   18945             : static PyGetSetDef py_netr_Blob_getsetters[] = {
   18946             :         {
   18947             :                 .name = discard_const_p(char, "length"),
   18948             :                 .get = py_netr_Blob_get_length,
   18949             :                 .set = py_netr_Blob_set_length,
   18950             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   18951             :         },
   18952             :         {
   18953             :                 .name = discard_const_p(char, "data"),
   18954             :                 .get = py_netr_Blob_get_data,
   18955             :                 .set = py_netr_Blob_set_data,
   18956             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   18957             :         },
   18958             :         { .name = NULL }
   18959             : };
   18960             : 
   18961           0 : static PyObject *py_netr_Blob_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18962             : {
   18963           0 :         return pytalloc_new(struct netr_Blob, type);
   18964             : }
   18965             : 
   18966             : 
   18967             : static PyTypeObject netr_Blob_Type = {
   18968             :         PyVarObject_HEAD_INIT(NULL, 0)
   18969             :         .tp_name = "netlogon.netr_Blob",
   18970             :         .tp_getset = py_netr_Blob_getsetters,
   18971             :         .tp_methods = NULL,
   18972             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   18973             :         .tp_new = py_netr_Blob_new,
   18974             : };
   18975             : 
   18976             : 
   18977         220 : static PyObject *py_netr_DsRGetDCNameInfo_get_dc_unc(PyObject *obj, void *closure)
   18978             : {
   18979         220 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(obj);
   18980             :         PyObject *py_dc_unc;
   18981         220 :         if (object->dc_unc == NULL) {
   18982           0 :                 Py_RETURN_NONE;
   18983             :         }
   18984         216 :         if (object->dc_unc == NULL) {
   18985           0 :                 py_dc_unc = Py_None;
   18986           0 :                 Py_INCREF(py_dc_unc);
   18987             :         } else {
   18988         216 :                 if (object->dc_unc == NULL) {
   18989           0 :                         py_dc_unc = Py_None;
   18990           0 :                         Py_INCREF(py_dc_unc);
   18991             :                 } else {
   18992         220 :                         py_dc_unc = PyUnicode_Decode(object->dc_unc, strlen(object->dc_unc), "utf-8", "ignore");
   18993             :                 }
   18994             :         }
   18995         220 :         return py_dc_unc;
   18996             : }
   18997             : 
   18998           0 : static int py_netr_DsRGetDCNameInfo_set_dc_unc(PyObject *py_obj, PyObject *value, void *closure)
   18999             : {
   19000           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(py_obj);
   19001           0 :         if (value == NULL) {
   19002           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dc_unc");
   19003           0 :                 return -1;
   19004             :         }
   19005           0 :         if (value == Py_None) {
   19006           0 :                 object->dc_unc = NULL;
   19007             :         } else {
   19008           0 :                 object->dc_unc = NULL;
   19009             :                 {
   19010             :                         const char *test_str;
   19011             :                         const char *talloc_str;
   19012           0 :                         PyObject *unicode = NULL;
   19013           0 :                         if (PyUnicode_Check(value)) {
   19014           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19015           0 :                                 if (unicode == NULL) {
   19016           0 :                                         PyErr_NoMemory();
   19017           0 :                                         return -1;
   19018             :                                 }
   19019           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19020           0 :                         } else if (PyBytes_Check(value)) {
   19021           0 :                                 test_str = PyBytes_AS_STRING(value);
   19022             :                         } else {
   19023           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19024           0 :                                 return -1;
   19025             :                         }
   19026           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19027           0 :                         if (unicode != NULL) {
   19028           0 :                                 Py_DECREF(unicode);
   19029             :                         }
   19030           0 :                         if (talloc_str == NULL) {
   19031           0 :                                 PyErr_NoMemory();
   19032           0 :                                 return -1;
   19033             :                         }
   19034           0 :                         object->dc_unc = talloc_str;
   19035             :                 }
   19036             :         }
   19037           0 :         return 0;
   19038             : }
   19039             : 
   19040          44 : static PyObject *py_netr_DsRGetDCNameInfo_get_dc_address(PyObject *obj, void *closure)
   19041             : {
   19042          44 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(obj);
   19043             :         PyObject *py_dc_address;
   19044          44 :         if (object->dc_address == NULL) {
   19045           0 :                 Py_RETURN_NONE;
   19046             :         }
   19047          44 :         if (object->dc_address == NULL) {
   19048           0 :                 py_dc_address = Py_None;
   19049           0 :                 Py_INCREF(py_dc_address);
   19050             :         } else {
   19051          44 :                 if (object->dc_address == NULL) {
   19052           0 :                         py_dc_address = Py_None;
   19053           0 :                         Py_INCREF(py_dc_address);
   19054             :                 } else {
   19055          44 :                         py_dc_address = PyUnicode_Decode(object->dc_address, strlen(object->dc_address), "utf-8", "ignore");
   19056             :                 }
   19057             :         }
   19058          44 :         return py_dc_address;
   19059             : }
   19060             : 
   19061           0 : static int py_netr_DsRGetDCNameInfo_set_dc_address(PyObject *py_obj, PyObject *value, void *closure)
   19062             : {
   19063           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(py_obj);
   19064           0 :         if (value == NULL) {
   19065           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dc_address");
   19066           0 :                 return -1;
   19067             :         }
   19068           0 :         if (value == Py_None) {
   19069           0 :                 object->dc_address = NULL;
   19070             :         } else {
   19071           0 :                 object->dc_address = NULL;
   19072             :                 {
   19073             :                         const char *test_str;
   19074             :                         const char *talloc_str;
   19075           0 :                         PyObject *unicode = NULL;
   19076           0 :                         if (PyUnicode_Check(value)) {
   19077           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19078           0 :                                 if (unicode == NULL) {
   19079           0 :                                         PyErr_NoMemory();
   19080           0 :                                         return -1;
   19081             :                                 }
   19082           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19083           0 :                         } else if (PyBytes_Check(value)) {
   19084           0 :                                 test_str = PyBytes_AS_STRING(value);
   19085             :                         } else {
   19086           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19087           0 :                                 return -1;
   19088             :                         }
   19089           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19090           0 :                         if (unicode != NULL) {
   19091           0 :                                 Py_DECREF(unicode);
   19092             :                         }
   19093           0 :                         if (talloc_str == NULL) {
   19094           0 :                                 PyErr_NoMemory();
   19095           0 :                                 return -1;
   19096             :                         }
   19097           0 :                         object->dc_address = talloc_str;
   19098             :                 }
   19099             :         }
   19100           0 :         return 0;
   19101             : }
   19102             : 
   19103           0 : static PyObject *py_netr_DsRGetDCNameInfo_get_dc_address_type(PyObject *obj, void *closure)
   19104             : {
   19105           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(obj);
   19106             :         PyObject *py_dc_address_type;
   19107           0 :         py_dc_address_type = PyLong_FromUnsignedLongLong((uint32_t)object->dc_address_type);
   19108           0 :         return py_dc_address_type;
   19109             : }
   19110             : 
   19111           0 : static int py_netr_DsRGetDCNameInfo_set_dc_address_type(PyObject *py_obj, PyObject *value, void *closure)
   19112             : {
   19113           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(py_obj);
   19114           0 :         if (value == NULL) {
   19115           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dc_address_type");
   19116           0 :                 return -1;
   19117             :         }
   19118             :         {
   19119           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dc_address_type));
   19120           0 :                 if (PyLong_Check(value)) {
   19121             :                         unsigned long long test_var;
   19122           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19123           0 :                         if (PyErr_Occurred() != NULL) {
   19124           0 :                                 return -1;
   19125             :                         }
   19126           0 :                         if (test_var > uint_max) {
   19127           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   19128             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19129           0 :                                 return -1;
   19130             :                         }
   19131           0 :                         object->dc_address_type = test_var;
   19132             :                 } else {
   19133           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   19134             :                           PyLong_Type.tp_name);
   19135           0 :                         return -1;
   19136             :                 }
   19137             :         }
   19138           0 :         return 0;
   19139             : }
   19140             : 
   19141           0 : static PyObject *py_netr_DsRGetDCNameInfo_get_domain_guid(PyObject *obj, void *closure)
   19142             : {
   19143           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(obj);
   19144             :         PyObject *py_domain_guid;
   19145           0 :         py_domain_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->domain_guid);
   19146           0 :         return py_domain_guid;
   19147             : }
   19148             : 
   19149           0 : static int py_netr_DsRGetDCNameInfo_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
   19150             : {
   19151           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(py_obj);
   19152           0 :         if (value == NULL) {
   19153           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_guid");
   19154           0 :                 return -1;
   19155             :         }
   19156           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   19157           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   19158           0 :                 PyErr_NoMemory();
   19159           0 :                 return -1;
   19160             :         }
   19161           0 :         object->domain_guid = *(struct GUID *)pytalloc_get_ptr(value);
   19162           0 :         return 0;
   19163             : }
   19164             : 
   19165         119 : static PyObject *py_netr_DsRGetDCNameInfo_get_domain_name(PyObject *obj, void *closure)
   19166             : {
   19167         119 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(obj);
   19168             :         PyObject *py_domain_name;
   19169         119 :         if (object->domain_name == NULL) {
   19170           0 :                 Py_RETURN_NONE;
   19171             :         }
   19172         117 :         if (object->domain_name == NULL) {
   19173           0 :                 py_domain_name = Py_None;
   19174           0 :                 Py_INCREF(py_domain_name);
   19175             :         } else {
   19176         117 :                 if (object->domain_name == NULL) {
   19177           0 :                         py_domain_name = Py_None;
   19178           0 :                         Py_INCREF(py_domain_name);
   19179             :                 } else {
   19180         119 :                         py_domain_name = PyUnicode_Decode(object->domain_name, strlen(object->domain_name), "utf-8", "ignore");
   19181             :                 }
   19182             :         }
   19183         119 :         return py_domain_name;
   19184             : }
   19185             : 
   19186           0 : static int py_netr_DsRGetDCNameInfo_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   19187             : {
   19188           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(py_obj);
   19189           0 :         if (value == NULL) {
   19190           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_name");
   19191           0 :                 return -1;
   19192             :         }
   19193           0 :         if (value == Py_None) {
   19194           0 :                 object->domain_name = NULL;
   19195             :         } else {
   19196           0 :                 object->domain_name = NULL;
   19197             :                 {
   19198             :                         const char *test_str;
   19199             :                         const char *talloc_str;
   19200           0 :                         PyObject *unicode = NULL;
   19201           0 :                         if (PyUnicode_Check(value)) {
   19202           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19203           0 :                                 if (unicode == NULL) {
   19204           0 :                                         PyErr_NoMemory();
   19205           0 :                                         return -1;
   19206             :                                 }
   19207           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19208           0 :                         } else if (PyBytes_Check(value)) {
   19209           0 :                                 test_str = PyBytes_AS_STRING(value);
   19210             :                         } else {
   19211           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19212           0 :                                 return -1;
   19213             :                         }
   19214           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19215           0 :                         if (unicode != NULL) {
   19216           0 :                                 Py_DECREF(unicode);
   19217             :                         }
   19218           0 :                         if (talloc_str == NULL) {
   19219           0 :                                 PyErr_NoMemory();
   19220           0 :                                 return -1;
   19221             :                         }
   19222           0 :                         object->domain_name = talloc_str;
   19223             :                 }
   19224             :         }
   19225           0 :         return 0;
   19226             : }
   19227             : 
   19228          81 : static PyObject *py_netr_DsRGetDCNameInfo_get_forest_name(PyObject *obj, void *closure)
   19229             : {
   19230          81 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(obj);
   19231             :         PyObject *py_forest_name;
   19232          81 :         if (object->forest_name == NULL) {
   19233           0 :                 Py_RETURN_NONE;
   19234             :         }
   19235          79 :         if (object->forest_name == NULL) {
   19236           0 :                 py_forest_name = Py_None;
   19237           0 :                 Py_INCREF(py_forest_name);
   19238             :         } else {
   19239          79 :                 if (object->forest_name == NULL) {
   19240           0 :                         py_forest_name = Py_None;
   19241           0 :                         Py_INCREF(py_forest_name);
   19242             :                 } else {
   19243          81 :                         py_forest_name = PyUnicode_Decode(object->forest_name, strlen(object->forest_name), "utf-8", "ignore");
   19244             :                 }
   19245             :         }
   19246          81 :         return py_forest_name;
   19247             : }
   19248             : 
   19249           0 : static int py_netr_DsRGetDCNameInfo_set_forest_name(PyObject *py_obj, PyObject *value, void *closure)
   19250             : {
   19251           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(py_obj);
   19252           0 :         if (value == NULL) {
   19253           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->forest_name");
   19254           0 :                 return -1;
   19255             :         }
   19256           0 :         if (value == Py_None) {
   19257           0 :                 object->forest_name = NULL;
   19258             :         } else {
   19259           0 :                 object->forest_name = NULL;
   19260             :                 {
   19261             :                         const char *test_str;
   19262             :                         const char *talloc_str;
   19263           0 :                         PyObject *unicode = NULL;
   19264           0 :                         if (PyUnicode_Check(value)) {
   19265           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19266           0 :                                 if (unicode == NULL) {
   19267           0 :                                         PyErr_NoMemory();
   19268           0 :                                         return -1;
   19269             :                                 }
   19270           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19271           0 :                         } else if (PyBytes_Check(value)) {
   19272           0 :                                 test_str = PyBytes_AS_STRING(value);
   19273             :                         } else {
   19274           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19275           0 :                                 return -1;
   19276             :                         }
   19277           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19278           0 :                         if (unicode != NULL) {
   19279           0 :                                 Py_DECREF(unicode);
   19280             :                         }
   19281           0 :                         if (talloc_str == NULL) {
   19282           0 :                                 PyErr_NoMemory();
   19283           0 :                                 return -1;
   19284             :                         }
   19285           0 :                         object->forest_name = talloc_str;
   19286             :                 }
   19287             :         }
   19288           0 :         return 0;
   19289             : }
   19290             : 
   19291           0 : static PyObject *py_netr_DsRGetDCNameInfo_get_dc_flags(PyObject *obj, void *closure)
   19292             : {
   19293           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(obj);
   19294             :         PyObject *py_dc_flags;
   19295           0 :         py_dc_flags = PyLong_FromUnsignedLongLong((uint32_t)object->dc_flags);
   19296           0 :         return py_dc_flags;
   19297             : }
   19298             : 
   19299           0 : static int py_netr_DsRGetDCNameInfo_set_dc_flags(PyObject *py_obj, PyObject *value, void *closure)
   19300             : {
   19301           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(py_obj);
   19302           0 :         if (value == NULL) {
   19303           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dc_flags");
   19304           0 :                 return -1;
   19305             :         }
   19306             :         {
   19307           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dc_flags));
   19308           0 :                 if (PyLong_Check(value)) {
   19309             :                         unsigned long long test_var;
   19310           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19311           0 :                         if (PyErr_Occurred() != NULL) {
   19312           0 :                                 return -1;
   19313             :                         }
   19314           0 :                         if (test_var > uint_max) {
   19315           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   19316             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19317           0 :                                 return -1;
   19318             :                         }
   19319           0 :                         object->dc_flags = test_var;
   19320             :                 } else {
   19321           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   19322             :                           PyLong_Type.tp_name);
   19323           0 :                         return -1;
   19324             :                 }
   19325             :         }
   19326           0 :         return 0;
   19327             : }
   19328             : 
   19329          16 : static PyObject *py_netr_DsRGetDCNameInfo_get_dc_site_name(PyObject *obj, void *closure)
   19330             : {
   19331          16 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(obj);
   19332             :         PyObject *py_dc_site_name;
   19333          16 :         if (object->dc_site_name == NULL) {
   19334           0 :                 Py_RETURN_NONE;
   19335             :         }
   19336          16 :         if (object->dc_site_name == NULL) {
   19337           0 :                 py_dc_site_name = Py_None;
   19338           0 :                 Py_INCREF(py_dc_site_name);
   19339             :         } else {
   19340          16 :                 if (object->dc_site_name == NULL) {
   19341           0 :                         py_dc_site_name = Py_None;
   19342           0 :                         Py_INCREF(py_dc_site_name);
   19343             :                 } else {
   19344          16 :                         py_dc_site_name = PyUnicode_Decode(object->dc_site_name, strlen(object->dc_site_name), "utf-8", "ignore");
   19345             :                 }
   19346             :         }
   19347          16 :         return py_dc_site_name;
   19348             : }
   19349             : 
   19350           0 : static int py_netr_DsRGetDCNameInfo_set_dc_site_name(PyObject *py_obj, PyObject *value, void *closure)
   19351             : {
   19352           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(py_obj);
   19353           0 :         if (value == NULL) {
   19354           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dc_site_name");
   19355           0 :                 return -1;
   19356             :         }
   19357           0 :         if (value == Py_None) {
   19358           0 :                 object->dc_site_name = NULL;
   19359             :         } else {
   19360           0 :                 object->dc_site_name = NULL;
   19361             :                 {
   19362             :                         const char *test_str;
   19363             :                         const char *talloc_str;
   19364           0 :                         PyObject *unicode = NULL;
   19365           0 :                         if (PyUnicode_Check(value)) {
   19366           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19367           0 :                                 if (unicode == NULL) {
   19368           0 :                                         PyErr_NoMemory();
   19369           0 :                                         return -1;
   19370             :                                 }
   19371           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19372           0 :                         } else if (PyBytes_Check(value)) {
   19373           0 :                                 test_str = PyBytes_AS_STRING(value);
   19374             :                         } else {
   19375           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19376           0 :                                 return -1;
   19377             :                         }
   19378           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19379           0 :                         if (unicode != NULL) {
   19380           0 :                                 Py_DECREF(unicode);
   19381             :                         }
   19382           0 :                         if (talloc_str == NULL) {
   19383           0 :                                 PyErr_NoMemory();
   19384           0 :                                 return -1;
   19385             :                         }
   19386           0 :                         object->dc_site_name = talloc_str;
   19387             :                 }
   19388             :         }
   19389           0 :         return 0;
   19390             : }
   19391             : 
   19392           0 : static PyObject *py_netr_DsRGetDCNameInfo_get_client_site_name(PyObject *obj, void *closure)
   19393             : {
   19394           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(obj);
   19395             :         PyObject *py_client_site_name;
   19396           0 :         if (object->client_site_name == NULL) {
   19397           0 :                 Py_RETURN_NONE;
   19398             :         }
   19399           0 :         if (object->client_site_name == NULL) {
   19400           0 :                 py_client_site_name = Py_None;
   19401           0 :                 Py_INCREF(py_client_site_name);
   19402             :         } else {
   19403           0 :                 if (object->client_site_name == NULL) {
   19404           0 :                         py_client_site_name = Py_None;
   19405           0 :                         Py_INCREF(py_client_site_name);
   19406             :                 } else {
   19407           0 :                         py_client_site_name = PyUnicode_Decode(object->client_site_name, strlen(object->client_site_name), "utf-8", "ignore");
   19408             :                 }
   19409             :         }
   19410           0 :         return py_client_site_name;
   19411             : }
   19412             : 
   19413           0 : static int py_netr_DsRGetDCNameInfo_set_client_site_name(PyObject *py_obj, PyObject *value, void *closure)
   19414             : {
   19415           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(py_obj);
   19416           0 :         if (value == NULL) {
   19417           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client_site_name");
   19418           0 :                 return -1;
   19419             :         }
   19420           0 :         if (value == Py_None) {
   19421           0 :                 object->client_site_name = NULL;
   19422             :         } else {
   19423           0 :                 object->client_site_name = NULL;
   19424             :                 {
   19425             :                         const char *test_str;
   19426             :                         const char *talloc_str;
   19427           0 :                         PyObject *unicode = NULL;
   19428           0 :                         if (PyUnicode_Check(value)) {
   19429           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19430           0 :                                 if (unicode == NULL) {
   19431           0 :                                         PyErr_NoMemory();
   19432           0 :                                         return -1;
   19433             :                                 }
   19434           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19435           0 :                         } else if (PyBytes_Check(value)) {
   19436           0 :                                 test_str = PyBytes_AS_STRING(value);
   19437             :                         } else {
   19438           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19439           0 :                                 return -1;
   19440             :                         }
   19441           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19442           0 :                         if (unicode != NULL) {
   19443           0 :                                 Py_DECREF(unicode);
   19444             :                         }
   19445           0 :                         if (talloc_str == NULL) {
   19446           0 :                                 PyErr_NoMemory();
   19447           0 :                                 return -1;
   19448             :                         }
   19449           0 :                         object->client_site_name = talloc_str;
   19450             :                 }
   19451             :         }
   19452           0 :         return 0;
   19453             : }
   19454             : 
   19455             : static PyGetSetDef py_netr_DsRGetDCNameInfo_getsetters[] = {
   19456             :         {
   19457             :                 .name = discard_const_p(char, "dc_unc"),
   19458             :                 .get = py_netr_DsRGetDCNameInfo_get_dc_unc,
   19459             :                 .set = py_netr_DsRGetDCNameInfo_set_dc_unc,
   19460             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19461             :         },
   19462             :         {
   19463             :                 .name = discard_const_p(char, "dc_address"),
   19464             :                 .get = py_netr_DsRGetDCNameInfo_get_dc_address,
   19465             :                 .set = py_netr_DsRGetDCNameInfo_set_dc_address,
   19466             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19467             :         },
   19468             :         {
   19469             :                 .name = discard_const_p(char, "dc_address_type"),
   19470             :                 .get = py_netr_DsRGetDCNameInfo_get_dc_address_type,
   19471             :                 .set = py_netr_DsRGetDCNameInfo_set_dc_address_type,
   19472             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCNameInfo_AddressType")
   19473             :         },
   19474             :         {
   19475             :                 .name = discard_const_p(char, "domain_guid"),
   19476             :                 .get = py_netr_DsRGetDCNameInfo_get_domain_guid,
   19477             :                 .set = py_netr_DsRGetDCNameInfo_set_domain_guid,
   19478             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   19479             :         },
   19480             :         {
   19481             :                 .name = discard_const_p(char, "domain_name"),
   19482             :                 .get = py_netr_DsRGetDCNameInfo_get_domain_name,
   19483             :                 .set = py_netr_DsRGetDCNameInfo_set_domain_name,
   19484             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19485             :         },
   19486             :         {
   19487             :                 .name = discard_const_p(char, "forest_name"),
   19488             :                 .get = py_netr_DsRGetDCNameInfo_get_forest_name,
   19489             :                 .set = py_netr_DsRGetDCNameInfo_set_forest_name,
   19490             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19491             :         },
   19492             :         {
   19493             :                 .name = discard_const_p(char, "dc_flags"),
   19494             :                 .get = py_netr_DsRGetDCNameInfo_get_dc_flags,
   19495             :                 .set = py_netr_DsRGetDCNameInfo_set_dc_flags,
   19496             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsR_DcFlags")
   19497             :         },
   19498             :         {
   19499             :                 .name = discard_const_p(char, "dc_site_name"),
   19500             :                 .get = py_netr_DsRGetDCNameInfo_get_dc_site_name,
   19501             :                 .set = py_netr_DsRGetDCNameInfo_set_dc_site_name,
   19502             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19503             :         },
   19504             :         {
   19505             :                 .name = discard_const_p(char, "client_site_name"),
   19506             :                 .get = py_netr_DsRGetDCNameInfo_get_client_site_name,
   19507             :                 .set = py_netr_DsRGetDCNameInfo_set_client_site_name,
   19508             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19509             :         },
   19510             :         { .name = NULL }
   19511             : };
   19512             : 
   19513           0 : static PyObject *py_netr_DsRGetDCNameInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   19514             : {
   19515           0 :         return pytalloc_new(struct netr_DsRGetDCNameInfo, type);
   19516             : }
   19517             : 
   19518           0 : static PyObject *py_netr_DsRGetDCNameInfo_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   19519             : {
   19520           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(py_obj);
   19521           0 :         PyObject *ret = NULL;
   19522             :         DATA_BLOB blob;
   19523             :         enum ndr_err_code err;
   19524           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   19525           0 :         if (tmp_ctx == NULL) {
   19526           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   19527           0 :                 return NULL;
   19528             :         }
   19529           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_DsRGetDCNameInfo);
   19530           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   19531           0 :                 TALLOC_FREE(tmp_ctx);
   19532           0 :                 PyErr_SetNdrError(err);
   19533           0 :                 return NULL;
   19534             :         }
   19535             : 
   19536           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   19537           0 :         TALLOC_FREE(tmp_ctx);
   19538           0 :         return ret;
   19539             : }
   19540             : 
   19541           0 : static PyObject *py_netr_DsRGetDCNameInfo_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   19542             : {
   19543           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(py_obj);
   19544           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   19545           0 :         Py_ssize_t blob_length = 0;
   19546             :         enum ndr_err_code err;
   19547           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   19548           0 :         PyObject *allow_remaining_obj = NULL;
   19549           0 :         bool allow_remaining = false;
   19550             : 
   19551           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   19552             :                 discard_const_p(char *, kwnames),
   19553             :                 &blob.data, &blob_length,
   19554             :                 &allow_remaining_obj)) {
   19555           0 :                 return NULL;
   19556             :         }
   19557           0 :         blob.length = blob_length;
   19558             : 
   19559           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   19560           0 :                 allow_remaining = true;
   19561             :         }
   19562             : 
   19563           0 :         if (allow_remaining) {
   19564           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_DsRGetDCNameInfo);
   19565             :         } else {
   19566           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_DsRGetDCNameInfo);
   19567             :         }
   19568           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   19569           0 :                 PyErr_SetNdrError(err);
   19570           0 :                 return NULL;
   19571             :         }
   19572             : 
   19573           0 :         Py_RETURN_NONE;
   19574             : }
   19575             : 
   19576           0 : static PyObject *py_netr_DsRGetDCNameInfo_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   19577             : {
   19578           0 :         struct netr_DsRGetDCNameInfo *object = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(py_obj);
   19579             :         PyObject *ret;
   19580             :         char *retstr;
   19581             : 
   19582           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_DsRGetDCNameInfo, "netr_DsRGetDCNameInfo", object);
   19583           0 :         ret = PyUnicode_FromString(retstr);
   19584           0 :         talloc_free(retstr);
   19585             : 
   19586           0 :         return ret;
   19587             : }
   19588             : 
   19589             : static PyMethodDef py_netr_DsRGetDCNameInfo_methods[] = {
   19590             :         { "__ndr_pack__", (PyCFunction)py_netr_DsRGetDCNameInfo_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   19591             :         { "__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" },
   19592             :         { "__ndr_print__", (PyCFunction)py_netr_DsRGetDCNameInfo_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   19593             :         { NULL, NULL, 0, NULL }
   19594             : };
   19595             : 
   19596             : 
   19597             : static PyTypeObject netr_DsRGetDCNameInfo_Type = {
   19598             :         PyVarObject_HEAD_INIT(NULL, 0)
   19599             :         .tp_name = "netlogon.netr_DsRGetDCNameInfo",
   19600             :         .tp_getset = py_netr_DsRGetDCNameInfo_getsetters,
   19601             :         .tp_methods = py_netr_DsRGetDCNameInfo_methods,
   19602             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   19603             :         .tp_new = py_netr_DsRGetDCNameInfo_new,
   19604             : };
   19605             : 
   19606           0 : static PyObject *py_import_netr_Capabilities(TALLOC_CTX *mem_ctx, int level, union netr_Capabilities *in)
   19607             : {
   19608             :         PyObject *ret;
   19609             : 
   19610           0 :         switch (level) {
   19611           0 :                 case 1:
   19612           0 :                         ret = PyLong_FromUnsignedLongLong((uint32_t)in->server_capabilities);
   19613           0 :                         return ret;
   19614             : 
   19615             :         }
   19616           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   19617           0 :         return NULL;
   19618             : }
   19619             : 
   19620           0 : static union netr_Capabilities *py_export_netr_Capabilities(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   19621             : {
   19622           0 :         union netr_Capabilities *ret = talloc_zero(mem_ctx, union netr_Capabilities);
   19623           0 :         switch (level) {
   19624           0 :                 case 1:
   19625           0 :                         if (in == NULL) {
   19626           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->server_capabilities");
   19627           0 :                                 talloc_free(ret); return NULL;
   19628             :                         }
   19629             :                         {
   19630           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->server_capabilities));
   19631           0 :                                 if (PyLong_Check(in)) {
   19632             :                                         unsigned long long test_var;
   19633           0 :                                         test_var = PyLong_AsUnsignedLongLong(in);
   19634           0 :                                         if (PyErr_Occurred() != NULL) {
   19635           0 :                                                 talloc_free(ret); return NULL;
   19636             :                                         }
   19637           0 :                                         if (test_var > uint_max) {
   19638           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   19639             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   19640           0 :                                                 talloc_free(ret); return NULL;
   19641             :                                         }
   19642           0 :                                         ret->server_capabilities = test_var;
   19643             :                                 } else {
   19644           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   19645             :                                           PyLong_Type.tp_name);
   19646           0 :                                         talloc_free(ret); return NULL;
   19647             :                                 }
   19648             :                         }
   19649           0 :                         break;
   19650             : 
   19651           0 :                 default:
   19652           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   19653           0 :                         talloc_free(ret);
   19654           0 :                         ret = NULL;
   19655             :         }
   19656             : 
   19657           0 :         return ret;
   19658             : }
   19659             : 
   19660           0 : static PyObject *py_netr_Capabilities_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   19661             : {
   19662           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   19663           0 :         PyObject *mem_ctx_obj = NULL;
   19664           0 :         TALLOC_CTX *mem_ctx = NULL;
   19665           0 :         int level = 0;
   19666           0 :         PyObject *in_obj = NULL;
   19667           0 :         union netr_Capabilities *in = NULL;
   19668             : 
   19669           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   19670             :                 discard_const_p(char *, kwnames),
   19671             :                 &mem_ctx_obj,
   19672             :                 &level,
   19673             :                 &in_obj)) {
   19674           0 :                 return NULL;
   19675             :         }
   19676           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   19677           0 :         if (mem_ctx == NULL) {
   19678           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   19679           0 :                 return NULL;
   19680             :         }
   19681           0 :         in = (union netr_Capabilities *)pytalloc_get_ptr(in_obj);
   19682           0 :         if (in == NULL) {
   19683           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_Capabilities!");
   19684           0 :                 return NULL;
   19685             :         }
   19686             : 
   19687           0 :         return py_import_netr_Capabilities(mem_ctx, level, in);
   19688             : }
   19689             : 
   19690           0 : static PyObject *py_netr_Capabilities_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   19691             : {
   19692           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   19693           0 :         PyObject *mem_ctx_obj = NULL;
   19694           0 :         TALLOC_CTX *mem_ctx = NULL;
   19695           0 :         int level = 0;
   19696           0 :         PyObject *in = NULL;
   19697           0 :         union netr_Capabilities *out = NULL;
   19698             : 
   19699           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   19700             :                 discard_const_p(char *, kwnames),
   19701             :                 &mem_ctx_obj,
   19702             :                 &level,
   19703             :                 &in)) {
   19704           0 :                 return NULL;
   19705             :         }
   19706           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   19707           0 :         if (mem_ctx == NULL) {
   19708           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   19709           0 :                 return NULL;
   19710             :         }
   19711             : 
   19712           0 :         out = py_export_netr_Capabilities(mem_ctx, level, in);
   19713           0 :         if (out == NULL) {
   19714           0 :                 return NULL;
   19715             :         }
   19716             : 
   19717           0 :         return pytalloc_GenericObject_reference(out);
   19718             : }
   19719             : 
   19720             : static PyMethodDef py_netr_Capabilities_methods[] = {
   19721             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Capabilities_import),
   19722             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   19723             :                 "T.__import__(mem_ctx, level, in) => ret." },
   19724             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Capabilities_export),
   19725             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   19726             :                 "T.__export__(mem_ctx, level, in) => ret." },
   19727             :         { NULL, NULL, 0, NULL }
   19728             : };
   19729             : 
   19730           0 : static PyObject *py_netr_Capabilities_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   19731             : {
   19732           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   19733           0 :         return NULL;
   19734             : }
   19735             : 
   19736             : 
   19737             : static PyTypeObject netr_Capabilities_Type = {
   19738             :         PyVarObject_HEAD_INIT(NULL, 0)
   19739             :         .tp_name = "netlogon.netr_Capabilities",
   19740             :         .tp_getset = NULL,
   19741             :         .tp_methods = py_netr_Capabilities_methods,
   19742             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   19743             :         .tp_new = py_netr_Capabilities_new,
   19744             : };
   19745             : 
   19746             : 
   19747           0 : static PyObject *py_netr_LsaPolicyInformation_get_policy_size(PyObject *obj, void *closure)
   19748             : {
   19749           0 :         struct netr_LsaPolicyInformation *object = (struct netr_LsaPolicyInformation *)pytalloc_get_ptr(obj);
   19750             :         PyObject *py_policy_size;
   19751           0 :         py_policy_size = PyLong_FromUnsignedLongLong((uint32_t)object->policy_size);
   19752           0 :         return py_policy_size;
   19753             : }
   19754             : 
   19755           0 : static int py_netr_LsaPolicyInformation_set_policy_size(PyObject *py_obj, PyObject *value, void *closure)
   19756             : {
   19757           0 :         struct netr_LsaPolicyInformation *object = (struct netr_LsaPolicyInformation *)pytalloc_get_ptr(py_obj);
   19758           0 :         if (value == NULL) {
   19759           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->policy_size");
   19760           0 :                 return -1;
   19761             :         }
   19762             :         {
   19763           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->policy_size));
   19764           0 :                 if (PyLong_Check(value)) {
   19765             :                         unsigned long long test_var;
   19766           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19767           0 :                         if (PyErr_Occurred() != NULL) {
   19768           0 :                                 return -1;
   19769             :                         }
   19770           0 :                         if (test_var > uint_max) {
   19771           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   19772             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19773           0 :                                 return -1;
   19774             :                         }
   19775           0 :                         object->policy_size = test_var;
   19776             :                 } else {
   19777           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   19778             :                           PyLong_Type.tp_name);
   19779           0 :                         return -1;
   19780             :                 }
   19781             :         }
   19782           0 :         return 0;
   19783             : }
   19784             : 
   19785           0 : static PyObject *py_netr_LsaPolicyInformation_get_policy(PyObject *obj, void *closure)
   19786             : {
   19787           0 :         struct netr_LsaPolicyInformation *object = (struct netr_LsaPolicyInformation *)pytalloc_get_ptr(obj);
   19788             :         PyObject *py_policy;
   19789           0 :         if (object->policy == NULL) {
   19790           0 :                 Py_RETURN_NONE;
   19791             :         }
   19792           0 :         if (object->policy == NULL) {
   19793           0 :                 py_policy = Py_None;
   19794           0 :                 Py_INCREF(py_policy);
   19795             :         } else {
   19796           0 :                 py_policy = PyList_New(object->policy_size);
   19797           0 :                 if (py_policy == NULL) {
   19798           0 :                         return NULL;
   19799             :                 }
   19800             :                 {
   19801             :                         int policy_cntr_1;
   19802           0 :                         for (policy_cntr_1 = 0; policy_cntr_1 < (object->policy_size); policy_cntr_1++) {
   19803             :                                 PyObject *py_policy_1;
   19804           0 :                                 py_policy_1 = PyLong_FromLong((uint16_t)object->policy[policy_cntr_1]);
   19805           0 :                                 PyList_SetItem(py_policy, policy_cntr_1, py_policy_1);
   19806             :                         }
   19807             :                 }
   19808             :         }
   19809           0 :         return py_policy;
   19810             : }
   19811             : 
   19812           0 : static int py_netr_LsaPolicyInformation_set_policy(PyObject *py_obj, PyObject *value, void *closure)
   19813             : {
   19814           0 :         struct netr_LsaPolicyInformation *object = (struct netr_LsaPolicyInformation *)pytalloc_get_ptr(py_obj);
   19815           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->policy));
   19816           0 :         if (value == NULL) {
   19817           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->policy");
   19818           0 :                 return -1;
   19819             :         }
   19820           0 :         if (value == Py_None) {
   19821           0 :                 object->policy = NULL;
   19822             :         } else {
   19823           0 :                 object->policy = NULL;
   19824           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   19825             :                 {
   19826             :                         int policy_cntr_1;
   19827           0 :                         object->policy = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->policy, PyList_GET_SIZE(value));
   19828           0 :                         if (!object->policy) { return -1;; }
   19829           0 :                         talloc_set_name_const(object->policy, "ARRAY: object->policy");
   19830           0 :                         for (policy_cntr_1 = 0; policy_cntr_1 < PyList_GET_SIZE(value); policy_cntr_1++) {
   19831           0 :                                 if (PyList_GET_ITEM(value, policy_cntr_1) == NULL) {
   19832           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->policy[policy_cntr_1]");
   19833           0 :                                         return -1;
   19834             :                                 }
   19835             :                                 {
   19836           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->policy[policy_cntr_1]));
   19837           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, policy_cntr_1))) {
   19838             :                                                 unsigned long long test_var;
   19839           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, policy_cntr_1));
   19840           0 :                                                 if (PyErr_Occurred() != NULL) {
   19841           0 :                                                         return -1;
   19842             :                                                 }
   19843           0 :                                                 if (test_var > uint_max) {
   19844           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   19845             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   19846           0 :                                                         return -1;
   19847             :                                                 }
   19848           0 :                                                 object->policy[policy_cntr_1] = test_var;
   19849             :                                         } else {
   19850           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",\
   19851             :                                                   PyLong_Type.tp_name);
   19852           0 :                                                 return -1;
   19853             :                                         }
   19854             :                                 }
   19855             :                         }
   19856             :                 }
   19857             :         }
   19858           0 :         return 0;
   19859             : }
   19860             : 
   19861             : static PyGetSetDef py_netr_LsaPolicyInformation_getsetters[] = {
   19862             :         {
   19863             :                 .name = discard_const_p(char, "policy_size"),
   19864             :                 .get = py_netr_LsaPolicyInformation_get_policy_size,
   19865             :                 .set = py_netr_LsaPolicyInformation_set_policy_size,
   19866             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   19867             :         },
   19868             :         {
   19869             :                 .name = discard_const_p(char, "policy"),
   19870             :                 .get = py_netr_LsaPolicyInformation_get_policy,
   19871             :                 .set = py_netr_LsaPolicyInformation_set_policy,
   19872             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   19873             :         },
   19874             :         { .name = NULL }
   19875             : };
   19876             : 
   19877           0 : static PyObject *py_netr_LsaPolicyInformation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   19878             : {
   19879           0 :         return pytalloc_new(struct netr_LsaPolicyInformation, type);
   19880             : }
   19881             : 
   19882             : 
   19883             : static PyTypeObject netr_LsaPolicyInformation_Type = {
   19884             :         PyVarObject_HEAD_INIT(NULL, 0)
   19885             :         .tp_name = "netlogon.netr_LsaPolicyInformation",
   19886             :         .tp_getset = py_netr_LsaPolicyInformation_getsetters,
   19887             :         .tp_methods = NULL,
   19888             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   19889             :         .tp_new = py_netr_LsaPolicyInformation_new,
   19890             : };
   19891             : 
   19892             : 
   19893           0 : static PyObject *py_netr_OsVersionInfoEx_get_OSVersionInfoSize(PyObject *obj, void *closure)
   19894             : {
   19895           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(obj);
   19896             :         PyObject *py_OSVersionInfoSize;
   19897           0 :         py_OSVersionInfoSize = PyLong_FromUnsignedLongLong((uint32_t)object->OSVersionInfoSize);
   19898           0 :         return py_OSVersionInfoSize;
   19899             : }
   19900             : 
   19901           0 : static int py_netr_OsVersionInfoEx_set_OSVersionInfoSize(PyObject *py_obj, PyObject *value, void *closure)
   19902             : {
   19903           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(py_obj);
   19904           0 :         if (value == NULL) {
   19905           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->OSVersionInfoSize");
   19906           0 :                 return -1;
   19907             :         }
   19908             :         {
   19909           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->OSVersionInfoSize));
   19910           0 :                 if (PyLong_Check(value)) {
   19911             :                         unsigned long long test_var;
   19912           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19913           0 :                         if (PyErr_Occurred() != NULL) {
   19914           0 :                                 return -1;
   19915             :                         }
   19916           0 :                         if (test_var > uint_max) {
   19917           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   19918             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19919           0 :                                 return -1;
   19920             :                         }
   19921           0 :                         object->OSVersionInfoSize = test_var;
   19922             :                 } else {
   19923           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   19924             :                           PyLong_Type.tp_name);
   19925           0 :                         return -1;
   19926             :                 }
   19927             :         }
   19928           0 :         return 0;
   19929             : }
   19930             : 
   19931           0 : static PyObject *py_netr_OsVersionInfoEx_get_MajorVersion(PyObject *obj, void *closure)
   19932             : {
   19933           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(obj);
   19934             :         PyObject *py_MajorVersion;
   19935           0 :         py_MajorVersion = PyLong_FromUnsignedLongLong((uint32_t)object->MajorVersion);
   19936           0 :         return py_MajorVersion;
   19937             : }
   19938             : 
   19939           0 : static int py_netr_OsVersionInfoEx_set_MajorVersion(PyObject *py_obj, PyObject *value, void *closure)
   19940             : {
   19941           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(py_obj);
   19942           0 :         if (value == NULL) {
   19943           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->MajorVersion");
   19944           0 :                 return -1;
   19945             :         }
   19946             :         {
   19947           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->MajorVersion));
   19948           0 :                 if (PyLong_Check(value)) {
   19949             :                         unsigned long long test_var;
   19950           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19951           0 :                         if (PyErr_Occurred() != NULL) {
   19952           0 :                                 return -1;
   19953             :                         }
   19954           0 :                         if (test_var > uint_max) {
   19955           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   19956             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19957           0 :                                 return -1;
   19958             :                         }
   19959           0 :                         object->MajorVersion = test_var;
   19960             :                 } else {
   19961           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   19962             :                           PyLong_Type.tp_name);
   19963           0 :                         return -1;
   19964             :                 }
   19965             :         }
   19966           0 :         return 0;
   19967             : }
   19968             : 
   19969           0 : static PyObject *py_netr_OsVersionInfoEx_get_MinorVersion(PyObject *obj, void *closure)
   19970             : {
   19971           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(obj);
   19972             :         PyObject *py_MinorVersion;
   19973           0 :         py_MinorVersion = PyLong_FromUnsignedLongLong((uint32_t)object->MinorVersion);
   19974           0 :         return py_MinorVersion;
   19975             : }
   19976             : 
   19977           0 : static int py_netr_OsVersionInfoEx_set_MinorVersion(PyObject *py_obj, PyObject *value, void *closure)
   19978             : {
   19979           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(py_obj);
   19980           0 :         if (value == NULL) {
   19981           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->MinorVersion");
   19982           0 :                 return -1;
   19983             :         }
   19984             :         {
   19985           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->MinorVersion));
   19986           0 :                 if (PyLong_Check(value)) {
   19987             :                         unsigned long long test_var;
   19988           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19989           0 :                         if (PyErr_Occurred() != NULL) {
   19990           0 :                                 return -1;
   19991             :                         }
   19992           0 :                         if (test_var > uint_max) {
   19993           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   19994             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19995           0 :                                 return -1;
   19996             :                         }
   19997           0 :                         object->MinorVersion = test_var;
   19998             :                 } else {
   19999           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   20000             :                           PyLong_Type.tp_name);
   20001           0 :                         return -1;
   20002             :                 }
   20003             :         }
   20004           0 :         return 0;
   20005             : }
   20006             : 
   20007           0 : static PyObject *py_netr_OsVersionInfoEx_get_BuildNumber(PyObject *obj, void *closure)
   20008             : {
   20009           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(obj);
   20010             :         PyObject *py_BuildNumber;
   20011           0 :         py_BuildNumber = PyLong_FromUnsignedLongLong((uint32_t)object->BuildNumber);
   20012           0 :         return py_BuildNumber;
   20013             : }
   20014             : 
   20015           0 : static int py_netr_OsVersionInfoEx_set_BuildNumber(PyObject *py_obj, PyObject *value, void *closure)
   20016             : {
   20017           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(py_obj);
   20018           0 :         if (value == NULL) {
   20019           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->BuildNumber");
   20020           0 :                 return -1;
   20021             :         }
   20022             :         {
   20023           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->BuildNumber));
   20024           0 :                 if (PyLong_Check(value)) {
   20025             :                         unsigned long long test_var;
   20026           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20027           0 :                         if (PyErr_Occurred() != NULL) {
   20028           0 :                                 return -1;
   20029             :                         }
   20030           0 :                         if (test_var > uint_max) {
   20031           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   20032             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20033           0 :                                 return -1;
   20034             :                         }
   20035           0 :                         object->BuildNumber = test_var;
   20036             :                 } else {
   20037           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   20038             :                           PyLong_Type.tp_name);
   20039           0 :                         return -1;
   20040             :                 }
   20041             :         }
   20042           0 :         return 0;
   20043             : }
   20044             : 
   20045           0 : static PyObject *py_netr_OsVersionInfoEx_get_PlatformId(PyObject *obj, void *closure)
   20046             : {
   20047           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(obj);
   20048             :         PyObject *py_PlatformId;
   20049           0 :         py_PlatformId = PyLong_FromUnsignedLongLong((uint32_t)object->PlatformId);
   20050           0 :         return py_PlatformId;
   20051             : }
   20052             : 
   20053           0 : static int py_netr_OsVersionInfoEx_set_PlatformId(PyObject *py_obj, PyObject *value, void *closure)
   20054             : {
   20055           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(py_obj);
   20056           0 :         if (value == NULL) {
   20057           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->PlatformId");
   20058           0 :                 return -1;
   20059             :         }
   20060             :         {
   20061           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->PlatformId));
   20062           0 :                 if (PyLong_Check(value)) {
   20063             :                         unsigned long long test_var;
   20064           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20065           0 :                         if (PyErr_Occurred() != NULL) {
   20066           0 :                                 return -1;
   20067             :                         }
   20068           0 :                         if (test_var > uint_max) {
   20069           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   20070             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20071           0 :                                 return -1;
   20072             :                         }
   20073           0 :                         object->PlatformId = test_var;
   20074             :                 } else {
   20075           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   20076             :                           PyLong_Type.tp_name);
   20077           0 :                         return -1;
   20078             :                 }
   20079             :         }
   20080           0 :         return 0;
   20081             : }
   20082             : 
   20083           0 : static PyObject *py_netr_OsVersionInfoEx_get_CSDVersion(PyObject *obj, void *closure)
   20084             : {
   20085           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(obj);
   20086             :         PyObject *py_CSDVersion;
   20087           0 :         py_CSDVersion = PyString_FromStringOrNULL(object->CSDVersion);
   20088           0 :         return py_CSDVersion;
   20089             : }
   20090             : 
   20091           0 : static int py_netr_OsVersionInfoEx_set_CSDVersion(PyObject *py_obj, PyObject *value, void *closure)
   20092             : {
   20093           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(py_obj);
   20094           0 :         if (value == NULL) {
   20095           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->CSDVersion");
   20096           0 :                 return -1;
   20097             :         }
   20098             :         {
   20099             :                 const char *test_str;
   20100             :                 const char *talloc_str;
   20101           0 :                 PyObject *unicode = NULL;
   20102           0 :                 if (PyUnicode_Check(value)) {
   20103           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   20104           0 :                         if (unicode == NULL) {
   20105           0 :                                 PyErr_NoMemory();
   20106           0 :                                 return -1;
   20107             :                         }
   20108           0 :                         test_str = PyBytes_AS_STRING(unicode);
   20109           0 :                 } else if (PyBytes_Check(value)) {
   20110           0 :                         test_str = PyBytes_AS_STRING(value);
   20111             :                 } else {
   20112           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   20113           0 :                         return -1;
   20114             :                 }
   20115           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   20116           0 :                 if (unicode != NULL) {
   20117           0 :                         Py_DECREF(unicode);
   20118             :                 }
   20119           0 :                 if (talloc_str == NULL) {
   20120           0 :                         PyErr_NoMemory();
   20121           0 :                         return -1;
   20122             :                 }
   20123           0 :                 object->CSDVersion = talloc_str;
   20124             :         }
   20125           0 :         return 0;
   20126             : }
   20127             : 
   20128           0 : static PyObject *py_netr_OsVersionInfoEx_get_ServicePackMajor(PyObject *obj, void *closure)
   20129             : {
   20130           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(obj);
   20131             :         PyObject *py_ServicePackMajor;
   20132           0 :         py_ServicePackMajor = PyLong_FromLong((uint16_t)object->ServicePackMajor);
   20133           0 :         return py_ServicePackMajor;
   20134             : }
   20135             : 
   20136           0 : static int py_netr_OsVersionInfoEx_set_ServicePackMajor(PyObject *py_obj, PyObject *value, void *closure)
   20137             : {
   20138           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(py_obj);
   20139           0 :         if (value == NULL) {
   20140           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ServicePackMajor");
   20141           0 :                 return -1;
   20142             :         }
   20143             :         {
   20144           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ServicePackMajor));
   20145           0 :                 if (PyLong_Check(value)) {
   20146             :                         unsigned long long test_var;
   20147           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20148           0 :                         if (PyErr_Occurred() != NULL) {
   20149           0 :                                 return -1;
   20150             :                         }
   20151           0 :                         if (test_var > uint_max) {
   20152           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   20153             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20154           0 :                                 return -1;
   20155             :                         }
   20156           0 :                         object->ServicePackMajor = test_var;
   20157             :                 } else {
   20158           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   20159             :                           PyLong_Type.tp_name);
   20160           0 :                         return -1;
   20161             :                 }
   20162             :         }
   20163           0 :         return 0;
   20164             : }
   20165             : 
   20166           0 : static PyObject *py_netr_OsVersionInfoEx_get_ServicePackMinor(PyObject *obj, void *closure)
   20167             : {
   20168           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(obj);
   20169             :         PyObject *py_ServicePackMinor;
   20170           0 :         py_ServicePackMinor = PyLong_FromLong((uint16_t)object->ServicePackMinor);
   20171           0 :         return py_ServicePackMinor;
   20172             : }
   20173             : 
   20174           0 : static int py_netr_OsVersionInfoEx_set_ServicePackMinor(PyObject *py_obj, PyObject *value, void *closure)
   20175             : {
   20176           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(py_obj);
   20177           0 :         if (value == NULL) {
   20178           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ServicePackMinor");
   20179           0 :                 return -1;
   20180             :         }
   20181             :         {
   20182           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ServicePackMinor));
   20183           0 :                 if (PyLong_Check(value)) {
   20184             :                         unsigned long long test_var;
   20185           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20186           0 :                         if (PyErr_Occurred() != NULL) {
   20187           0 :                                 return -1;
   20188             :                         }
   20189           0 :                         if (test_var > uint_max) {
   20190           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   20191             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20192           0 :                                 return -1;
   20193             :                         }
   20194           0 :                         object->ServicePackMinor = test_var;
   20195             :                 } else {
   20196           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   20197             :                           PyLong_Type.tp_name);
   20198           0 :                         return -1;
   20199             :                 }
   20200             :         }
   20201           0 :         return 0;
   20202             : }
   20203             : 
   20204           0 : static PyObject *py_netr_OsVersionInfoEx_get_SuiteMask(PyObject *obj, void *closure)
   20205             : {
   20206           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(obj);
   20207             :         PyObject *py_SuiteMask;
   20208           0 :         py_SuiteMask = PyLong_FromLong((uint16_t)object->SuiteMask);
   20209           0 :         return py_SuiteMask;
   20210             : }
   20211             : 
   20212           0 : static int py_netr_OsVersionInfoEx_set_SuiteMask(PyObject *py_obj, PyObject *value, void *closure)
   20213             : {
   20214           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(py_obj);
   20215           0 :         if (value == NULL) {
   20216           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->SuiteMask");
   20217           0 :                 return -1;
   20218             :         }
   20219             :         {
   20220           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->SuiteMask));
   20221           0 :                 if (PyLong_Check(value)) {
   20222             :                         unsigned long long test_var;
   20223           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20224           0 :                         if (PyErr_Occurred() != NULL) {
   20225           0 :                                 return -1;
   20226             :                         }
   20227           0 :                         if (test_var > uint_max) {
   20228           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   20229             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20230           0 :                                 return -1;
   20231             :                         }
   20232           0 :                         object->SuiteMask = test_var;
   20233             :                 } else {
   20234           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   20235             :                           PyLong_Type.tp_name);
   20236           0 :                         return -1;
   20237             :                 }
   20238             :         }
   20239           0 :         return 0;
   20240             : }
   20241             : 
   20242           0 : static PyObject *py_netr_OsVersionInfoEx_get_ProductType(PyObject *obj, void *closure)
   20243             : {
   20244           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(obj);
   20245             :         PyObject *py_ProductType;
   20246           0 :         py_ProductType = PyLong_FromLong((uint16_t)object->ProductType);
   20247           0 :         return py_ProductType;
   20248             : }
   20249             : 
   20250           0 : static int py_netr_OsVersionInfoEx_set_ProductType(PyObject *py_obj, PyObject *value, void *closure)
   20251             : {
   20252           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(py_obj);
   20253           0 :         if (value == NULL) {
   20254           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ProductType");
   20255           0 :                 return -1;
   20256             :         }
   20257             :         {
   20258           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ProductType));
   20259           0 :                 if (PyLong_Check(value)) {
   20260             :                         unsigned long long test_var;
   20261           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20262           0 :                         if (PyErr_Occurred() != NULL) {
   20263           0 :                                 return -1;
   20264             :                         }
   20265           0 :                         if (test_var > uint_max) {
   20266           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   20267             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20268           0 :                                 return -1;
   20269             :                         }
   20270           0 :                         object->ProductType = test_var;
   20271             :                 } else {
   20272           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   20273             :                           PyLong_Type.tp_name);
   20274           0 :                         return -1;
   20275             :                 }
   20276             :         }
   20277           0 :         return 0;
   20278             : }
   20279             : 
   20280           0 : static PyObject *py_netr_OsVersionInfoEx_get_Reserved(PyObject *obj, void *closure)
   20281             : {
   20282           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(obj);
   20283             :         PyObject *py_Reserved;
   20284           0 :         py_Reserved = PyLong_FromLong((uint16_t)object->Reserved);
   20285           0 :         return py_Reserved;
   20286             : }
   20287             : 
   20288           0 : static int py_netr_OsVersionInfoEx_set_Reserved(PyObject *py_obj, PyObject *value, void *closure)
   20289             : {
   20290           0 :         struct netr_OsVersionInfoEx *object = (struct netr_OsVersionInfoEx *)pytalloc_get_ptr(py_obj);
   20291           0 :         if (value == NULL) {
   20292           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Reserved");
   20293           0 :                 return -1;
   20294             :         }
   20295             :         {
   20296           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Reserved));
   20297           0 :                 if (PyLong_Check(value)) {
   20298             :                         unsigned long long test_var;
   20299           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20300           0 :                         if (PyErr_Occurred() != NULL) {
   20301           0 :                                 return -1;
   20302             :                         }
   20303           0 :                         if (test_var > uint_max) {
   20304           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   20305             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20306           0 :                                 return -1;
   20307             :                         }
   20308           0 :                         object->Reserved = test_var;
   20309             :                 } else {
   20310           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   20311             :                           PyLong_Type.tp_name);
   20312           0 :                         return -1;
   20313             :                 }
   20314             :         }
   20315           0 :         return 0;
   20316             : }
   20317             : 
   20318             : static PyGetSetDef py_netr_OsVersionInfoEx_getsetters[] = {
   20319             :         {
   20320             :                 .name = discard_const_p(char, "OSVersionInfoSize"),
   20321             :                 .get = py_netr_OsVersionInfoEx_get_OSVersionInfoSize,
   20322             :                 .set = py_netr_OsVersionInfoEx_set_OSVersionInfoSize,
   20323             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20324             :         },
   20325             :         {
   20326             :                 .name = discard_const_p(char, "MajorVersion"),
   20327             :                 .get = py_netr_OsVersionInfoEx_get_MajorVersion,
   20328             :                 .set = py_netr_OsVersionInfoEx_set_MajorVersion,
   20329             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20330             :         },
   20331             :         {
   20332             :                 .name = discard_const_p(char, "MinorVersion"),
   20333             :                 .get = py_netr_OsVersionInfoEx_get_MinorVersion,
   20334             :                 .set = py_netr_OsVersionInfoEx_set_MinorVersion,
   20335             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20336             :         },
   20337             :         {
   20338             :                 .name = discard_const_p(char, "BuildNumber"),
   20339             :                 .get = py_netr_OsVersionInfoEx_get_BuildNumber,
   20340             :                 .set = py_netr_OsVersionInfoEx_set_BuildNumber,
   20341             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20342             :         },
   20343             :         {
   20344             :                 .name = discard_const_p(char, "PlatformId"),
   20345             :                 .get = py_netr_OsVersionInfoEx_get_PlatformId,
   20346             :                 .set = py_netr_OsVersionInfoEx_set_PlatformId,
   20347             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20348             :         },
   20349             :         {
   20350             :                 .name = discard_const_p(char, "CSDVersion"),
   20351             :                 .get = py_netr_OsVersionInfoEx_get_CSDVersion,
   20352             :                 .set = py_netr_OsVersionInfoEx_set_CSDVersion,
   20353             :                 .doc = discard_const_p(char, "PIDL-generated element of base type string")
   20354             :         },
   20355             :         {
   20356             :                 .name = discard_const_p(char, "ServicePackMajor"),
   20357             :                 .get = py_netr_OsVersionInfoEx_get_ServicePackMajor,
   20358             :                 .set = py_netr_OsVersionInfoEx_set_ServicePackMajor,
   20359             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20360             :         },
   20361             :         {
   20362             :                 .name = discard_const_p(char, "ServicePackMinor"),
   20363             :                 .get = py_netr_OsVersionInfoEx_get_ServicePackMinor,
   20364             :                 .set = py_netr_OsVersionInfoEx_set_ServicePackMinor,
   20365             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20366             :         },
   20367             :         {
   20368             :                 .name = discard_const_p(char, "SuiteMask"),
   20369             :                 .get = py_netr_OsVersionInfoEx_get_SuiteMask,
   20370             :                 .set = py_netr_OsVersionInfoEx_set_SuiteMask,
   20371             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SuiteMask")
   20372             :         },
   20373             :         {
   20374             :                 .name = discard_const_p(char, "ProductType"),
   20375             :                 .get = py_netr_OsVersionInfoEx_get_ProductType,
   20376             :                 .set = py_netr_OsVersionInfoEx_set_ProductType,
   20377             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_ProductType")
   20378             :         },
   20379             :         {
   20380             :                 .name = discard_const_p(char, "Reserved"),
   20381             :                 .get = py_netr_OsVersionInfoEx_get_Reserved,
   20382             :                 .set = py_netr_OsVersionInfoEx_set_Reserved,
   20383             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   20384             :         },
   20385             :         { .name = NULL }
   20386             : };
   20387             : 
   20388           0 : static PyObject *py_netr_OsVersionInfoEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20389             : {
   20390           0 :         return pytalloc_new(struct netr_OsVersionInfoEx, type);
   20391             : }
   20392             : 
   20393             : 
   20394             : static PyTypeObject netr_OsVersionInfoEx_Type = {
   20395             :         PyVarObject_HEAD_INIT(NULL, 0)
   20396             :         .tp_name = "netlogon.netr_OsVersionInfoEx",
   20397             :         .tp_getset = py_netr_OsVersionInfoEx_getsetters,
   20398             :         .tp_methods = NULL,
   20399             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20400             :         .tp_new = py_netr_OsVersionInfoEx_new,
   20401             : };
   20402             : 
   20403             : 
   20404           0 : static PyObject *py_netr_OsVersion_get_length(PyObject *obj, void *closure)
   20405             : {
   20406           0 :         struct netr_OsVersion *object = (struct netr_OsVersion *)pytalloc_get_ptr(obj);
   20407             :         PyObject *py_length;
   20408           0 :         py_length = PyLong_FromUnsignedLongLong((uint32_t)object->length);
   20409           0 :         return py_length;
   20410             : }
   20411             : 
   20412           0 : static int py_netr_OsVersion_set_length(PyObject *py_obj, PyObject *value, void *closure)
   20413             : {
   20414           0 :         struct netr_OsVersion *object = (struct netr_OsVersion *)pytalloc_get_ptr(py_obj);
   20415           0 :         if (value == NULL) {
   20416           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
   20417           0 :                 return -1;
   20418             :         }
   20419             :         {
   20420           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
   20421           0 :                 if (PyLong_Check(value)) {
   20422             :                         unsigned long long test_var;
   20423           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20424           0 :                         if (PyErr_Occurred() != NULL) {
   20425           0 :                                 return -1;
   20426             :                         }
   20427           0 :                         if (test_var > uint_max) {
   20428           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   20429             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20430           0 :                                 return -1;
   20431             :                         }
   20432           0 :                         object->length = test_var;
   20433             :                 } else {
   20434           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   20435             :                           PyLong_Type.tp_name);
   20436           0 :                         return -1;
   20437             :                 }
   20438             :         }
   20439           0 :         return 0;
   20440             : }
   20441             : 
   20442           0 : static PyObject *py_netr_OsVersion_get_dummy(PyObject *obj, void *closure)
   20443             : {
   20444           0 :         struct netr_OsVersion *object = (struct netr_OsVersion *)pytalloc_get_ptr(obj);
   20445             :         PyObject *py_dummy;
   20446           0 :         py_dummy = PyLong_FromUnsignedLongLong((uint32_t)object->dummy);
   20447           0 :         return py_dummy;
   20448             : }
   20449             : 
   20450           0 : static int py_netr_OsVersion_set_dummy(PyObject *py_obj, PyObject *value, void *closure)
   20451             : {
   20452           0 :         struct netr_OsVersion *object = (struct netr_OsVersion *)pytalloc_get_ptr(py_obj);
   20453           0 :         if (value == NULL) {
   20454           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy");
   20455           0 :                 return -1;
   20456             :         }
   20457             :         {
   20458           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy));
   20459           0 :                 if (PyLong_Check(value)) {
   20460             :                         unsigned long long test_var;
   20461           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20462           0 :                         if (PyErr_Occurred() != NULL) {
   20463           0 :                                 return -1;
   20464             :                         }
   20465           0 :                         if (test_var > uint_max) {
   20466           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   20467             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20468           0 :                                 return -1;
   20469             :                         }
   20470           0 :                         object->dummy = test_var;
   20471             :                 } else {
   20472           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   20473             :                           PyLong_Type.tp_name);
   20474           0 :                         return -1;
   20475             :                 }
   20476             :         }
   20477           0 :         return 0;
   20478             : }
   20479             : 
   20480           0 : static PyObject *py_netr_OsVersion_get_size(PyObject *obj, void *closure)
   20481             : {
   20482           0 :         struct netr_OsVersion *object = (struct netr_OsVersion *)pytalloc_get_ptr(obj);
   20483             :         PyObject *py_size;
   20484           0 :         py_size = PyLong_FromUnsignedLongLong((uint32_t)object->size);
   20485           0 :         return py_size;
   20486             : }
   20487             : 
   20488           0 : static int py_netr_OsVersion_set_size(PyObject *py_obj, PyObject *value, void *closure)
   20489             : {
   20490           0 :         struct netr_OsVersion *object = (struct netr_OsVersion *)pytalloc_get_ptr(py_obj);
   20491           0 :         if (value == NULL) {
   20492           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->size");
   20493           0 :                 return -1;
   20494             :         }
   20495             :         {
   20496           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
   20497           0 :                 if (PyLong_Check(value)) {
   20498             :                         unsigned long long test_var;
   20499           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20500           0 :                         if (PyErr_Occurred() != NULL) {
   20501           0 :                                 return -1;
   20502             :                         }
   20503           0 :                         if (test_var > uint_max) {
   20504           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   20505             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20506           0 :                                 return -1;
   20507             :                         }
   20508           0 :                         object->size = test_var;
   20509             :                 } else {
   20510           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   20511             :                           PyLong_Type.tp_name);
   20512           0 :                         return -1;
   20513             :                 }
   20514             :         }
   20515           0 :         return 0;
   20516             : }
   20517             : 
   20518           0 : static PyObject *py_netr_OsVersion_get_os(PyObject *obj, void *closure)
   20519             : {
   20520           0 :         struct netr_OsVersion *object = (struct netr_OsVersion *)pytalloc_get_ptr(obj);
   20521             :         PyObject *py_os;
   20522           0 :         py_os = pytalloc_reference_ex(&netr_OsVersionInfoEx_Type, pytalloc_get_mem_ctx(obj), &object->os);
   20523           0 :         return py_os;
   20524             : }
   20525             : 
   20526           0 : static int py_netr_OsVersion_set_os(PyObject *py_obj, PyObject *value, void *closure)
   20527             : {
   20528           0 :         struct netr_OsVersion *object = (struct netr_OsVersion *)pytalloc_get_ptr(py_obj);
   20529           0 :         if (value == NULL) {
   20530           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->os");
   20531           0 :                 return -1;
   20532             :         }
   20533           0 :         PY_CHECK_TYPE(&netr_OsVersionInfoEx_Type, value, return -1;);
   20534           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   20535           0 :                 PyErr_NoMemory();
   20536           0 :                 return -1;
   20537             :         }
   20538           0 :         object->os = *(struct netr_OsVersionInfoEx *)pytalloc_get_ptr(value);
   20539           0 :         return 0;
   20540             : }
   20541             : 
   20542             : static PyGetSetDef py_netr_OsVersion_getsetters[] = {
   20543             :         {
   20544             :                 .name = discard_const_p(char, "length"),
   20545             :                 .get = py_netr_OsVersion_get_length,
   20546             :                 .set = py_netr_OsVersion_set_length,
   20547             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
   20548             :         },
   20549             :         {
   20550             :                 .name = discard_const_p(char, "dummy"),
   20551             :                 .get = py_netr_OsVersion_get_dummy,
   20552             :                 .set = py_netr_OsVersion_set_dummy,
   20553             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
   20554             :         },
   20555             :         {
   20556             :                 .name = discard_const_p(char, "size"),
   20557             :                 .get = py_netr_OsVersion_get_size,
   20558             :                 .set = py_netr_OsVersion_set_size,
   20559             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
   20560             :         },
   20561             :         {
   20562             :                 .name = discard_const_p(char, "os"),
   20563             :                 .get = py_netr_OsVersion_get_os,
   20564             :                 .set = py_netr_OsVersion_set_os,
   20565             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_OsVersionInfoEx")
   20566             :         },
   20567             :         { .name = NULL }
   20568             : };
   20569             : 
   20570           0 : static PyObject *py_netr_OsVersion_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20571             : {
   20572           0 :         return pytalloc_new(struct netr_OsVersion, type);
   20573             : }
   20574             : 
   20575             : 
   20576             : static PyTypeObject netr_OsVersion_Type = {
   20577             :         PyVarObject_HEAD_INIT(NULL, 0)
   20578             :         .tp_name = "netlogon.netr_OsVersion",
   20579             :         .tp_getset = py_netr_OsVersion_getsetters,
   20580             :         .tp_methods = NULL,
   20581             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20582             :         .tp_new = py_netr_OsVersion_new,
   20583             : };
   20584             : 
   20585             : 
   20586           0 : static PyObject *py_netr_OsVersionContainer_get_length(PyObject *obj, void *closure)
   20587             : {
   20588           0 :         struct netr_OsVersionContainer *object = (struct netr_OsVersionContainer *)pytalloc_get_ptr(obj);
   20589             :         PyObject *py_length;
   20590           0 :         py_length = PyLong_FromLong((uint16_t)object->length);
   20591           0 :         return py_length;
   20592             : }
   20593             : 
   20594           0 : static int py_netr_OsVersionContainer_set_length(PyObject *py_obj, PyObject *value, void *closure)
   20595             : {
   20596           0 :         struct netr_OsVersionContainer *object = (struct netr_OsVersionContainer *)pytalloc_get_ptr(py_obj);
   20597           0 :         if (value == NULL) {
   20598           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
   20599           0 :                 return -1;
   20600             :         }
   20601             :         {
   20602           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
   20603           0 :                 if (PyLong_Check(value)) {
   20604             :                         unsigned long long test_var;
   20605           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20606           0 :                         if (PyErr_Occurred() != NULL) {
   20607           0 :                                 return -1;
   20608             :                         }
   20609           0 :                         if (test_var > uint_max) {
   20610           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   20611             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20612           0 :                                 return -1;
   20613             :                         }
   20614           0 :                         object->length = test_var;
   20615             :                 } else {
   20616           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   20617             :                           PyLong_Type.tp_name);
   20618           0 :                         return -1;
   20619             :                 }
   20620             :         }
   20621           0 :         return 0;
   20622             : }
   20623             : 
   20624           0 : static PyObject *py_netr_OsVersionContainer_get_size(PyObject *obj, void *closure)
   20625             : {
   20626           0 :         struct netr_OsVersionContainer *object = (struct netr_OsVersionContainer *)pytalloc_get_ptr(obj);
   20627             :         PyObject *py_size;
   20628           0 :         py_size = PyLong_FromLong((uint16_t)object->size);
   20629           0 :         return py_size;
   20630             : }
   20631             : 
   20632           0 : static int py_netr_OsVersionContainer_set_size(PyObject *py_obj, PyObject *value, void *closure)
   20633             : {
   20634           0 :         struct netr_OsVersionContainer *object = (struct netr_OsVersionContainer *)pytalloc_get_ptr(py_obj);
   20635           0 :         if (value == NULL) {
   20636           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->size");
   20637           0 :                 return -1;
   20638             :         }
   20639             :         {
   20640           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
   20641           0 :                 if (PyLong_Check(value)) {
   20642             :                         unsigned long long test_var;
   20643           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20644           0 :                         if (PyErr_Occurred() != NULL) {
   20645           0 :                                 return -1;
   20646             :                         }
   20647           0 :                         if (test_var > uint_max) {
   20648           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   20649             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20650           0 :                                 return -1;
   20651             :                         }
   20652           0 :                         object->size = test_var;
   20653             :                 } else {
   20654           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   20655             :                           PyLong_Type.tp_name);
   20656           0 :                         return -1;
   20657             :                 }
   20658             :         }
   20659           0 :         return 0;
   20660             : }
   20661             : 
   20662           0 : static PyObject *py_netr_OsVersionContainer_get_os(PyObject *obj, void *closure)
   20663             : {
   20664           0 :         struct netr_OsVersionContainer *object = (struct netr_OsVersionContainer *)pytalloc_get_ptr(obj);
   20665             :         PyObject *py_os;
   20666           0 :         if (object->os == NULL) {
   20667           0 :                 Py_RETURN_NONE;
   20668             :         }
   20669           0 :         if (object->os == NULL) {
   20670           0 :                 py_os = Py_None;
   20671           0 :                 Py_INCREF(py_os);
   20672             :         } else {
   20673           0 :                 py_os = pytalloc_reference_ex(&netr_OsVersion_Type, object->os, object->os);
   20674             :         }
   20675           0 :         return py_os;
   20676             : }
   20677             : 
   20678           0 : static int py_netr_OsVersionContainer_set_os(PyObject *py_obj, PyObject *value, void *closure)
   20679             : {
   20680           0 :         struct netr_OsVersionContainer *object = (struct netr_OsVersionContainer *)pytalloc_get_ptr(py_obj);
   20681           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->os));
   20682           0 :         if (value == NULL) {
   20683           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->os");
   20684           0 :                 return -1;
   20685             :         }
   20686           0 :         if (value == Py_None) {
   20687           0 :                 object->os = NULL;
   20688             :         } else {
   20689           0 :                 object->os = NULL;
   20690           0 :                 PY_CHECK_TYPE(&netr_OsVersion_Type, value, return -1;);
   20691           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   20692           0 :                         PyErr_NoMemory();
   20693           0 :                         return -1;
   20694             :                 }
   20695           0 :                 object->os = (struct netr_OsVersion *)pytalloc_get_ptr(value);
   20696             :         }
   20697           0 :         return 0;
   20698             : }
   20699             : 
   20700             : static PyGetSetDef py_netr_OsVersionContainer_getsetters[] = {
   20701             :         {
   20702             :                 .name = discard_const_p(char, "length"),
   20703             :                 .get = py_netr_OsVersionContainer_get_length,
   20704             :                 .set = py_netr_OsVersionContainer_set_length,
   20705             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20706             :         },
   20707             :         {
   20708             :                 .name = discard_const_p(char, "size"),
   20709             :                 .get = py_netr_OsVersionContainer_get_size,
   20710             :                 .set = py_netr_OsVersionContainer_set_size,
   20711             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20712             :         },
   20713             :         {
   20714             :                 .name = discard_const_p(char, "os"),
   20715             :                 .get = py_netr_OsVersionContainer_get_os,
   20716             :                 .set = py_netr_OsVersionContainer_set_os,
   20717             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_OsVersion")
   20718             :         },
   20719             :         { .name = NULL }
   20720             : };
   20721             : 
   20722           0 : static PyObject *py_netr_OsVersionContainer_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20723             : {
   20724           0 :         return pytalloc_new(struct netr_OsVersionContainer, type);
   20725             : }
   20726             : 
   20727             : 
   20728             : static PyTypeObject netr_OsVersionContainer_Type = {
   20729             :         PyVarObject_HEAD_INIT(NULL, 0)
   20730             :         .tp_name = "netlogon.netr_OsVersionContainer",
   20731             :         .tp_getset = py_netr_OsVersionContainer_getsetters,
   20732             :         .tp_methods = NULL,
   20733             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20734             :         .tp_new = py_netr_OsVersionContainer_new,
   20735             : };
   20736             : 
   20737             : 
   20738           0 : static PyObject *py_netr_WorkstationInformation_get_lsa_policy(PyObject *obj, void *closure)
   20739             : {
   20740           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   20741             :         PyObject *py_lsa_policy;
   20742           0 :         py_lsa_policy = pytalloc_reference_ex(&netr_LsaPolicyInformation_Type, pytalloc_get_mem_ctx(obj), &object->lsa_policy);
   20743           0 :         return py_lsa_policy;
   20744             : }
   20745             : 
   20746           0 : static int py_netr_WorkstationInformation_set_lsa_policy(PyObject *py_obj, PyObject *value, void *closure)
   20747             : {
   20748           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   20749           0 :         if (value == NULL) {
   20750           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lsa_policy");
   20751           0 :                 return -1;
   20752             :         }
   20753           0 :         PY_CHECK_TYPE(&netr_LsaPolicyInformation_Type, value, return -1;);
   20754           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   20755           0 :                 PyErr_NoMemory();
   20756           0 :                 return -1;
   20757             :         }
   20758           0 :         object->lsa_policy = *(struct netr_LsaPolicyInformation *)pytalloc_get_ptr(value);
   20759           0 :         return 0;
   20760             : }
   20761             : 
   20762           0 : static PyObject *py_netr_WorkstationInformation_get_dns_hostname(PyObject *obj, void *closure)
   20763             : {
   20764           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   20765             :         PyObject *py_dns_hostname;
   20766           0 :         if (object->dns_hostname == NULL) {
   20767           0 :                 Py_RETURN_NONE;
   20768             :         }
   20769           0 :         if (object->dns_hostname == NULL) {
   20770           0 :                 py_dns_hostname = Py_None;
   20771           0 :                 Py_INCREF(py_dns_hostname);
   20772             :         } else {
   20773           0 :                 if (object->dns_hostname == NULL) {
   20774           0 :                         py_dns_hostname = Py_None;
   20775           0 :                         Py_INCREF(py_dns_hostname);
   20776             :                 } else {
   20777           0 :                         py_dns_hostname = PyUnicode_Decode(object->dns_hostname, strlen(object->dns_hostname), "utf-8", "ignore");
   20778             :                 }
   20779             :         }
   20780           0 :         return py_dns_hostname;
   20781             : }
   20782             : 
   20783           0 : static int py_netr_WorkstationInformation_set_dns_hostname(PyObject *py_obj, PyObject *value, void *closure)
   20784             : {
   20785           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   20786           0 :         if (value == NULL) {
   20787           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_hostname");
   20788           0 :                 return -1;
   20789             :         }
   20790           0 :         if (value == Py_None) {
   20791           0 :                 object->dns_hostname = NULL;
   20792             :         } else {
   20793           0 :                 object->dns_hostname = NULL;
   20794             :                 {
   20795             :                         const char *test_str;
   20796             :                         const char *talloc_str;
   20797           0 :                         PyObject *unicode = NULL;
   20798           0 :                         if (PyUnicode_Check(value)) {
   20799           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   20800           0 :                                 if (unicode == NULL) {
   20801           0 :                                         PyErr_NoMemory();
   20802           0 :                                         return -1;
   20803             :                                 }
   20804           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   20805           0 :                         } else if (PyBytes_Check(value)) {
   20806           0 :                                 test_str = PyBytes_AS_STRING(value);
   20807             :                         } else {
   20808           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   20809           0 :                                 return -1;
   20810             :                         }
   20811           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   20812           0 :                         if (unicode != NULL) {
   20813           0 :                                 Py_DECREF(unicode);
   20814             :                         }
   20815           0 :                         if (talloc_str == NULL) {
   20816           0 :                                 PyErr_NoMemory();
   20817           0 :                                 return -1;
   20818             :                         }
   20819           0 :                         object->dns_hostname = talloc_str;
   20820             :                 }
   20821             :         }
   20822           0 :         return 0;
   20823             : }
   20824             : 
   20825           0 : static PyObject *py_netr_WorkstationInformation_get_sitename(PyObject *obj, void *closure)
   20826             : {
   20827           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   20828             :         PyObject *py_sitename;
   20829           0 :         if (object->sitename == NULL) {
   20830           0 :                 Py_RETURN_NONE;
   20831             :         }
   20832           0 :         if (object->sitename == NULL) {
   20833           0 :                 py_sitename = Py_None;
   20834           0 :                 Py_INCREF(py_sitename);
   20835             :         } else {
   20836           0 :                 if (object->sitename == NULL) {
   20837           0 :                         py_sitename = Py_None;
   20838           0 :                         Py_INCREF(py_sitename);
   20839             :                 } else {
   20840           0 :                         py_sitename = PyUnicode_Decode(object->sitename, strlen(object->sitename), "utf-8", "ignore");
   20841             :                 }
   20842             :         }
   20843           0 :         return py_sitename;
   20844             : }
   20845             : 
   20846           0 : static int py_netr_WorkstationInformation_set_sitename(PyObject *py_obj, PyObject *value, void *closure)
   20847             : {
   20848           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   20849           0 :         if (value == NULL) {
   20850           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sitename");
   20851           0 :                 return -1;
   20852             :         }
   20853           0 :         if (value == Py_None) {
   20854           0 :                 object->sitename = NULL;
   20855             :         } else {
   20856           0 :                 object->sitename = NULL;
   20857             :                 {
   20858             :                         const char *test_str;
   20859             :                         const char *talloc_str;
   20860           0 :                         PyObject *unicode = NULL;
   20861           0 :                         if (PyUnicode_Check(value)) {
   20862           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   20863           0 :                                 if (unicode == NULL) {
   20864           0 :                                         PyErr_NoMemory();
   20865           0 :                                         return -1;
   20866             :                                 }
   20867           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   20868           0 :                         } else if (PyBytes_Check(value)) {
   20869           0 :                                 test_str = PyBytes_AS_STRING(value);
   20870             :                         } else {
   20871           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   20872           0 :                                 return -1;
   20873             :                         }
   20874           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   20875           0 :                         if (unicode != NULL) {
   20876           0 :                                 Py_DECREF(unicode);
   20877             :                         }
   20878           0 :                         if (talloc_str == NULL) {
   20879           0 :                                 PyErr_NoMemory();
   20880           0 :                                 return -1;
   20881             :                         }
   20882           0 :                         object->sitename = talloc_str;
   20883             :                 }
   20884             :         }
   20885           0 :         return 0;
   20886             : }
   20887             : 
   20888           0 : static PyObject *py_netr_WorkstationInformation_get_dummy1(PyObject *obj, void *closure)
   20889             : {
   20890           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   20891             :         PyObject *py_dummy1;
   20892           0 :         if (object->dummy1 == NULL) {
   20893           0 :                 Py_RETURN_NONE;
   20894             :         }
   20895           0 :         if (object->dummy1 == NULL) {
   20896           0 :                 py_dummy1 = Py_None;
   20897           0 :                 Py_INCREF(py_dummy1);
   20898             :         } else {
   20899           0 :                 if (object->dummy1 == NULL) {
   20900           0 :                         py_dummy1 = Py_None;
   20901           0 :                         Py_INCREF(py_dummy1);
   20902             :                 } else {
   20903           0 :                         py_dummy1 = PyUnicode_Decode(object->dummy1, strlen(object->dummy1), "utf-8", "ignore");
   20904             :                 }
   20905             :         }
   20906           0 :         return py_dummy1;
   20907             : }
   20908             : 
   20909           0 : static int py_netr_WorkstationInformation_set_dummy1(PyObject *py_obj, PyObject *value, void *closure)
   20910             : {
   20911           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   20912           0 :         if (value == NULL) {
   20913           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy1");
   20914           0 :                 return -1;
   20915             :         }
   20916           0 :         if (value == Py_None) {
   20917           0 :                 object->dummy1 = NULL;
   20918             :         } else {
   20919           0 :                 object->dummy1 = NULL;
   20920             :                 {
   20921             :                         const char *test_str;
   20922             :                         const char *talloc_str;
   20923           0 :                         PyObject *unicode = NULL;
   20924           0 :                         if (PyUnicode_Check(value)) {
   20925           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   20926           0 :                                 if (unicode == NULL) {
   20927           0 :                                         PyErr_NoMemory();
   20928           0 :                                         return -1;
   20929             :                                 }
   20930           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   20931           0 :                         } else if (PyBytes_Check(value)) {
   20932           0 :                                 test_str = PyBytes_AS_STRING(value);
   20933             :                         } else {
   20934           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   20935           0 :                                 return -1;
   20936             :                         }
   20937           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   20938           0 :                         if (unicode != NULL) {
   20939           0 :                                 Py_DECREF(unicode);
   20940             :                         }
   20941           0 :                         if (talloc_str == NULL) {
   20942           0 :                                 PyErr_NoMemory();
   20943           0 :                                 return -1;
   20944             :                         }
   20945           0 :                         object->dummy1 = talloc_str;
   20946             :                 }
   20947             :         }
   20948           0 :         return 0;
   20949             : }
   20950             : 
   20951           0 : static PyObject *py_netr_WorkstationInformation_get_dummy2(PyObject *obj, void *closure)
   20952             : {
   20953           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   20954             :         PyObject *py_dummy2;
   20955           0 :         if (object->dummy2 == NULL) {
   20956           0 :                 Py_RETURN_NONE;
   20957             :         }
   20958           0 :         if (object->dummy2 == NULL) {
   20959           0 :                 py_dummy2 = Py_None;
   20960           0 :                 Py_INCREF(py_dummy2);
   20961             :         } else {
   20962           0 :                 if (object->dummy2 == NULL) {
   20963           0 :                         py_dummy2 = Py_None;
   20964           0 :                         Py_INCREF(py_dummy2);
   20965             :                 } else {
   20966           0 :                         py_dummy2 = PyUnicode_Decode(object->dummy2, strlen(object->dummy2), "utf-8", "ignore");
   20967             :                 }
   20968             :         }
   20969           0 :         return py_dummy2;
   20970             : }
   20971             : 
   20972           0 : static int py_netr_WorkstationInformation_set_dummy2(PyObject *py_obj, PyObject *value, void *closure)
   20973             : {
   20974           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   20975           0 :         if (value == NULL) {
   20976           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy2");
   20977           0 :                 return -1;
   20978             :         }
   20979           0 :         if (value == Py_None) {
   20980           0 :                 object->dummy2 = NULL;
   20981             :         } else {
   20982           0 :                 object->dummy2 = NULL;
   20983             :                 {
   20984             :                         const char *test_str;
   20985             :                         const char *talloc_str;
   20986           0 :                         PyObject *unicode = NULL;
   20987           0 :                         if (PyUnicode_Check(value)) {
   20988           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   20989           0 :                                 if (unicode == NULL) {
   20990           0 :                                         PyErr_NoMemory();
   20991           0 :                                         return -1;
   20992             :                                 }
   20993           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   20994           0 :                         } else if (PyBytes_Check(value)) {
   20995           0 :                                 test_str = PyBytes_AS_STRING(value);
   20996             :                         } else {
   20997           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   20998           0 :                                 return -1;
   20999             :                         }
   21000           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   21001           0 :                         if (unicode != NULL) {
   21002           0 :                                 Py_DECREF(unicode);
   21003             :                         }
   21004           0 :                         if (talloc_str == NULL) {
   21005           0 :                                 PyErr_NoMemory();
   21006           0 :                                 return -1;
   21007             :                         }
   21008           0 :                         object->dummy2 = talloc_str;
   21009             :                 }
   21010             :         }
   21011           0 :         return 0;
   21012             : }
   21013             : 
   21014           0 : static PyObject *py_netr_WorkstationInformation_get_dummy3(PyObject *obj, void *closure)
   21015             : {
   21016           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   21017             :         PyObject *py_dummy3;
   21018           0 :         if (object->dummy3 == NULL) {
   21019           0 :                 Py_RETURN_NONE;
   21020             :         }
   21021           0 :         if (object->dummy3 == NULL) {
   21022           0 :                 py_dummy3 = Py_None;
   21023           0 :                 Py_INCREF(py_dummy3);
   21024             :         } else {
   21025           0 :                 if (object->dummy3 == NULL) {
   21026           0 :                         py_dummy3 = Py_None;
   21027           0 :                         Py_INCREF(py_dummy3);
   21028             :                 } else {
   21029           0 :                         py_dummy3 = PyUnicode_Decode(object->dummy3, strlen(object->dummy3), "utf-8", "ignore");
   21030             :                 }
   21031             :         }
   21032           0 :         return py_dummy3;
   21033             : }
   21034             : 
   21035           0 : static int py_netr_WorkstationInformation_set_dummy3(PyObject *py_obj, PyObject *value, void *closure)
   21036             : {
   21037           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   21038           0 :         if (value == NULL) {
   21039           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy3");
   21040           0 :                 return -1;
   21041             :         }
   21042           0 :         if (value == Py_None) {
   21043           0 :                 object->dummy3 = NULL;
   21044             :         } else {
   21045           0 :                 object->dummy3 = NULL;
   21046             :                 {
   21047             :                         const char *test_str;
   21048             :                         const char *talloc_str;
   21049           0 :                         PyObject *unicode = NULL;
   21050           0 :                         if (PyUnicode_Check(value)) {
   21051           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   21052           0 :                                 if (unicode == NULL) {
   21053           0 :                                         PyErr_NoMemory();
   21054           0 :                                         return -1;
   21055             :                                 }
   21056           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   21057           0 :                         } else if (PyBytes_Check(value)) {
   21058           0 :                                 test_str = PyBytes_AS_STRING(value);
   21059             :                         } else {
   21060           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   21061           0 :                                 return -1;
   21062             :                         }
   21063           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   21064           0 :                         if (unicode != NULL) {
   21065           0 :                                 Py_DECREF(unicode);
   21066             :                         }
   21067           0 :                         if (talloc_str == NULL) {
   21068           0 :                                 PyErr_NoMemory();
   21069           0 :                                 return -1;
   21070             :                         }
   21071           0 :                         object->dummy3 = talloc_str;
   21072             :                 }
   21073             :         }
   21074           0 :         return 0;
   21075             : }
   21076             : 
   21077           0 : static PyObject *py_netr_WorkstationInformation_get_dummy4(PyObject *obj, void *closure)
   21078             : {
   21079           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   21080             :         PyObject *py_dummy4;
   21081           0 :         if (object->dummy4 == NULL) {
   21082           0 :                 Py_RETURN_NONE;
   21083             :         }
   21084           0 :         if (object->dummy4 == NULL) {
   21085           0 :                 py_dummy4 = Py_None;
   21086           0 :                 Py_INCREF(py_dummy4);
   21087             :         } else {
   21088           0 :                 if (object->dummy4 == NULL) {
   21089           0 :                         py_dummy4 = Py_None;
   21090           0 :                         Py_INCREF(py_dummy4);
   21091             :                 } else {
   21092           0 :                         py_dummy4 = PyUnicode_Decode(object->dummy4, strlen(object->dummy4), "utf-8", "ignore");
   21093             :                 }
   21094             :         }
   21095           0 :         return py_dummy4;
   21096             : }
   21097             : 
   21098           0 : static int py_netr_WorkstationInformation_set_dummy4(PyObject *py_obj, PyObject *value, void *closure)
   21099             : {
   21100           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   21101           0 :         if (value == NULL) {
   21102           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy4");
   21103           0 :                 return -1;
   21104             :         }
   21105           0 :         if (value == Py_None) {
   21106           0 :                 object->dummy4 = NULL;
   21107             :         } else {
   21108           0 :                 object->dummy4 = NULL;
   21109             :                 {
   21110             :                         const char *test_str;
   21111             :                         const char *talloc_str;
   21112           0 :                         PyObject *unicode = NULL;
   21113           0 :                         if (PyUnicode_Check(value)) {
   21114           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   21115           0 :                                 if (unicode == NULL) {
   21116           0 :                                         PyErr_NoMemory();
   21117           0 :                                         return -1;
   21118             :                                 }
   21119           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   21120           0 :                         } else if (PyBytes_Check(value)) {
   21121           0 :                                 test_str = PyBytes_AS_STRING(value);
   21122             :                         } else {
   21123           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   21124           0 :                                 return -1;
   21125             :                         }
   21126           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   21127           0 :                         if (unicode != NULL) {
   21128           0 :                                 Py_DECREF(unicode);
   21129             :                         }
   21130           0 :                         if (talloc_str == NULL) {
   21131           0 :                                 PyErr_NoMemory();
   21132           0 :                                 return -1;
   21133             :                         }
   21134           0 :                         object->dummy4 = talloc_str;
   21135             :                 }
   21136             :         }
   21137           0 :         return 0;
   21138             : }
   21139             : 
   21140           0 : static PyObject *py_netr_WorkstationInformation_get_os_version(PyObject *obj, void *closure)
   21141             : {
   21142           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   21143             :         PyObject *py_os_version;
   21144           0 :         py_os_version = pytalloc_reference_ex(&netr_OsVersionContainer_Type, pytalloc_get_mem_ctx(obj), &object->os_version);
   21145           0 :         return py_os_version;
   21146             : }
   21147             : 
   21148           0 : static int py_netr_WorkstationInformation_set_os_version(PyObject *py_obj, PyObject *value, void *closure)
   21149             : {
   21150           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   21151           0 :         if (value == NULL) {
   21152           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->os_version");
   21153           0 :                 return -1;
   21154             :         }
   21155           0 :         PY_CHECK_TYPE(&netr_OsVersionContainer_Type, value, return -1;);
   21156           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   21157           0 :                 PyErr_NoMemory();
   21158           0 :                 return -1;
   21159             :         }
   21160           0 :         object->os_version = *(struct netr_OsVersionContainer *)pytalloc_get_ptr(value);
   21161           0 :         return 0;
   21162             : }
   21163             : 
   21164           0 : static PyObject *py_netr_WorkstationInformation_get_os_name(PyObject *obj, void *closure)
   21165             : {
   21166           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   21167             :         PyObject *py_os_name;
   21168           0 :         py_os_name = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->os_name);
   21169           0 :         return py_os_name;
   21170             : }
   21171             : 
   21172           0 : static int py_netr_WorkstationInformation_set_os_name(PyObject *py_obj, PyObject *value, void *closure)
   21173             : {
   21174           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   21175           0 :         if (value == NULL) {
   21176           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->os_name");
   21177           0 :                 return -1;
   21178             :         }
   21179           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   21180           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   21181           0 :                 PyErr_NoMemory();
   21182           0 :                 return -1;
   21183             :         }
   21184           0 :         object->os_name = *(struct lsa_String *)pytalloc_get_ptr(value);
   21185           0 :         return 0;
   21186             : }
   21187             : 
   21188           0 : static PyObject *py_netr_WorkstationInformation_get_dummy_string3(PyObject *obj, void *closure)
   21189             : {
   21190           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   21191             :         PyObject *py_dummy_string3;
   21192           0 :         py_dummy_string3 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string3);
   21193           0 :         return py_dummy_string3;
   21194             : }
   21195             : 
   21196           0 : static int py_netr_WorkstationInformation_set_dummy_string3(PyObject *py_obj, PyObject *value, void *closure)
   21197             : {
   21198           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   21199           0 :         if (value == NULL) {
   21200           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_string3");
   21201           0 :                 return -1;
   21202             :         }
   21203           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   21204           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   21205           0 :                 PyErr_NoMemory();
   21206           0 :                 return -1;
   21207             :         }
   21208           0 :         object->dummy_string3 = *(struct lsa_String *)pytalloc_get_ptr(value);
   21209           0 :         return 0;
   21210             : }
   21211             : 
   21212           0 : static PyObject *py_netr_WorkstationInformation_get_dummy_string4(PyObject *obj, void *closure)
   21213             : {
   21214           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   21215             :         PyObject *py_dummy_string4;
   21216           0 :         py_dummy_string4 = pytalloc_reference_ex(lsa_String_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string4);
   21217           0 :         return py_dummy_string4;
   21218             : }
   21219             : 
   21220           0 : static int py_netr_WorkstationInformation_set_dummy_string4(PyObject *py_obj, PyObject *value, void *closure)
   21221             : {
   21222           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   21223           0 :         if (value == NULL) {
   21224           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_string4");
   21225           0 :                 return -1;
   21226             :         }
   21227           0 :         PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   21228           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   21229           0 :                 PyErr_NoMemory();
   21230           0 :                 return -1;
   21231             :         }
   21232           0 :         object->dummy_string4 = *(struct lsa_String *)pytalloc_get_ptr(value);
   21233           0 :         return 0;
   21234             : }
   21235             : 
   21236           0 : static PyObject *py_netr_WorkstationInformation_get_workstation_flags(PyObject *obj, void *closure)
   21237             : {
   21238           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   21239             :         PyObject *py_workstation_flags;
   21240           0 :         py_workstation_flags = PyLong_FromUnsignedLongLong((uint32_t)object->workstation_flags);
   21241           0 :         return py_workstation_flags;
   21242             : }
   21243             : 
   21244           0 : static int py_netr_WorkstationInformation_set_workstation_flags(PyObject *py_obj, PyObject *value, void *closure)
   21245             : {
   21246           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   21247           0 :         if (value == NULL) {
   21248           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->workstation_flags");
   21249           0 :                 return -1;
   21250             :         }
   21251             :         {
   21252           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->workstation_flags));
   21253           0 :                 if (PyLong_Check(value)) {
   21254             :                         unsigned long long test_var;
   21255           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21256           0 :                         if (PyErr_Occurred() != NULL) {
   21257           0 :                                 return -1;
   21258             :                         }
   21259           0 :                         if (test_var > uint_max) {
   21260           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   21261             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21262           0 :                                 return -1;
   21263             :                         }
   21264           0 :                         object->workstation_flags = test_var;
   21265             :                 } else {
   21266           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   21267             :                           PyLong_Type.tp_name);
   21268           0 :                         return -1;
   21269             :                 }
   21270             :         }
   21271           0 :         return 0;
   21272             : }
   21273             : 
   21274           0 : static PyObject *py_netr_WorkstationInformation_get_supported_enc_types(PyObject *obj, void *closure)
   21275             : {
   21276           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   21277             :         PyObject *py_supported_enc_types;
   21278           0 :         py_supported_enc_types = PyLong_FromUnsignedLongLong((uint32_t)object->supported_enc_types);
   21279           0 :         return py_supported_enc_types;
   21280             : }
   21281             : 
   21282           0 : static int py_netr_WorkstationInformation_set_supported_enc_types(PyObject *py_obj, PyObject *value, void *closure)
   21283             : {
   21284           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   21285           0 :         if (value == NULL) {
   21286           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->supported_enc_types");
   21287           0 :                 return -1;
   21288             :         }
   21289             :         {
   21290           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->supported_enc_types));
   21291           0 :                 if (PyLong_Check(value)) {
   21292             :                         unsigned long long test_var;
   21293           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21294           0 :                         if (PyErr_Occurred() != NULL) {
   21295           0 :                                 return -1;
   21296             :                         }
   21297           0 :                         if (test_var > uint_max) {
   21298           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   21299             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21300           0 :                                 return -1;
   21301             :                         }
   21302           0 :                         object->supported_enc_types = test_var;
   21303             :                 } else {
   21304           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   21305             :                           PyLong_Type.tp_name);
   21306           0 :                         return -1;
   21307             :                 }
   21308             :         }
   21309           0 :         return 0;
   21310             : }
   21311             : 
   21312           0 : static PyObject *py_netr_WorkstationInformation_get_dummy_long3(PyObject *obj, void *closure)
   21313             : {
   21314           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   21315             :         PyObject *py_dummy_long3;
   21316           0 :         py_dummy_long3 = PyLong_FromUnsignedLongLong((uint32_t)object->dummy_long3);
   21317           0 :         return py_dummy_long3;
   21318             : }
   21319             : 
   21320           0 : static int py_netr_WorkstationInformation_set_dummy_long3(PyObject *py_obj, PyObject *value, void *closure)
   21321             : {
   21322           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   21323           0 :         if (value == NULL) {
   21324           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_long3");
   21325           0 :                 return -1;
   21326             :         }
   21327             :         {
   21328           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long3));
   21329           0 :                 if (PyLong_Check(value)) {
   21330             :                         unsigned long long test_var;
   21331           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21332           0 :                         if (PyErr_Occurred() != NULL) {
   21333           0 :                                 return -1;
   21334             :                         }
   21335           0 :                         if (test_var > uint_max) {
   21336           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   21337             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21338           0 :                                 return -1;
   21339             :                         }
   21340           0 :                         object->dummy_long3 = test_var;
   21341             :                 } else {
   21342           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   21343             :                           PyLong_Type.tp_name);
   21344           0 :                         return -1;
   21345             :                 }
   21346             :         }
   21347           0 :         return 0;
   21348             : }
   21349             : 
   21350           0 : static PyObject *py_netr_WorkstationInformation_get_dummy_long4(PyObject *obj, void *closure)
   21351             : {
   21352           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(obj);
   21353             :         PyObject *py_dummy_long4;
   21354           0 :         py_dummy_long4 = PyLong_FromUnsignedLongLong((uint32_t)object->dummy_long4);
   21355           0 :         return py_dummy_long4;
   21356             : }
   21357             : 
   21358           0 : static int py_netr_WorkstationInformation_set_dummy_long4(PyObject *py_obj, PyObject *value, void *closure)
   21359             : {
   21360           0 :         struct netr_WorkstationInformation *object = (struct netr_WorkstationInformation *)pytalloc_get_ptr(py_obj);
   21361           0 :         if (value == NULL) {
   21362           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_long4");
   21363           0 :                 return -1;
   21364             :         }
   21365             :         {
   21366           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long4));
   21367           0 :                 if (PyLong_Check(value)) {
   21368             :                         unsigned long long test_var;
   21369           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21370           0 :                         if (PyErr_Occurred() != NULL) {
   21371           0 :                                 return -1;
   21372             :                         }
   21373           0 :                         if (test_var > uint_max) {
   21374           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   21375             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21376           0 :                                 return -1;
   21377             :                         }
   21378           0 :                         object->dummy_long4 = test_var;
   21379             :                 } else {
   21380           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   21381             :                           PyLong_Type.tp_name);
   21382           0 :                         return -1;
   21383             :                 }
   21384             :         }
   21385           0 :         return 0;
   21386             : }
   21387             : 
   21388             : static PyGetSetDef py_netr_WorkstationInformation_getsetters[] = {
   21389             :         {
   21390             :                 .name = discard_const_p(char, "lsa_policy"),
   21391             :                 .get = py_netr_WorkstationInformation_get_lsa_policy,
   21392             :                 .set = py_netr_WorkstationInformation_set_lsa_policy,
   21393             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LsaPolicyInformation")
   21394             :         },
   21395             :         {
   21396             :                 .name = discard_const_p(char, "dns_hostname"),
   21397             :                 .get = py_netr_WorkstationInformation_get_dns_hostname,
   21398             :                 .set = py_netr_WorkstationInformation_set_dns_hostname,
   21399             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   21400             :         },
   21401             :         {
   21402             :                 .name = discard_const_p(char, "sitename"),
   21403             :                 .get = py_netr_WorkstationInformation_get_sitename,
   21404             :                 .set = py_netr_WorkstationInformation_set_sitename,
   21405             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   21406             :         },
   21407             :         {
   21408             :                 .name = discard_const_p(char, "dummy1"),
   21409             :                 .get = py_netr_WorkstationInformation_get_dummy1,
   21410             :                 .set = py_netr_WorkstationInformation_set_dummy1,
   21411             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   21412             :         },
   21413             :         {
   21414             :                 .name = discard_const_p(char, "dummy2"),
   21415             :                 .get = py_netr_WorkstationInformation_get_dummy2,
   21416             :                 .set = py_netr_WorkstationInformation_set_dummy2,
   21417             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   21418             :         },
   21419             :         {
   21420             :                 .name = discard_const_p(char, "dummy3"),
   21421             :                 .get = py_netr_WorkstationInformation_get_dummy3,
   21422             :                 .set = py_netr_WorkstationInformation_set_dummy3,
   21423             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   21424             :         },
   21425             :         {
   21426             :                 .name = discard_const_p(char, "dummy4"),
   21427             :                 .get = py_netr_WorkstationInformation_get_dummy4,
   21428             :                 .set = py_netr_WorkstationInformation_set_dummy4,
   21429             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   21430             :         },
   21431             :         {
   21432             :                 .name = discard_const_p(char, "os_version"),
   21433             :                 .get = py_netr_WorkstationInformation_get_os_version,
   21434             :                 .set = py_netr_WorkstationInformation_set_os_version,
   21435             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_OsVersionContainer")
   21436             :         },
   21437             :         {
   21438             :                 .name = discard_const_p(char, "os_name"),
   21439             :                 .get = py_netr_WorkstationInformation_get_os_name,
   21440             :                 .set = py_netr_WorkstationInformation_set_os_name,
   21441             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   21442             :         },
   21443             :         {
   21444             :                 .name = discard_const_p(char, "dummy_string3"),
   21445             :                 .get = py_netr_WorkstationInformation_get_dummy_string3,
   21446             :                 .set = py_netr_WorkstationInformation_set_dummy_string3,
   21447             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   21448             :         },
   21449             :         {
   21450             :                 .name = discard_const_p(char, "dummy_string4"),
   21451             :                 .get = py_netr_WorkstationInformation_get_dummy_string4,
   21452             :                 .set = py_netr_WorkstationInformation_set_dummy_string4,
   21453             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   21454             :         },
   21455             :         {
   21456             :                 .name = discard_const_p(char, "workstation_flags"),
   21457             :                 .get = py_netr_WorkstationInformation_get_workstation_flags,
   21458             :                 .set = py_netr_WorkstationInformation_set_workstation_flags,
   21459             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_WorkstationFlags")
   21460             :         },
   21461             :         {
   21462             :                 .name = discard_const_p(char, "supported_enc_types"),
   21463             :                 .get = py_netr_WorkstationInformation_get_supported_enc_types,
   21464             :                 .set = py_netr_WorkstationInformation_set_supported_enc_types,
   21465             :                 .doc = discard_const_p(char, "PIDL-generated element of base type kerb_EncTypes")
   21466             :         },
   21467             :         {
   21468             :                 .name = discard_const_p(char, "dummy_long3"),
   21469             :                 .get = py_netr_WorkstationInformation_get_dummy_long3,
   21470             :                 .set = py_netr_WorkstationInformation_set_dummy_long3,
   21471             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21472             :         },
   21473             :         {
   21474             :                 .name = discard_const_p(char, "dummy_long4"),
   21475             :                 .get = py_netr_WorkstationInformation_get_dummy_long4,
   21476             :                 .set = py_netr_WorkstationInformation_set_dummy_long4,
   21477             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21478             :         },
   21479             :         { .name = NULL }
   21480             : };
   21481             : 
   21482          11 : static PyObject *py_netr_WorkstationInformation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21483             : {
   21484          11 :         return pytalloc_new(struct netr_WorkstationInformation, type);
   21485             : }
   21486             : 
   21487             : 
   21488             : static PyTypeObject netr_WorkstationInformation_Type = {
   21489             :         PyVarObject_HEAD_INIT(NULL, 0)
   21490             :         .tp_name = "netlogon.netr_WorkstationInformation",
   21491             :         .tp_getset = py_netr_WorkstationInformation_getsetters,
   21492             :         .tp_methods = NULL,
   21493             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21494             :         .tp_new = py_netr_WorkstationInformation_new,
   21495             : };
   21496             : 
   21497           0 : static PyObject *py_import_netr_WorkstationInfo(TALLOC_CTX *mem_ctx, int level, union netr_WorkstationInfo *in)
   21498             : {
   21499             :         PyObject *ret;
   21500             : 
   21501           0 :         switch (level) {
   21502           0 :                 case 1:
   21503           0 :                         if (in->workstation_info == NULL) {
   21504           0 :                                 ret = Py_None;
   21505           0 :                                 Py_INCREF(ret);
   21506             :                         } else {
   21507           0 :                                 ret = pytalloc_reference_ex(&netr_WorkstationInformation_Type, in->workstation_info, in->workstation_info);
   21508             :                         }
   21509           0 :                         return ret;
   21510             : 
   21511           0 :                 case 2:
   21512           0 :                         if (in->lsa_policy_info == NULL) {
   21513           0 :                                 ret = Py_None;
   21514           0 :                                 Py_INCREF(ret);
   21515             :                         } else {
   21516           0 :                                 ret = pytalloc_reference_ex(&netr_WorkstationInformation_Type, in->lsa_policy_info, in->lsa_policy_info);
   21517             :                         }
   21518           0 :                         return ret;
   21519             : 
   21520             :         }
   21521           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   21522           0 :         return NULL;
   21523             : }
   21524             : 
   21525          11 : static union netr_WorkstationInfo *py_export_netr_WorkstationInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   21526             : {
   21527          11 :         union netr_WorkstationInfo *ret = talloc_zero(mem_ctx, union netr_WorkstationInfo);
   21528          11 :         switch (level) {
   21529           0 :                 case 1:
   21530           0 :                         if (in == NULL) {
   21531           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->workstation_info");
   21532           0 :                                 talloc_free(ret); return NULL;
   21533             :                         }
   21534           0 :                         if (in == Py_None) {
   21535           0 :                                 ret->workstation_info = NULL;
   21536             :                         } else {
   21537           0 :                                 ret->workstation_info = NULL;
   21538           0 :                                 PY_CHECK_TYPE(&netr_WorkstationInformation_Type, in, talloc_free(ret); return NULL;);
   21539           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   21540           0 :                                         PyErr_NoMemory();
   21541           0 :                                         talloc_free(ret); return NULL;
   21542             :                                 }
   21543           0 :                                 ret->workstation_info = (struct netr_WorkstationInformation *)pytalloc_get_ptr(in);
   21544             :                         }
   21545           0 :                         break;
   21546             : 
   21547          11 :                 case 2:
   21548          11 :                         if (in == NULL) {
   21549           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->lsa_policy_info");
   21550           0 :                                 talloc_free(ret); return NULL;
   21551             :                         }
   21552          11 :                         if (in == Py_None) {
   21553           0 :                                 ret->lsa_policy_info = NULL;
   21554             :                         } else {
   21555          11 :                                 ret->lsa_policy_info = NULL;
   21556          11 :                                 PY_CHECK_TYPE(&netr_WorkstationInformation_Type, in, talloc_free(ret); return NULL;);
   21557          11 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   21558           0 :                                         PyErr_NoMemory();
   21559           0 :                                         talloc_free(ret); return NULL;
   21560             :                                 }
   21561          11 :                                 ret->lsa_policy_info = (struct netr_WorkstationInformation *)pytalloc_get_ptr(in);
   21562             :                         }
   21563          11 :                         break;
   21564             : 
   21565           0 :                 default:
   21566           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   21567           0 :                         talloc_free(ret);
   21568           0 :                         ret = NULL;
   21569             :         }
   21570             : 
   21571          11 :         return ret;
   21572             : }
   21573             : 
   21574           0 : static PyObject *py_netr_WorkstationInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21575             : {
   21576           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   21577           0 :         PyObject *mem_ctx_obj = NULL;
   21578           0 :         TALLOC_CTX *mem_ctx = NULL;
   21579           0 :         int level = 0;
   21580           0 :         PyObject *in_obj = NULL;
   21581           0 :         union netr_WorkstationInfo *in = NULL;
   21582             : 
   21583           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   21584             :                 discard_const_p(char *, kwnames),
   21585             :                 &mem_ctx_obj,
   21586             :                 &level,
   21587             :                 &in_obj)) {
   21588           0 :                 return NULL;
   21589             :         }
   21590           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   21591           0 :         if (mem_ctx == NULL) {
   21592           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   21593           0 :                 return NULL;
   21594             :         }
   21595           0 :         in = (union netr_WorkstationInfo *)pytalloc_get_ptr(in_obj);
   21596           0 :         if (in == NULL) {
   21597           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_WorkstationInfo!");
   21598           0 :                 return NULL;
   21599             :         }
   21600             : 
   21601           0 :         return py_import_netr_WorkstationInfo(mem_ctx, level, in);
   21602             : }
   21603             : 
   21604          11 : static PyObject *py_netr_WorkstationInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21605             : {
   21606          11 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   21607          11 :         PyObject *mem_ctx_obj = NULL;
   21608          11 :         TALLOC_CTX *mem_ctx = NULL;
   21609          11 :         int level = 0;
   21610          11 :         PyObject *in = NULL;
   21611          11 :         union netr_WorkstationInfo *out = NULL;
   21612             : 
   21613          11 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   21614             :                 discard_const_p(char *, kwnames),
   21615             :                 &mem_ctx_obj,
   21616             :                 &level,
   21617             :                 &in)) {
   21618           0 :                 return NULL;
   21619             :         }
   21620          11 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   21621          11 :         if (mem_ctx == NULL) {
   21622           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   21623           0 :                 return NULL;
   21624             :         }
   21625             : 
   21626          11 :         out = py_export_netr_WorkstationInfo(mem_ctx, level, in);
   21627          11 :         if (out == NULL) {
   21628           0 :                 return NULL;
   21629             :         }
   21630             : 
   21631          11 :         return pytalloc_GenericObject_reference(out);
   21632             : }
   21633             : 
   21634             : static PyMethodDef py_netr_WorkstationInfo_methods[] = {
   21635             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_WorkstationInfo_import),
   21636             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   21637             :                 "T.__import__(mem_ctx, level, in) => ret." },
   21638             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_WorkstationInfo_export),
   21639             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   21640             :                 "T.__export__(mem_ctx, level, in) => ret." },
   21641             :         { NULL, NULL, 0, NULL }
   21642             : };
   21643             : 
   21644           0 : static PyObject *py_netr_WorkstationInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21645             : {
   21646           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   21647           0 :         return NULL;
   21648             : }
   21649             : 
   21650             : 
   21651             : static PyTypeObject netr_WorkstationInfo_Type = {
   21652             :         PyVarObject_HEAD_INIT(NULL, 0)
   21653             :         .tp_name = "netlogon.netr_WorkstationInfo",
   21654             :         .tp_getset = NULL,
   21655             :         .tp_methods = py_netr_WorkstationInfo_methods,
   21656             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21657             :         .tp_new = py_netr_WorkstationInfo_new,
   21658             : };
   21659             : 
   21660             : 
   21661           0 : static PyObject *py_netr_trust_extension_info_get_flags(PyObject *obj, void *closure)
   21662             : {
   21663           0 :         struct netr_trust_extension_info *object = (struct netr_trust_extension_info *)pytalloc_get_ptr(obj);
   21664             :         PyObject *py_flags;
   21665           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->flags);
   21666           0 :         return py_flags;
   21667             : }
   21668             : 
   21669           0 : static int py_netr_trust_extension_info_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   21670             : {
   21671           0 :         struct netr_trust_extension_info *object = (struct netr_trust_extension_info *)pytalloc_get_ptr(py_obj);
   21672           0 :         if (value == NULL) {
   21673           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
   21674           0 :                 return -1;
   21675             :         }
   21676             :         {
   21677           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
   21678           0 :                 if (PyLong_Check(value)) {
   21679             :                         unsigned long long test_var;
   21680           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21681           0 :                         if (PyErr_Occurred() != NULL) {
   21682           0 :                                 return -1;
   21683             :                         }
   21684           0 :                         if (test_var > uint_max) {
   21685           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   21686             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21687           0 :                                 return -1;
   21688             :                         }
   21689           0 :                         object->flags = test_var;
   21690             :                 } else {
   21691           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   21692             :                           PyLong_Type.tp_name);
   21693           0 :                         return -1;
   21694             :                 }
   21695             :         }
   21696           0 :         return 0;
   21697             : }
   21698             : 
   21699           0 : static PyObject *py_netr_trust_extension_info_get_parent_index(PyObject *obj, void *closure)
   21700             : {
   21701           0 :         struct netr_trust_extension_info *object = (struct netr_trust_extension_info *)pytalloc_get_ptr(obj);
   21702             :         PyObject *py_parent_index;
   21703           0 :         py_parent_index = PyLong_FromUnsignedLongLong((uint32_t)object->parent_index);
   21704           0 :         return py_parent_index;
   21705             : }
   21706             : 
   21707           0 : static int py_netr_trust_extension_info_set_parent_index(PyObject *py_obj, PyObject *value, void *closure)
   21708             : {
   21709           0 :         struct netr_trust_extension_info *object = (struct netr_trust_extension_info *)pytalloc_get_ptr(py_obj);
   21710           0 :         if (value == NULL) {
   21711           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->parent_index");
   21712           0 :                 return -1;
   21713             :         }
   21714             :         {
   21715           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->parent_index));
   21716           0 :                 if (PyLong_Check(value)) {
   21717             :                         unsigned long long test_var;
   21718           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21719           0 :                         if (PyErr_Occurred() != NULL) {
   21720           0 :                                 return -1;
   21721             :                         }
   21722           0 :                         if (test_var > uint_max) {
   21723           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   21724             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21725           0 :                                 return -1;
   21726             :                         }
   21727           0 :                         object->parent_index = test_var;
   21728             :                 } else {
   21729           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   21730             :                           PyLong_Type.tp_name);
   21731           0 :                         return -1;
   21732             :                 }
   21733             :         }
   21734           0 :         return 0;
   21735             : }
   21736             : 
   21737           0 : static PyObject *py_netr_trust_extension_info_get_trust_type(PyObject *obj, void *closure)
   21738             : {
   21739           0 :         struct netr_trust_extension_info *object = (struct netr_trust_extension_info *)pytalloc_get_ptr(obj);
   21740             :         PyObject *py_trust_type;
   21741           0 :         py_trust_type = PyLong_FromUnsignedLongLong((uint32_t)object->trust_type);
   21742           0 :         return py_trust_type;
   21743             : }
   21744             : 
   21745           0 : static int py_netr_trust_extension_info_set_trust_type(PyObject *py_obj, PyObject *value, void *closure)
   21746             : {
   21747           0 :         struct netr_trust_extension_info *object = (struct netr_trust_extension_info *)pytalloc_get_ptr(py_obj);
   21748           0 :         if (value == NULL) {
   21749           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->trust_type");
   21750           0 :                 return -1;
   21751             :         }
   21752             :         {
   21753           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->trust_type));
   21754           0 :                 if (PyLong_Check(value)) {
   21755             :                         unsigned long long test_var;
   21756           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21757           0 :                         if (PyErr_Occurred() != NULL) {
   21758           0 :                                 return -1;
   21759             :                         }
   21760           0 :                         if (test_var > uint_max) {
   21761           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   21762             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21763           0 :                                 return -1;
   21764             :                         }
   21765           0 :                         object->trust_type = test_var;
   21766             :                 } else {
   21767           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   21768             :                           PyLong_Type.tp_name);
   21769           0 :                         return -1;
   21770             :                 }
   21771             :         }
   21772           0 :         return 0;
   21773             : }
   21774             : 
   21775           0 : static PyObject *py_netr_trust_extension_info_get_trust_attributes(PyObject *obj, void *closure)
   21776             : {
   21777           0 :         struct netr_trust_extension_info *object = (struct netr_trust_extension_info *)pytalloc_get_ptr(obj);
   21778             :         PyObject *py_trust_attributes;
   21779           0 :         py_trust_attributes = PyLong_FromUnsignedLongLong((uint32_t)object->trust_attributes);
   21780           0 :         return py_trust_attributes;
   21781             : }
   21782             : 
   21783           0 : static int py_netr_trust_extension_info_set_trust_attributes(PyObject *py_obj, PyObject *value, void *closure)
   21784             : {
   21785           0 :         struct netr_trust_extension_info *object = (struct netr_trust_extension_info *)pytalloc_get_ptr(py_obj);
   21786           0 :         if (value == NULL) {
   21787           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->trust_attributes");
   21788           0 :                 return -1;
   21789             :         }
   21790             :         {
   21791           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->trust_attributes));
   21792           0 :                 if (PyLong_Check(value)) {
   21793             :                         unsigned long long test_var;
   21794           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21795           0 :                         if (PyErr_Occurred() != NULL) {
   21796           0 :                                 return -1;
   21797             :                         }
   21798           0 :                         if (test_var > uint_max) {
   21799           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   21800             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21801           0 :                                 return -1;
   21802             :                         }
   21803           0 :                         object->trust_attributes = test_var;
   21804             :                 } else {
   21805           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   21806             :                           PyLong_Type.tp_name);
   21807           0 :                         return -1;
   21808             :                 }
   21809             :         }
   21810           0 :         return 0;
   21811             : }
   21812             : 
   21813             : static PyGetSetDef py_netr_trust_extension_info_getsetters[] = {
   21814             :         {
   21815             :                 .name = discard_const_p(char, "flags"),
   21816             :                 .get = py_netr_trust_extension_info_get_flags,
   21817             :                 .set = py_netr_trust_extension_info_set_flags,
   21818             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_TrustFlags")
   21819             :         },
   21820             :         {
   21821             :                 .name = discard_const_p(char, "parent_index"),
   21822             :                 .get = py_netr_trust_extension_info_get_parent_index,
   21823             :                 .set = py_netr_trust_extension_info_set_parent_index,
   21824             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21825             :         },
   21826             :         {
   21827             :                 .name = discard_const_p(char, "trust_type"),
   21828             :                 .get = py_netr_trust_extension_info_get_trust_type,
   21829             :                 .set = py_netr_trust_extension_info_set_trust_type,
   21830             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_TrustType")
   21831             :         },
   21832             :         {
   21833             :                 .name = discard_const_p(char, "trust_attributes"),
   21834             :                 .get = py_netr_trust_extension_info_get_trust_attributes,
   21835             :                 .set = py_netr_trust_extension_info_set_trust_attributes,
   21836             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_TrustAttributes")
   21837             :         },
   21838             :         { .name = NULL }
   21839             : };
   21840             : 
   21841           0 : static PyObject *py_netr_trust_extension_info_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21842             : {
   21843           0 :         return pytalloc_new(struct netr_trust_extension_info, type);
   21844             : }
   21845             : 
   21846             : 
   21847             : static PyTypeObject netr_trust_extension_info_Type = {
   21848             :         PyVarObject_HEAD_INIT(NULL, 0)
   21849             :         .tp_name = "netlogon.netr_trust_extension_info",
   21850             :         .tp_getset = py_netr_trust_extension_info_getsetters,
   21851             :         .tp_methods = NULL,
   21852             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21853             :         .tp_new = py_netr_trust_extension_info_new,
   21854             : };
   21855             : 
   21856             : 
   21857           0 : static PyObject *py_netr_trust_extension_get_length(PyObject *obj, void *closure)
   21858             : {
   21859           0 :         struct netr_trust_extension *object = (struct netr_trust_extension *)pytalloc_get_ptr(obj);
   21860             :         PyObject *py_length;
   21861           0 :         py_length = PyLong_FromUnsignedLongLong((uint32_t)object->length);
   21862           0 :         return py_length;
   21863             : }
   21864             : 
   21865           0 : static int py_netr_trust_extension_set_length(PyObject *py_obj, PyObject *value, void *closure)
   21866             : {
   21867           0 :         struct netr_trust_extension *object = (struct netr_trust_extension *)pytalloc_get_ptr(py_obj);
   21868           0 :         if (value == NULL) {
   21869           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
   21870           0 :                 return -1;
   21871             :         }
   21872             :         {
   21873           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
   21874           0 :                 if (PyLong_Check(value)) {
   21875             :                         unsigned long long test_var;
   21876           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21877           0 :                         if (PyErr_Occurred() != NULL) {
   21878           0 :                                 return -1;
   21879             :                         }
   21880           0 :                         if (test_var > uint_max) {
   21881           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   21882             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21883           0 :                                 return -1;
   21884             :                         }
   21885           0 :                         object->length = test_var;
   21886             :                 } else {
   21887           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   21888             :                           PyLong_Type.tp_name);
   21889           0 :                         return -1;
   21890             :                 }
   21891             :         }
   21892           0 :         return 0;
   21893             : }
   21894             : 
   21895           0 : static PyObject *py_netr_trust_extension_get_dummy(PyObject *obj, void *closure)
   21896             : {
   21897           0 :         struct netr_trust_extension *object = (struct netr_trust_extension *)pytalloc_get_ptr(obj);
   21898             :         PyObject *py_dummy;
   21899           0 :         py_dummy = PyLong_FromUnsignedLongLong((uint32_t)object->dummy);
   21900           0 :         return py_dummy;
   21901             : }
   21902             : 
   21903           0 : static int py_netr_trust_extension_set_dummy(PyObject *py_obj, PyObject *value, void *closure)
   21904             : {
   21905           0 :         struct netr_trust_extension *object = (struct netr_trust_extension *)pytalloc_get_ptr(py_obj);
   21906           0 :         if (value == NULL) {
   21907           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy");
   21908           0 :                 return -1;
   21909             :         }
   21910             :         {
   21911           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy));
   21912           0 :                 if (PyLong_Check(value)) {
   21913             :                         unsigned long long test_var;
   21914           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21915           0 :                         if (PyErr_Occurred() != NULL) {
   21916           0 :                                 return -1;
   21917             :                         }
   21918           0 :                         if (test_var > uint_max) {
   21919           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   21920             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21921           0 :                                 return -1;
   21922             :                         }
   21923           0 :                         object->dummy = test_var;
   21924             :                 } else {
   21925           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   21926             :                           PyLong_Type.tp_name);
   21927           0 :                         return -1;
   21928             :                 }
   21929             :         }
   21930           0 :         return 0;
   21931             : }
   21932             : 
   21933           0 : static PyObject *py_netr_trust_extension_get_size(PyObject *obj, void *closure)
   21934             : {
   21935           0 :         struct netr_trust_extension *object = (struct netr_trust_extension *)pytalloc_get_ptr(obj);
   21936             :         PyObject *py_size;
   21937           0 :         py_size = PyLong_FromUnsignedLongLong((uint32_t)object->size);
   21938           0 :         return py_size;
   21939             : }
   21940             : 
   21941           0 : static int py_netr_trust_extension_set_size(PyObject *py_obj, PyObject *value, void *closure)
   21942             : {
   21943           0 :         struct netr_trust_extension *object = (struct netr_trust_extension *)pytalloc_get_ptr(py_obj);
   21944           0 :         if (value == NULL) {
   21945           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->size");
   21946           0 :                 return -1;
   21947             :         }
   21948             :         {
   21949           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
   21950           0 :                 if (PyLong_Check(value)) {
   21951             :                         unsigned long long test_var;
   21952           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21953           0 :                         if (PyErr_Occurred() != NULL) {
   21954           0 :                                 return -1;
   21955             :                         }
   21956           0 :                         if (test_var > uint_max) {
   21957           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   21958             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21959           0 :                                 return -1;
   21960             :                         }
   21961           0 :                         object->size = test_var;
   21962             :                 } else {
   21963           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   21964             :                           PyLong_Type.tp_name);
   21965           0 :                         return -1;
   21966             :                 }
   21967             :         }
   21968           0 :         return 0;
   21969             : }
   21970             : 
   21971           0 : static PyObject *py_netr_trust_extension_get_info(PyObject *obj, void *closure)
   21972             : {
   21973           0 :         struct netr_trust_extension *object = (struct netr_trust_extension *)pytalloc_get_ptr(obj);
   21974             :         PyObject *py_info;
   21975           0 :         py_info = pytalloc_reference_ex(&netr_trust_extension_info_Type, pytalloc_get_mem_ctx(obj), &object->info);
   21976           0 :         return py_info;
   21977             : }
   21978             : 
   21979           0 : static int py_netr_trust_extension_set_info(PyObject *py_obj, PyObject *value, void *closure)
   21980             : {
   21981           0 :         struct netr_trust_extension *object = (struct netr_trust_extension *)pytalloc_get_ptr(py_obj);
   21982           0 :         if (value == NULL) {
   21983           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->info");
   21984           0 :                 return -1;
   21985             :         }
   21986           0 :         PY_CHECK_TYPE(&netr_trust_extension_info_Type, value, return -1;);
   21987           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   21988           0 :                 PyErr_NoMemory();
   21989           0 :                 return -1;
   21990             :         }
   21991           0 :         object->info = *(struct netr_trust_extension_info *)pytalloc_get_ptr(value);
   21992           0 :         return 0;
   21993             : }
   21994             : 
   21995             : static PyGetSetDef py_netr_trust_extension_getsetters[] = {
   21996             :         {
   21997             :                 .name = discard_const_p(char, "length"),
   21998             :                 .get = py_netr_trust_extension_get_length,
   21999             :                 .set = py_netr_trust_extension_set_length,
   22000             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
   22001             :         },
   22002             :         {
   22003             :                 .name = discard_const_p(char, "dummy"),
   22004             :                 .get = py_netr_trust_extension_get_dummy,
   22005             :                 .set = py_netr_trust_extension_set_dummy,
   22006             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
   22007             :         },
   22008             :         {
   22009             :                 .name = discard_const_p(char, "size"),
   22010             :                 .get = py_netr_trust_extension_get_size,
   22011             :                 .set = py_netr_trust_extension_set_size,
   22012             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
   22013             :         },
   22014             :         {
   22015             :                 .name = discard_const_p(char, "info"),
   22016             :                 .get = py_netr_trust_extension_get_info,
   22017             :                 .set = py_netr_trust_extension_set_info,
   22018             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_trust_extension_info")
   22019             :         },
   22020             :         { .name = NULL }
   22021             : };
   22022             : 
   22023           0 : static PyObject *py_netr_trust_extension_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22024             : {
   22025           0 :         return pytalloc_new(struct netr_trust_extension, type);
   22026             : }
   22027             : 
   22028             : 
   22029             : static PyTypeObject netr_trust_extension_Type = {
   22030             :         PyVarObject_HEAD_INIT(NULL, 0)
   22031             :         .tp_name = "netlogon.netr_trust_extension",
   22032             :         .tp_getset = py_netr_trust_extension_getsetters,
   22033             :         .tp_methods = NULL,
   22034             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22035             :         .tp_new = py_netr_trust_extension_new,
   22036             : };
   22037             : 
   22038             : 
   22039           0 : static PyObject *py_netr_trust_extension_container_get_length(PyObject *obj, void *closure)
   22040             : {
   22041           0 :         struct netr_trust_extension_container *object = (struct netr_trust_extension_container *)pytalloc_get_ptr(obj);
   22042             :         PyObject *py_length;
   22043           0 :         py_length = PyLong_FromLong((uint16_t)object->length);
   22044           0 :         return py_length;
   22045             : }
   22046             : 
   22047           0 : static int py_netr_trust_extension_container_set_length(PyObject *py_obj, PyObject *value, void *closure)
   22048             : {
   22049           0 :         struct netr_trust_extension_container *object = (struct netr_trust_extension_container *)pytalloc_get_ptr(py_obj);
   22050           0 :         if (value == NULL) {
   22051           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
   22052           0 :                 return -1;
   22053             :         }
   22054             :         {
   22055           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
   22056           0 :                 if (PyLong_Check(value)) {
   22057             :                         unsigned long long test_var;
   22058           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22059           0 :                         if (PyErr_Occurred() != NULL) {
   22060           0 :                                 return -1;
   22061             :                         }
   22062           0 :                         if (test_var > uint_max) {
   22063           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   22064             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22065           0 :                                 return -1;
   22066             :                         }
   22067           0 :                         object->length = test_var;
   22068             :                 } else {
   22069           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   22070             :                           PyLong_Type.tp_name);
   22071           0 :                         return -1;
   22072             :                 }
   22073             :         }
   22074           0 :         return 0;
   22075             : }
   22076             : 
   22077           0 : static PyObject *py_netr_trust_extension_container_get_size(PyObject *obj, void *closure)
   22078             : {
   22079           0 :         struct netr_trust_extension_container *object = (struct netr_trust_extension_container *)pytalloc_get_ptr(obj);
   22080             :         PyObject *py_size;
   22081           0 :         py_size = PyLong_FromLong((uint16_t)object->size);
   22082           0 :         return py_size;
   22083             : }
   22084             : 
   22085           0 : static int py_netr_trust_extension_container_set_size(PyObject *py_obj, PyObject *value, void *closure)
   22086             : {
   22087           0 :         struct netr_trust_extension_container *object = (struct netr_trust_extension_container *)pytalloc_get_ptr(py_obj);
   22088           0 :         if (value == NULL) {
   22089           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->size");
   22090           0 :                 return -1;
   22091             :         }
   22092             :         {
   22093           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
   22094           0 :                 if (PyLong_Check(value)) {
   22095             :                         unsigned long long test_var;
   22096           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22097           0 :                         if (PyErr_Occurred() != NULL) {
   22098           0 :                                 return -1;
   22099             :                         }
   22100           0 :                         if (test_var > uint_max) {
   22101           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   22102             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22103           0 :                                 return -1;
   22104             :                         }
   22105           0 :                         object->size = test_var;
   22106             :                 } else {
   22107           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   22108             :                           PyLong_Type.tp_name);
   22109           0 :                         return -1;
   22110             :                 }
   22111             :         }
   22112           0 :         return 0;
   22113             : }
   22114             : 
   22115           0 : static PyObject *py_netr_trust_extension_container_get_info(PyObject *obj, void *closure)
   22116             : {
   22117           0 :         struct netr_trust_extension_container *object = (struct netr_trust_extension_container *)pytalloc_get_ptr(obj);
   22118             :         PyObject *py_info;
   22119           0 :         if (object->info == NULL) {
   22120           0 :                 Py_RETURN_NONE;
   22121             :         }
   22122           0 :         if (object->info == NULL) {
   22123           0 :                 py_info = Py_None;
   22124           0 :                 Py_INCREF(py_info);
   22125             :         } else {
   22126           0 :                 py_info = pytalloc_reference_ex(&netr_trust_extension_Type, object->info, object->info);
   22127             :         }
   22128           0 :         return py_info;
   22129             : }
   22130             : 
   22131           0 : static int py_netr_trust_extension_container_set_info(PyObject *py_obj, PyObject *value, void *closure)
   22132             : {
   22133           0 :         struct netr_trust_extension_container *object = (struct netr_trust_extension_container *)pytalloc_get_ptr(py_obj);
   22134           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->info));
   22135           0 :         if (value == NULL) {
   22136           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->info");
   22137           0 :                 return -1;
   22138             :         }
   22139           0 :         if (value == Py_None) {
   22140           0 :                 object->info = NULL;
   22141             :         } else {
   22142           0 :                 object->info = NULL;
   22143           0 :                 PY_CHECK_TYPE(&netr_trust_extension_Type, value, return -1;);
   22144           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22145           0 :                         PyErr_NoMemory();
   22146           0 :                         return -1;
   22147             :                 }
   22148           0 :                 object->info = (struct netr_trust_extension *)pytalloc_get_ptr(value);
   22149             :         }
   22150           0 :         return 0;
   22151             : }
   22152             : 
   22153             : static PyGetSetDef py_netr_trust_extension_container_getsetters[] = {
   22154             :         {
   22155             :                 .name = discard_const_p(char, "length"),
   22156             :                 .get = py_netr_trust_extension_container_get_length,
   22157             :                 .set = py_netr_trust_extension_container_set_length,
   22158             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   22159             :         },
   22160             :         {
   22161             :                 .name = discard_const_p(char, "size"),
   22162             :                 .get = py_netr_trust_extension_container_get_size,
   22163             :                 .set = py_netr_trust_extension_container_set_size,
   22164             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   22165             :         },
   22166             :         {
   22167             :                 .name = discard_const_p(char, "info"),
   22168             :                 .get = py_netr_trust_extension_container_get_info,
   22169             :                 .set = py_netr_trust_extension_container_set_info,
   22170             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_trust_extension")
   22171             :         },
   22172             :         { .name = NULL }
   22173             : };
   22174             : 
   22175           0 : static PyObject *py_netr_trust_extension_container_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22176             : {
   22177           0 :         return pytalloc_new(struct netr_trust_extension_container, type);
   22178             : }
   22179             : 
   22180             : 
   22181             : static PyTypeObject netr_trust_extension_container_Type = {
   22182             :         PyVarObject_HEAD_INIT(NULL, 0)
   22183             :         .tp_name = "netlogon.netr_trust_extension_container",
   22184             :         .tp_getset = py_netr_trust_extension_container_getsetters,
   22185             :         .tp_methods = NULL,
   22186             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22187             :         .tp_new = py_netr_trust_extension_container_new,
   22188             : };
   22189             : 
   22190             : 
   22191           0 : static PyObject *py_netr_OneDomainInfo_get_domainname(PyObject *obj, void *closure)
   22192             : {
   22193           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22194             :         PyObject *py_domainname;
   22195           0 :         py_domainname = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->domainname);
   22196           0 :         return py_domainname;
   22197             : }
   22198             : 
   22199           0 : static int py_netr_OneDomainInfo_set_domainname(PyObject *py_obj, PyObject *value, void *closure)
   22200             : {
   22201           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22202           0 :         if (value == NULL) {
   22203           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domainname");
   22204           0 :                 return -1;
   22205             :         }
   22206           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   22207           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22208           0 :                 PyErr_NoMemory();
   22209           0 :                 return -1;
   22210             :         }
   22211           0 :         object->domainname = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   22212           0 :         return 0;
   22213             : }
   22214             : 
   22215           0 : static PyObject *py_netr_OneDomainInfo_get_dns_domainname(PyObject *obj, void *closure)
   22216             : {
   22217           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22218             :         PyObject *py_dns_domainname;
   22219           0 :         py_dns_domainname = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dns_domainname);
   22220           0 :         return py_dns_domainname;
   22221             : }
   22222             : 
   22223           0 : static int py_netr_OneDomainInfo_set_dns_domainname(PyObject *py_obj, PyObject *value, void *closure)
   22224             : {
   22225           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22226           0 :         if (value == NULL) {
   22227           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_domainname");
   22228           0 :                 return -1;
   22229             :         }
   22230           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   22231           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22232           0 :                 PyErr_NoMemory();
   22233           0 :                 return -1;
   22234             :         }
   22235           0 :         object->dns_domainname = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   22236           0 :         return 0;
   22237             : }
   22238             : 
   22239           0 : static PyObject *py_netr_OneDomainInfo_get_dns_forestname(PyObject *obj, void *closure)
   22240             : {
   22241           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22242             :         PyObject *py_dns_forestname;
   22243           0 :         py_dns_forestname = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dns_forestname);
   22244           0 :         return py_dns_forestname;
   22245             : }
   22246             : 
   22247           0 : static int py_netr_OneDomainInfo_set_dns_forestname(PyObject *py_obj, PyObject *value, void *closure)
   22248             : {
   22249           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22250           0 :         if (value == NULL) {
   22251           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_forestname");
   22252           0 :                 return -1;
   22253             :         }
   22254           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   22255           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22256           0 :                 PyErr_NoMemory();
   22257           0 :                 return -1;
   22258             :         }
   22259           0 :         object->dns_forestname = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   22260           0 :         return 0;
   22261             : }
   22262             : 
   22263           0 : static PyObject *py_netr_OneDomainInfo_get_domain_guid(PyObject *obj, void *closure)
   22264             : {
   22265           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22266             :         PyObject *py_domain_guid;
   22267           0 :         py_domain_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->domain_guid);
   22268           0 :         return py_domain_guid;
   22269             : }
   22270             : 
   22271           0 : static int py_netr_OneDomainInfo_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
   22272             : {
   22273           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22274           0 :         if (value == NULL) {
   22275           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_guid");
   22276           0 :                 return -1;
   22277             :         }
   22278           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   22279           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22280           0 :                 PyErr_NoMemory();
   22281           0 :                 return -1;
   22282             :         }
   22283           0 :         object->domain_guid = *(struct GUID *)pytalloc_get_ptr(value);
   22284           0 :         return 0;
   22285             : }
   22286             : 
   22287           0 : static PyObject *py_netr_OneDomainInfo_get_domain_sid(PyObject *obj, void *closure)
   22288             : {
   22289           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22290             :         PyObject *py_domain_sid;
   22291           0 :         if (object->domain_sid == NULL) {
   22292           0 :                 Py_RETURN_NONE;
   22293             :         }
   22294           0 :         if (object->domain_sid == NULL) {
   22295           0 :                 py_domain_sid = Py_None;
   22296           0 :                 Py_INCREF(py_domain_sid);
   22297             :         } else {
   22298           0 :                 py_domain_sid = pytalloc_reference_ex(dom_sid_Type, object->domain_sid, object->domain_sid);
   22299             :         }
   22300           0 :         return py_domain_sid;
   22301             : }
   22302             : 
   22303           0 : static int py_netr_OneDomainInfo_set_domain_sid(PyObject *py_obj, PyObject *value, void *closure)
   22304             : {
   22305           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22306           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->domain_sid));
   22307           0 :         if (value == NULL) {
   22308           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_sid");
   22309           0 :                 return -1;
   22310             :         }
   22311           0 :         if (value == Py_None) {
   22312           0 :                 object->domain_sid = NULL;
   22313             :         } else {
   22314           0 :                 object->domain_sid = NULL;
   22315           0 :                 PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
   22316           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22317           0 :                         PyErr_NoMemory();
   22318           0 :                         return -1;
   22319             :                 }
   22320           0 :                 object->domain_sid = (struct dom_sid *)pytalloc_get_ptr(value);
   22321             :         }
   22322           0 :         return 0;
   22323             : }
   22324             : 
   22325           0 : static PyObject *py_netr_OneDomainInfo_get_trust_extension(PyObject *obj, void *closure)
   22326             : {
   22327           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22328             :         PyObject *py_trust_extension;
   22329           0 :         py_trust_extension = pytalloc_reference_ex(&netr_trust_extension_container_Type, pytalloc_get_mem_ctx(obj), &object->trust_extension);
   22330           0 :         return py_trust_extension;
   22331             : }
   22332             : 
   22333           0 : static int py_netr_OneDomainInfo_set_trust_extension(PyObject *py_obj, PyObject *value, void *closure)
   22334             : {
   22335           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22336           0 :         if (value == NULL) {
   22337           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->trust_extension");
   22338           0 :                 return -1;
   22339             :         }
   22340           0 :         PY_CHECK_TYPE(&netr_trust_extension_container_Type, value, return -1;);
   22341           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22342           0 :                 PyErr_NoMemory();
   22343           0 :                 return -1;
   22344             :         }
   22345           0 :         object->trust_extension = *(struct netr_trust_extension_container *)pytalloc_get_ptr(value);
   22346           0 :         return 0;
   22347             : }
   22348             : 
   22349           0 : static PyObject *py_netr_OneDomainInfo_get_dummy_string2(PyObject *obj, void *closure)
   22350             : {
   22351           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22352             :         PyObject *py_dummy_string2;
   22353           0 :         py_dummy_string2 = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string2);
   22354           0 :         return py_dummy_string2;
   22355             : }
   22356             : 
   22357           0 : static int py_netr_OneDomainInfo_set_dummy_string2(PyObject *py_obj, PyObject *value, void *closure)
   22358             : {
   22359           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22360           0 :         if (value == NULL) {
   22361           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_string2");
   22362           0 :                 return -1;
   22363             :         }
   22364           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   22365           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22366           0 :                 PyErr_NoMemory();
   22367           0 :                 return -1;
   22368             :         }
   22369           0 :         object->dummy_string2 = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   22370           0 :         return 0;
   22371             : }
   22372             : 
   22373           0 : static PyObject *py_netr_OneDomainInfo_get_dummy_string3(PyObject *obj, void *closure)
   22374             : {
   22375           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22376             :         PyObject *py_dummy_string3;
   22377           0 :         py_dummy_string3 = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string3);
   22378           0 :         return py_dummy_string3;
   22379             : }
   22380             : 
   22381           0 : static int py_netr_OneDomainInfo_set_dummy_string3(PyObject *py_obj, PyObject *value, void *closure)
   22382             : {
   22383           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22384           0 :         if (value == NULL) {
   22385           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_string3");
   22386           0 :                 return -1;
   22387             :         }
   22388           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   22389           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22390           0 :                 PyErr_NoMemory();
   22391           0 :                 return -1;
   22392             :         }
   22393           0 :         object->dummy_string3 = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   22394           0 :         return 0;
   22395             : }
   22396             : 
   22397           0 : static PyObject *py_netr_OneDomainInfo_get_dummy_string4(PyObject *obj, void *closure)
   22398             : {
   22399           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22400             :         PyObject *py_dummy_string4;
   22401           0 :         py_dummy_string4 = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string4);
   22402           0 :         return py_dummy_string4;
   22403             : }
   22404             : 
   22405           0 : static int py_netr_OneDomainInfo_set_dummy_string4(PyObject *py_obj, PyObject *value, void *closure)
   22406             : {
   22407           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22408           0 :         if (value == NULL) {
   22409           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_string4");
   22410           0 :                 return -1;
   22411             :         }
   22412           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   22413           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22414           0 :                 PyErr_NoMemory();
   22415           0 :                 return -1;
   22416             :         }
   22417           0 :         object->dummy_string4 = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   22418           0 :         return 0;
   22419             : }
   22420             : 
   22421           0 : static PyObject *py_netr_OneDomainInfo_get_dummy_long1(PyObject *obj, void *closure)
   22422             : {
   22423           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22424             :         PyObject *py_dummy_long1;
   22425           0 :         py_dummy_long1 = PyLong_FromUnsignedLongLong((uint32_t)object->dummy_long1);
   22426           0 :         return py_dummy_long1;
   22427             : }
   22428             : 
   22429           0 : static int py_netr_OneDomainInfo_set_dummy_long1(PyObject *py_obj, PyObject *value, void *closure)
   22430             : {
   22431           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22432           0 :         if (value == NULL) {
   22433           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_long1");
   22434           0 :                 return -1;
   22435             :         }
   22436             :         {
   22437           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long1));
   22438           0 :                 if (PyLong_Check(value)) {
   22439             :                         unsigned long long test_var;
   22440           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22441           0 :                         if (PyErr_Occurred() != NULL) {
   22442           0 :                                 return -1;
   22443             :                         }
   22444           0 :                         if (test_var > uint_max) {
   22445           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   22446             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22447           0 :                                 return -1;
   22448             :                         }
   22449           0 :                         object->dummy_long1 = test_var;
   22450             :                 } else {
   22451           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   22452             :                           PyLong_Type.tp_name);
   22453           0 :                         return -1;
   22454             :                 }
   22455             :         }
   22456           0 :         return 0;
   22457             : }
   22458             : 
   22459           0 : static PyObject *py_netr_OneDomainInfo_get_dummy_long2(PyObject *obj, void *closure)
   22460             : {
   22461           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22462             :         PyObject *py_dummy_long2;
   22463           0 :         py_dummy_long2 = PyLong_FromUnsignedLongLong((uint32_t)object->dummy_long2);
   22464           0 :         return py_dummy_long2;
   22465             : }
   22466             : 
   22467           0 : static int py_netr_OneDomainInfo_set_dummy_long2(PyObject *py_obj, PyObject *value, void *closure)
   22468             : {
   22469           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22470           0 :         if (value == NULL) {
   22471           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_long2");
   22472           0 :                 return -1;
   22473             :         }
   22474             :         {
   22475           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long2));
   22476           0 :                 if (PyLong_Check(value)) {
   22477             :                         unsigned long long test_var;
   22478           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22479           0 :                         if (PyErr_Occurred() != NULL) {
   22480           0 :                                 return -1;
   22481             :                         }
   22482           0 :                         if (test_var > uint_max) {
   22483           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   22484             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22485           0 :                                 return -1;
   22486             :                         }
   22487           0 :                         object->dummy_long2 = test_var;
   22488             :                 } else {
   22489           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   22490             :                           PyLong_Type.tp_name);
   22491           0 :                         return -1;
   22492             :                 }
   22493             :         }
   22494           0 :         return 0;
   22495             : }
   22496             : 
   22497           0 : static PyObject *py_netr_OneDomainInfo_get_dummy_long3(PyObject *obj, void *closure)
   22498             : {
   22499           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22500             :         PyObject *py_dummy_long3;
   22501           0 :         py_dummy_long3 = PyLong_FromUnsignedLongLong((uint32_t)object->dummy_long3);
   22502           0 :         return py_dummy_long3;
   22503             : }
   22504             : 
   22505           0 : static int py_netr_OneDomainInfo_set_dummy_long3(PyObject *py_obj, PyObject *value, void *closure)
   22506             : {
   22507           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22508           0 :         if (value == NULL) {
   22509           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_long3");
   22510           0 :                 return -1;
   22511             :         }
   22512             :         {
   22513           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long3));
   22514           0 :                 if (PyLong_Check(value)) {
   22515             :                         unsigned long long test_var;
   22516           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22517           0 :                         if (PyErr_Occurred() != NULL) {
   22518           0 :                                 return -1;
   22519             :                         }
   22520           0 :                         if (test_var > uint_max) {
   22521           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   22522             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22523           0 :                                 return -1;
   22524             :                         }
   22525           0 :                         object->dummy_long3 = test_var;
   22526             :                 } else {
   22527           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   22528             :                           PyLong_Type.tp_name);
   22529           0 :                         return -1;
   22530             :                 }
   22531             :         }
   22532           0 :         return 0;
   22533             : }
   22534             : 
   22535           0 : static PyObject *py_netr_OneDomainInfo_get_dummy_long4(PyObject *obj, void *closure)
   22536             : {
   22537           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(obj);
   22538             :         PyObject *py_dummy_long4;
   22539           0 :         py_dummy_long4 = PyLong_FromUnsignedLongLong((uint32_t)object->dummy_long4);
   22540           0 :         return py_dummy_long4;
   22541             : }
   22542             : 
   22543           0 : static int py_netr_OneDomainInfo_set_dummy_long4(PyObject *py_obj, PyObject *value, void *closure)
   22544             : {
   22545           0 :         struct netr_OneDomainInfo *object = (struct netr_OneDomainInfo *)pytalloc_get_ptr(py_obj);
   22546           0 :         if (value == NULL) {
   22547           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_long4");
   22548           0 :                 return -1;
   22549             :         }
   22550             :         {
   22551           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long4));
   22552           0 :                 if (PyLong_Check(value)) {
   22553             :                         unsigned long long test_var;
   22554           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22555           0 :                         if (PyErr_Occurred() != NULL) {
   22556           0 :                                 return -1;
   22557             :                         }
   22558           0 :                         if (test_var > uint_max) {
   22559           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   22560             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22561           0 :                                 return -1;
   22562             :                         }
   22563           0 :                         object->dummy_long4 = test_var;
   22564             :                 } else {
   22565           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   22566             :                           PyLong_Type.tp_name);
   22567           0 :                         return -1;
   22568             :                 }
   22569             :         }
   22570           0 :         return 0;
   22571             : }
   22572             : 
   22573             : static PyGetSetDef py_netr_OneDomainInfo_getsetters[] = {
   22574             :         {
   22575             :                 .name = discard_const_p(char, "domainname"),
   22576             :                 .get = py_netr_OneDomainInfo_get_domainname,
   22577             :                 .set = py_netr_OneDomainInfo_set_domainname,
   22578             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   22579             :         },
   22580             :         {
   22581             :                 .name = discard_const_p(char, "dns_domainname"),
   22582             :                 .get = py_netr_OneDomainInfo_get_dns_domainname,
   22583             :                 .set = py_netr_OneDomainInfo_set_dns_domainname,
   22584             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   22585             :         },
   22586             :         {
   22587             :                 .name = discard_const_p(char, "dns_forestname"),
   22588             :                 .get = py_netr_OneDomainInfo_get_dns_forestname,
   22589             :                 .set = py_netr_OneDomainInfo_set_dns_forestname,
   22590             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   22591             :         },
   22592             :         {
   22593             :                 .name = discard_const_p(char, "domain_guid"),
   22594             :                 .get = py_netr_OneDomainInfo_get_domain_guid,
   22595             :                 .set = py_netr_OneDomainInfo_set_domain_guid,
   22596             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   22597             :         },
   22598             :         {
   22599             :                 .name = discard_const_p(char, "domain_sid"),
   22600             :                 .get = py_netr_OneDomainInfo_get_domain_sid,
   22601             :                 .set = py_netr_OneDomainInfo_set_domain_sid,
   22602             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid2")
   22603             :         },
   22604             :         {
   22605             :                 .name = discard_const_p(char, "trust_extension"),
   22606             :                 .get = py_netr_OneDomainInfo_get_trust_extension,
   22607             :                 .set = py_netr_OneDomainInfo_set_trust_extension,
   22608             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_trust_extension_container")
   22609             :         },
   22610             :         {
   22611             :                 .name = discard_const_p(char, "dummy_string2"),
   22612             :                 .get = py_netr_OneDomainInfo_get_dummy_string2,
   22613             :                 .set = py_netr_OneDomainInfo_set_dummy_string2,
   22614             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   22615             :         },
   22616             :         {
   22617             :                 .name = discard_const_p(char, "dummy_string3"),
   22618             :                 .get = py_netr_OneDomainInfo_get_dummy_string3,
   22619             :                 .set = py_netr_OneDomainInfo_set_dummy_string3,
   22620             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   22621             :         },
   22622             :         {
   22623             :                 .name = discard_const_p(char, "dummy_string4"),
   22624             :                 .get = py_netr_OneDomainInfo_get_dummy_string4,
   22625             :                 .set = py_netr_OneDomainInfo_set_dummy_string4,
   22626             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   22627             :         },
   22628             :         {
   22629             :                 .name = discard_const_p(char, "dummy_long1"),
   22630             :                 .get = py_netr_OneDomainInfo_get_dummy_long1,
   22631             :                 .set = py_netr_OneDomainInfo_set_dummy_long1,
   22632             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22633             :         },
   22634             :         {
   22635             :                 .name = discard_const_p(char, "dummy_long2"),
   22636             :                 .get = py_netr_OneDomainInfo_get_dummy_long2,
   22637             :                 .set = py_netr_OneDomainInfo_set_dummy_long2,
   22638             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22639             :         },
   22640             :         {
   22641             :                 .name = discard_const_p(char, "dummy_long3"),
   22642             :                 .get = py_netr_OneDomainInfo_get_dummy_long3,
   22643             :                 .set = py_netr_OneDomainInfo_set_dummy_long3,
   22644             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22645             :         },
   22646             :         {
   22647             :                 .name = discard_const_p(char, "dummy_long4"),
   22648             :                 .get = py_netr_OneDomainInfo_get_dummy_long4,
   22649             :                 .set = py_netr_OneDomainInfo_set_dummy_long4,
   22650             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22651             :         },
   22652             :         { .name = NULL }
   22653             : };
   22654             : 
   22655           0 : static PyObject *py_netr_OneDomainInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22656             : {
   22657           0 :         return pytalloc_new(struct netr_OneDomainInfo, type);
   22658             : }
   22659             : 
   22660             : 
   22661             : static PyTypeObject netr_OneDomainInfo_Type = {
   22662             :         PyVarObject_HEAD_INIT(NULL, 0)
   22663             :         .tp_name = "netlogon.netr_OneDomainInfo",
   22664             :         .tp_getset = py_netr_OneDomainInfo_getsetters,
   22665             :         .tp_methods = NULL,
   22666             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22667             :         .tp_new = py_netr_OneDomainInfo_new,
   22668             : };
   22669             : 
   22670             : 
   22671           0 : static PyObject *py_netr_DomainInformation_get_primary_domain(PyObject *obj, void *closure)
   22672             : {
   22673           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(obj);
   22674             :         PyObject *py_primary_domain;
   22675           0 :         py_primary_domain = pytalloc_reference_ex(&netr_OneDomainInfo_Type, pytalloc_get_mem_ctx(obj), &object->primary_domain);
   22676           0 :         return py_primary_domain;
   22677             : }
   22678             : 
   22679           0 : static int py_netr_DomainInformation_set_primary_domain(PyObject *py_obj, PyObject *value, void *closure)
   22680             : {
   22681           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(py_obj);
   22682           0 :         if (value == NULL) {
   22683           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->primary_domain");
   22684           0 :                 return -1;
   22685             :         }
   22686           0 :         PY_CHECK_TYPE(&netr_OneDomainInfo_Type, value, return -1;);
   22687           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22688           0 :                 PyErr_NoMemory();
   22689           0 :                 return -1;
   22690             :         }
   22691           0 :         object->primary_domain = *(struct netr_OneDomainInfo *)pytalloc_get_ptr(value);
   22692           0 :         return 0;
   22693             : }
   22694             : 
   22695           0 : static PyObject *py_netr_DomainInformation_get_trusted_domain_count(PyObject *obj, void *closure)
   22696             : {
   22697           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(obj);
   22698             :         PyObject *py_trusted_domain_count;
   22699           0 :         py_trusted_domain_count = PyLong_FromUnsignedLongLong((uint32_t)object->trusted_domain_count);
   22700           0 :         return py_trusted_domain_count;
   22701             : }
   22702             : 
   22703           0 : static int py_netr_DomainInformation_set_trusted_domain_count(PyObject *py_obj, PyObject *value, void *closure)
   22704             : {
   22705           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(py_obj);
   22706           0 :         if (value == NULL) {
   22707           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->trusted_domain_count");
   22708           0 :                 return -1;
   22709             :         }
   22710             :         {
   22711           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->trusted_domain_count));
   22712           0 :                 if (PyLong_Check(value)) {
   22713             :                         unsigned long long test_var;
   22714           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22715           0 :                         if (PyErr_Occurred() != NULL) {
   22716           0 :                                 return -1;
   22717             :                         }
   22718           0 :                         if (test_var > uint_max) {
   22719           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   22720             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22721           0 :                                 return -1;
   22722             :                         }
   22723           0 :                         object->trusted_domain_count = test_var;
   22724             :                 } else {
   22725           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   22726             :                           PyLong_Type.tp_name);
   22727           0 :                         return -1;
   22728             :                 }
   22729             :         }
   22730           0 :         return 0;
   22731             : }
   22732             : 
   22733           0 : static PyObject *py_netr_DomainInformation_get_trusted_domains(PyObject *obj, void *closure)
   22734             : {
   22735           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(obj);
   22736             :         PyObject *py_trusted_domains;
   22737           0 :         if (object->trusted_domains == NULL) {
   22738           0 :                 Py_RETURN_NONE;
   22739             :         }
   22740           0 :         if (object->trusted_domains == NULL) {
   22741           0 :                 py_trusted_domains = Py_None;
   22742           0 :                 Py_INCREF(py_trusted_domains);
   22743             :         } else {
   22744           0 :                 py_trusted_domains = PyList_New(object->trusted_domain_count);
   22745           0 :                 if (py_trusted_domains == NULL) {
   22746           0 :                         return NULL;
   22747             :                 }
   22748             :                 {
   22749             :                         int trusted_domains_cntr_1;
   22750           0 :                         for (trusted_domains_cntr_1 = 0; trusted_domains_cntr_1 < (object->trusted_domain_count); trusted_domains_cntr_1++) {
   22751             :                                 PyObject *py_trusted_domains_1;
   22752           0 :                                 py_trusted_domains_1 = pytalloc_reference_ex(&netr_OneDomainInfo_Type, object->trusted_domains, &object->trusted_domains[trusted_domains_cntr_1]);
   22753           0 :                                 PyList_SetItem(py_trusted_domains, trusted_domains_cntr_1, py_trusted_domains_1);
   22754             :                         }
   22755             :                 }
   22756             :         }
   22757           0 :         return py_trusted_domains;
   22758             : }
   22759             : 
   22760           0 : static int py_netr_DomainInformation_set_trusted_domains(PyObject *py_obj, PyObject *value, void *closure)
   22761             : {
   22762           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(py_obj);
   22763           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->trusted_domains));
   22764           0 :         if (value == NULL) {
   22765           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->trusted_domains");
   22766           0 :                 return -1;
   22767             :         }
   22768           0 :         if (value == Py_None) {
   22769           0 :                 object->trusted_domains = NULL;
   22770             :         } else {
   22771           0 :                 object->trusted_domains = NULL;
   22772           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   22773             :                 {
   22774             :                         int trusted_domains_cntr_1;
   22775           0 :                         object->trusted_domains = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->trusted_domains, PyList_GET_SIZE(value));
   22776           0 :                         if (!object->trusted_domains) { return -1;; }
   22777           0 :                         talloc_set_name_const(object->trusted_domains, "ARRAY: object->trusted_domains");
   22778           0 :                         for (trusted_domains_cntr_1 = 0; trusted_domains_cntr_1 < PyList_GET_SIZE(value); trusted_domains_cntr_1++) {
   22779           0 :                                 if (PyList_GET_ITEM(value, trusted_domains_cntr_1) == NULL) {
   22780           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->trusted_domains[trusted_domains_cntr_1]");
   22781           0 :                                         return -1;
   22782             :                                 }
   22783           0 :                                 PY_CHECK_TYPE(&netr_OneDomainInfo_Type, PyList_GET_ITEM(value, trusted_domains_cntr_1), return -1;);
   22784           0 :                                 if (talloc_reference(object->trusted_domains, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, trusted_domains_cntr_1))) == NULL) {
   22785           0 :                                         PyErr_NoMemory();
   22786           0 :                                         return -1;
   22787             :                                 }
   22788           0 :                                 object->trusted_domains[trusted_domains_cntr_1] = *(struct netr_OneDomainInfo *)pytalloc_get_ptr(PyList_GET_ITEM(value, trusted_domains_cntr_1));
   22789             :                         }
   22790             :                 }
   22791             :         }
   22792           0 :         return 0;
   22793             : }
   22794             : 
   22795           0 : static PyObject *py_netr_DomainInformation_get_lsa_policy(PyObject *obj, void *closure)
   22796             : {
   22797           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(obj);
   22798             :         PyObject *py_lsa_policy;
   22799           0 :         py_lsa_policy = pytalloc_reference_ex(&netr_LsaPolicyInformation_Type, pytalloc_get_mem_ctx(obj), &object->lsa_policy);
   22800           0 :         return py_lsa_policy;
   22801             : }
   22802             : 
   22803           0 : static int py_netr_DomainInformation_set_lsa_policy(PyObject *py_obj, PyObject *value, void *closure)
   22804             : {
   22805           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(py_obj);
   22806           0 :         if (value == NULL) {
   22807           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lsa_policy");
   22808           0 :                 return -1;
   22809             :         }
   22810           0 :         PY_CHECK_TYPE(&netr_LsaPolicyInformation_Type, value, return -1;);
   22811           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22812           0 :                 PyErr_NoMemory();
   22813           0 :                 return -1;
   22814             :         }
   22815           0 :         object->lsa_policy = *(struct netr_LsaPolicyInformation *)pytalloc_get_ptr(value);
   22816           0 :         return 0;
   22817             : }
   22818             : 
   22819           0 : static PyObject *py_netr_DomainInformation_get_dns_hostname(PyObject *obj, void *closure)
   22820             : {
   22821           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(obj);
   22822             :         PyObject *py_dns_hostname;
   22823           0 :         py_dns_hostname = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dns_hostname);
   22824           0 :         return py_dns_hostname;
   22825             : }
   22826             : 
   22827           0 : static int py_netr_DomainInformation_set_dns_hostname(PyObject *py_obj, PyObject *value, void *closure)
   22828             : {
   22829           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(py_obj);
   22830           0 :         if (value == NULL) {
   22831           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_hostname");
   22832           0 :                 return -1;
   22833             :         }
   22834           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   22835           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22836           0 :                 PyErr_NoMemory();
   22837           0 :                 return -1;
   22838             :         }
   22839           0 :         object->dns_hostname = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   22840           0 :         return 0;
   22841             : }
   22842             : 
   22843           0 : static PyObject *py_netr_DomainInformation_get_dummy_string2(PyObject *obj, void *closure)
   22844             : {
   22845           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(obj);
   22846             :         PyObject *py_dummy_string2;
   22847           0 :         py_dummy_string2 = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string2);
   22848           0 :         return py_dummy_string2;
   22849             : }
   22850             : 
   22851           0 : static int py_netr_DomainInformation_set_dummy_string2(PyObject *py_obj, PyObject *value, void *closure)
   22852             : {
   22853           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(py_obj);
   22854           0 :         if (value == NULL) {
   22855           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_string2");
   22856           0 :                 return -1;
   22857             :         }
   22858           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   22859           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22860           0 :                 PyErr_NoMemory();
   22861           0 :                 return -1;
   22862             :         }
   22863           0 :         object->dummy_string2 = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   22864           0 :         return 0;
   22865             : }
   22866             : 
   22867           0 : static PyObject *py_netr_DomainInformation_get_dummy_string3(PyObject *obj, void *closure)
   22868             : {
   22869           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(obj);
   22870             :         PyObject *py_dummy_string3;
   22871           0 :         py_dummy_string3 = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string3);
   22872           0 :         return py_dummy_string3;
   22873             : }
   22874             : 
   22875           0 : static int py_netr_DomainInformation_set_dummy_string3(PyObject *py_obj, PyObject *value, void *closure)
   22876             : {
   22877           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(py_obj);
   22878           0 :         if (value == NULL) {
   22879           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_string3");
   22880           0 :                 return -1;
   22881             :         }
   22882           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   22883           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22884           0 :                 PyErr_NoMemory();
   22885           0 :                 return -1;
   22886             :         }
   22887           0 :         object->dummy_string3 = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   22888           0 :         return 0;
   22889             : }
   22890             : 
   22891           0 : static PyObject *py_netr_DomainInformation_get_dummy_string4(PyObject *obj, void *closure)
   22892             : {
   22893           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(obj);
   22894             :         PyObject *py_dummy_string4;
   22895           0 :         py_dummy_string4 = pytalloc_reference_ex(lsa_StringLarge_Type, pytalloc_get_mem_ctx(obj), &object->dummy_string4);
   22896           0 :         return py_dummy_string4;
   22897             : }
   22898             : 
   22899           0 : static int py_netr_DomainInformation_set_dummy_string4(PyObject *py_obj, PyObject *value, void *closure)
   22900             : {
   22901           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(py_obj);
   22902           0 :         if (value == NULL) {
   22903           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_string4");
   22904           0 :                 return -1;
   22905             :         }
   22906           0 :         PY_CHECK_TYPE(lsa_StringLarge_Type, value, return -1;);
   22907           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22908           0 :                 PyErr_NoMemory();
   22909           0 :                 return -1;
   22910             :         }
   22911           0 :         object->dummy_string4 = *(struct lsa_StringLarge *)pytalloc_get_ptr(value);
   22912           0 :         return 0;
   22913             : }
   22914             : 
   22915           0 : static PyObject *py_netr_DomainInformation_get_workstation_flags(PyObject *obj, void *closure)
   22916             : {
   22917           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(obj);
   22918             :         PyObject *py_workstation_flags;
   22919           0 :         py_workstation_flags = PyLong_FromUnsignedLongLong((uint32_t)object->workstation_flags);
   22920           0 :         return py_workstation_flags;
   22921             : }
   22922             : 
   22923           0 : static int py_netr_DomainInformation_set_workstation_flags(PyObject *py_obj, PyObject *value, void *closure)
   22924             : {
   22925           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(py_obj);
   22926           0 :         if (value == NULL) {
   22927           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->workstation_flags");
   22928           0 :                 return -1;
   22929             :         }
   22930             :         {
   22931           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->workstation_flags));
   22932           0 :                 if (PyLong_Check(value)) {
   22933             :                         unsigned long long test_var;
   22934           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22935           0 :                         if (PyErr_Occurred() != NULL) {
   22936           0 :                                 return -1;
   22937             :                         }
   22938           0 :                         if (test_var > uint_max) {
   22939           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   22940             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22941           0 :                                 return -1;
   22942             :                         }
   22943           0 :                         object->workstation_flags = test_var;
   22944             :                 } else {
   22945           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   22946             :                           PyLong_Type.tp_name);
   22947           0 :                         return -1;
   22948             :                 }
   22949             :         }
   22950           0 :         return 0;
   22951             : }
   22952             : 
   22953           0 : static PyObject *py_netr_DomainInformation_get_supported_enc_types(PyObject *obj, void *closure)
   22954             : {
   22955           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(obj);
   22956             :         PyObject *py_supported_enc_types;
   22957           0 :         py_supported_enc_types = PyLong_FromUnsignedLongLong((uint32_t)object->supported_enc_types);
   22958           0 :         return py_supported_enc_types;
   22959             : }
   22960             : 
   22961           0 : static int py_netr_DomainInformation_set_supported_enc_types(PyObject *py_obj, PyObject *value, void *closure)
   22962             : {
   22963           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(py_obj);
   22964           0 :         if (value == NULL) {
   22965           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->supported_enc_types");
   22966           0 :                 return -1;
   22967             :         }
   22968             :         {
   22969           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->supported_enc_types));
   22970           0 :                 if (PyLong_Check(value)) {
   22971             :                         unsigned long long test_var;
   22972           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22973           0 :                         if (PyErr_Occurred() != NULL) {
   22974           0 :                                 return -1;
   22975             :                         }
   22976           0 :                         if (test_var > uint_max) {
   22977           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   22978             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22979           0 :                                 return -1;
   22980             :                         }
   22981           0 :                         object->supported_enc_types = test_var;
   22982             :                 } else {
   22983           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   22984             :                           PyLong_Type.tp_name);
   22985           0 :                         return -1;
   22986             :                 }
   22987             :         }
   22988           0 :         return 0;
   22989             : }
   22990             : 
   22991           0 : static PyObject *py_netr_DomainInformation_get_dummy_long3(PyObject *obj, void *closure)
   22992             : {
   22993           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(obj);
   22994             :         PyObject *py_dummy_long3;
   22995           0 :         py_dummy_long3 = PyLong_FromUnsignedLongLong((uint32_t)object->dummy_long3);
   22996           0 :         return py_dummy_long3;
   22997             : }
   22998             : 
   22999           0 : static int py_netr_DomainInformation_set_dummy_long3(PyObject *py_obj, PyObject *value, void *closure)
   23000             : {
   23001           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(py_obj);
   23002           0 :         if (value == NULL) {
   23003           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_long3");
   23004           0 :                 return -1;
   23005             :         }
   23006             :         {
   23007           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long3));
   23008           0 :                 if (PyLong_Check(value)) {
   23009             :                         unsigned long long test_var;
   23010           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23011           0 :                         if (PyErr_Occurred() != NULL) {
   23012           0 :                                 return -1;
   23013             :                         }
   23014           0 :                         if (test_var > uint_max) {
   23015           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   23016             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23017           0 :                                 return -1;
   23018             :                         }
   23019           0 :                         object->dummy_long3 = test_var;
   23020             :                 } else {
   23021           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   23022             :                           PyLong_Type.tp_name);
   23023           0 :                         return -1;
   23024             :                 }
   23025             :         }
   23026           0 :         return 0;
   23027             : }
   23028             : 
   23029           0 : static PyObject *py_netr_DomainInformation_get_dummy_long4(PyObject *obj, void *closure)
   23030             : {
   23031           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(obj);
   23032             :         PyObject *py_dummy_long4;
   23033           0 :         py_dummy_long4 = PyLong_FromUnsignedLongLong((uint32_t)object->dummy_long4);
   23034           0 :         return py_dummy_long4;
   23035             : }
   23036             : 
   23037           0 : static int py_netr_DomainInformation_set_dummy_long4(PyObject *py_obj, PyObject *value, void *closure)
   23038             : {
   23039           0 :         struct netr_DomainInformation *object = (struct netr_DomainInformation *)pytalloc_get_ptr(py_obj);
   23040           0 :         if (value == NULL) {
   23041           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dummy_long4");
   23042           0 :                 return -1;
   23043             :         }
   23044             :         {
   23045           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dummy_long4));
   23046           0 :                 if (PyLong_Check(value)) {
   23047             :                         unsigned long long test_var;
   23048           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23049           0 :                         if (PyErr_Occurred() != NULL) {
   23050           0 :                                 return -1;
   23051             :                         }
   23052           0 :                         if (test_var > uint_max) {
   23053           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   23054             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23055           0 :                                 return -1;
   23056             :                         }
   23057           0 :                         object->dummy_long4 = test_var;
   23058             :                 } else {
   23059           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   23060             :                           PyLong_Type.tp_name);
   23061           0 :                         return -1;
   23062             :                 }
   23063             :         }
   23064           0 :         return 0;
   23065             : }
   23066             : 
   23067             : static PyGetSetDef py_netr_DomainInformation_getsetters[] = {
   23068             :         {
   23069             :                 .name = discard_const_p(char, "primary_domain"),
   23070             :                 .get = py_netr_DomainInformation_get_primary_domain,
   23071             :                 .set = py_netr_DomainInformation_set_primary_domain,
   23072             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_OneDomainInfo")
   23073             :         },
   23074             :         {
   23075             :                 .name = discard_const_p(char, "trusted_domain_count"),
   23076             :                 .get = py_netr_DomainInformation_get_trusted_domain_count,
   23077             :                 .set = py_netr_DomainInformation_set_trusted_domain_count,
   23078             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23079             :         },
   23080             :         {
   23081             :                 .name = discard_const_p(char, "trusted_domains"),
   23082             :                 .get = py_netr_DomainInformation_get_trusted_domains,
   23083             :                 .set = py_netr_DomainInformation_set_trusted_domains,
   23084             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_OneDomainInfo")
   23085             :         },
   23086             :         {
   23087             :                 .name = discard_const_p(char, "lsa_policy"),
   23088             :                 .get = py_netr_DomainInformation_get_lsa_policy,
   23089             :                 .set = py_netr_DomainInformation_set_lsa_policy,
   23090             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LsaPolicyInformation")
   23091             :         },
   23092             :         {
   23093             :                 .name = discard_const_p(char, "dns_hostname"),
   23094             :                 .get = py_netr_DomainInformation_get_dns_hostname,
   23095             :                 .set = py_netr_DomainInformation_set_dns_hostname,
   23096             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   23097             :         },
   23098             :         {
   23099             :                 .name = discard_const_p(char, "dummy_string2"),
   23100             :                 .get = py_netr_DomainInformation_get_dummy_string2,
   23101             :                 .set = py_netr_DomainInformation_set_dummy_string2,
   23102             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   23103             :         },
   23104             :         {
   23105             :                 .name = discard_const_p(char, "dummy_string3"),
   23106             :                 .get = py_netr_DomainInformation_get_dummy_string3,
   23107             :                 .set = py_netr_DomainInformation_set_dummy_string3,
   23108             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   23109             :         },
   23110             :         {
   23111             :                 .name = discard_const_p(char, "dummy_string4"),
   23112             :                 .get = py_netr_DomainInformation_get_dummy_string4,
   23113             :                 .set = py_netr_DomainInformation_set_dummy_string4,
   23114             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_StringLarge")
   23115             :         },
   23116             :         {
   23117             :                 .name = discard_const_p(char, "workstation_flags"),
   23118             :                 .get = py_netr_DomainInformation_get_workstation_flags,
   23119             :                 .set = py_netr_DomainInformation_set_workstation_flags,
   23120             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_WorkstationFlags")
   23121             :         },
   23122             :         {
   23123             :                 .name = discard_const_p(char, "supported_enc_types"),
   23124             :                 .get = py_netr_DomainInformation_get_supported_enc_types,
   23125             :                 .set = py_netr_DomainInformation_set_supported_enc_types,
   23126             :                 .doc = discard_const_p(char, "PIDL-generated element of base type kerb_EncTypes")
   23127             :         },
   23128             :         {
   23129             :                 .name = discard_const_p(char, "dummy_long3"),
   23130             :                 .get = py_netr_DomainInformation_get_dummy_long3,
   23131             :                 .set = py_netr_DomainInformation_set_dummy_long3,
   23132             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23133             :         },
   23134             :         {
   23135             :                 .name = discard_const_p(char, "dummy_long4"),
   23136             :                 .get = py_netr_DomainInformation_get_dummy_long4,
   23137             :                 .set = py_netr_DomainInformation_set_dummy_long4,
   23138             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23139             :         },
   23140             :         { .name = NULL }
   23141             : };
   23142             : 
   23143           0 : static PyObject *py_netr_DomainInformation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23144             : {
   23145           0 :         return pytalloc_new(struct netr_DomainInformation, type);
   23146             : }
   23147             : 
   23148             : 
   23149             : static PyTypeObject netr_DomainInformation_Type = {
   23150             :         PyVarObject_HEAD_INIT(NULL, 0)
   23151             :         .tp_name = "netlogon.netr_DomainInformation",
   23152             :         .tp_getset = py_netr_DomainInformation_getsetters,
   23153             :         .tp_methods = NULL,
   23154             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23155             :         .tp_new = py_netr_DomainInformation_new,
   23156             : };
   23157             : 
   23158          11 : static PyObject *py_import_netr_DomainInfo(TALLOC_CTX *mem_ctx, int level, union netr_DomainInfo *in)
   23159             : {
   23160             :         PyObject *ret;
   23161             : 
   23162          11 :         switch (level) {
   23163           0 :                 case 1:
   23164           0 :                         if (in->domain_info == NULL) {
   23165           0 :                                 ret = Py_None;
   23166           0 :                                 Py_INCREF(ret);
   23167             :                         } else {
   23168           0 :                                 ret = pytalloc_reference_ex(&netr_DomainInformation_Type, in->domain_info, in->domain_info);
   23169             :                         }
   23170           0 :                         return ret;
   23171             : 
   23172          11 :                 case 2:
   23173          11 :                         if (in->lsa_policy_info == NULL) {
   23174           0 :                                 ret = Py_None;
   23175           0 :                                 Py_INCREF(ret);
   23176             :                         } else {
   23177          11 :                                 ret = pytalloc_reference_ex(&netr_LsaPolicyInformation_Type, in->lsa_policy_info, in->lsa_policy_info);
   23178             :                         }
   23179          11 :                         return ret;
   23180             : 
   23181             :         }
   23182           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   23183           0 :         return NULL;
   23184             : }
   23185             : 
   23186           0 : static union netr_DomainInfo *py_export_netr_DomainInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   23187             : {
   23188           0 :         union netr_DomainInfo *ret = talloc_zero(mem_ctx, union netr_DomainInfo);
   23189           0 :         switch (level) {
   23190           0 :                 case 1:
   23191           0 :                         if (in == NULL) {
   23192           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->domain_info");
   23193           0 :                                 talloc_free(ret); return NULL;
   23194             :                         }
   23195           0 :                         if (in == Py_None) {
   23196           0 :                                 ret->domain_info = NULL;
   23197             :                         } else {
   23198           0 :                                 ret->domain_info = NULL;
   23199           0 :                                 PY_CHECK_TYPE(&netr_DomainInformation_Type, in, talloc_free(ret); return NULL;);
   23200           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   23201           0 :                                         PyErr_NoMemory();
   23202           0 :                                         talloc_free(ret); return NULL;
   23203             :                                 }
   23204           0 :                                 ret->domain_info = (struct netr_DomainInformation *)pytalloc_get_ptr(in);
   23205             :                         }
   23206           0 :                         break;
   23207             : 
   23208           0 :                 case 2:
   23209           0 :                         if (in == NULL) {
   23210           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->lsa_policy_info");
   23211           0 :                                 talloc_free(ret); return NULL;
   23212             :                         }
   23213           0 :                         if (in == Py_None) {
   23214           0 :                                 ret->lsa_policy_info = NULL;
   23215             :                         } else {
   23216           0 :                                 ret->lsa_policy_info = NULL;
   23217           0 :                                 PY_CHECK_TYPE(&netr_LsaPolicyInformation_Type, in, talloc_free(ret); return NULL;);
   23218           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   23219           0 :                                         PyErr_NoMemory();
   23220           0 :                                         talloc_free(ret); return NULL;
   23221             :                                 }
   23222           0 :                                 ret->lsa_policy_info = (struct netr_LsaPolicyInformation *)pytalloc_get_ptr(in);
   23223             :                         }
   23224           0 :                         break;
   23225             : 
   23226           0 :                 default:
   23227           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   23228           0 :                         talloc_free(ret);
   23229           0 :                         ret = NULL;
   23230             :         }
   23231             : 
   23232           0 :         return ret;
   23233             : }
   23234             : 
   23235          11 : static PyObject *py_netr_DomainInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23236             : {
   23237          11 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   23238          11 :         PyObject *mem_ctx_obj = NULL;
   23239          11 :         TALLOC_CTX *mem_ctx = NULL;
   23240          11 :         int level = 0;
   23241          11 :         PyObject *in_obj = NULL;
   23242          11 :         union netr_DomainInfo *in = NULL;
   23243             : 
   23244          11 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   23245             :                 discard_const_p(char *, kwnames),
   23246             :                 &mem_ctx_obj,
   23247             :                 &level,
   23248             :                 &in_obj)) {
   23249           0 :                 return NULL;
   23250             :         }
   23251          11 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   23252          11 :         if (mem_ctx == NULL) {
   23253           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   23254           0 :                 return NULL;
   23255             :         }
   23256          11 :         in = (union netr_DomainInfo *)pytalloc_get_ptr(in_obj);
   23257          11 :         if (in == NULL) {
   23258           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_DomainInfo!");
   23259           0 :                 return NULL;
   23260             :         }
   23261             : 
   23262          11 :         return py_import_netr_DomainInfo(mem_ctx, level, in);
   23263             : }
   23264             : 
   23265           0 : static PyObject *py_netr_DomainInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23266             : {
   23267           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   23268           0 :         PyObject *mem_ctx_obj = NULL;
   23269           0 :         TALLOC_CTX *mem_ctx = NULL;
   23270           0 :         int level = 0;
   23271           0 :         PyObject *in = NULL;
   23272           0 :         union netr_DomainInfo *out = NULL;
   23273             : 
   23274           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   23275             :                 discard_const_p(char *, kwnames),
   23276             :                 &mem_ctx_obj,
   23277             :                 &level,
   23278             :                 &in)) {
   23279           0 :                 return NULL;
   23280             :         }
   23281           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   23282           0 :         if (mem_ctx == NULL) {
   23283           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   23284           0 :                 return NULL;
   23285             :         }
   23286             : 
   23287           0 :         out = py_export_netr_DomainInfo(mem_ctx, level, in);
   23288           0 :         if (out == NULL) {
   23289           0 :                 return NULL;
   23290             :         }
   23291             : 
   23292           0 :         return pytalloc_GenericObject_reference(out);
   23293             : }
   23294             : 
   23295             : static PyMethodDef py_netr_DomainInfo_methods[] = {
   23296             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DomainInfo_import),
   23297             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   23298             :                 "T.__import__(mem_ctx, level, in) => ret." },
   23299             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DomainInfo_export),
   23300             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   23301             :                 "T.__export__(mem_ctx, level, in) => ret." },
   23302             :         { NULL, NULL, 0, NULL }
   23303             : };
   23304             : 
   23305           0 : static PyObject *py_netr_DomainInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23306             : {
   23307           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   23308           0 :         return NULL;
   23309             : }
   23310             : 
   23311             : 
   23312             : static PyTypeObject netr_DomainInfo_Type = {
   23313             :         PyVarObject_HEAD_INIT(NULL, 0)
   23314             :         .tp_name = "netlogon.netr_DomainInfo",
   23315             :         .tp_getset = NULL,
   23316             :         .tp_methods = py_netr_DomainInfo_methods,
   23317             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23318             :         .tp_new = py_netr_DomainInfo_new,
   23319             : };
   23320             : 
   23321             : 
   23322           0 : static PyObject *py_NL_PASSWORD_VERSION_get_ReservedField(PyObject *obj, void *closure)
   23323             : {
   23324           0 :         struct NL_PASSWORD_VERSION *object = (struct NL_PASSWORD_VERSION *)pytalloc_get_ptr(obj);
   23325             :         PyObject *py_ReservedField;
   23326           0 :         py_ReservedField = PyLong_FromUnsignedLongLong((uint32_t)object->ReservedField);
   23327           0 :         return py_ReservedField;
   23328             : }
   23329             : 
   23330           0 : static int py_NL_PASSWORD_VERSION_set_ReservedField(PyObject *py_obj, PyObject *value, void *closure)
   23331             : {
   23332           0 :         struct NL_PASSWORD_VERSION *object = (struct NL_PASSWORD_VERSION *)pytalloc_get_ptr(py_obj);
   23333           0 :         if (value == NULL) {
   23334           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ReservedField");
   23335           0 :                 return -1;
   23336             :         }
   23337             :         {
   23338           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ReservedField));
   23339           0 :                 if (PyLong_Check(value)) {
   23340             :                         unsigned long long test_var;
   23341           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23342           0 :                         if (PyErr_Occurred() != NULL) {
   23343           0 :                                 return -1;
   23344             :                         }
   23345           0 :                         if (test_var > uint_max) {
   23346           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   23347             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23348           0 :                                 return -1;
   23349             :                         }
   23350           0 :                         object->ReservedField = test_var;
   23351             :                 } else {
   23352           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   23353             :                           PyLong_Type.tp_name);
   23354           0 :                         return -1;
   23355             :                 }
   23356             :         }
   23357           0 :         return 0;
   23358             : }
   23359             : 
   23360           0 : static PyObject *py_NL_PASSWORD_VERSION_get_PasswordVersionNumber(PyObject *obj, void *closure)
   23361             : {
   23362           0 :         struct NL_PASSWORD_VERSION *object = (struct NL_PASSWORD_VERSION *)pytalloc_get_ptr(obj);
   23363             :         PyObject *py_PasswordVersionNumber;
   23364           0 :         py_PasswordVersionNumber = PyLong_FromUnsignedLongLong((uint32_t)object->PasswordVersionNumber);
   23365           0 :         return py_PasswordVersionNumber;
   23366             : }
   23367             : 
   23368           0 : static int py_NL_PASSWORD_VERSION_set_PasswordVersionNumber(PyObject *py_obj, PyObject *value, void *closure)
   23369             : {
   23370           0 :         struct NL_PASSWORD_VERSION *object = (struct NL_PASSWORD_VERSION *)pytalloc_get_ptr(py_obj);
   23371           0 :         if (value == NULL) {
   23372           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->PasswordVersionNumber");
   23373           0 :                 return -1;
   23374             :         }
   23375             :         {
   23376           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->PasswordVersionNumber));
   23377           0 :                 if (PyLong_Check(value)) {
   23378             :                         unsigned long long test_var;
   23379           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23380           0 :                         if (PyErr_Occurred() != NULL) {
   23381           0 :                                 return -1;
   23382             :                         }
   23383           0 :                         if (test_var > uint_max) {
   23384           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   23385             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23386           0 :                                 return -1;
   23387             :                         }
   23388           0 :                         object->PasswordVersionNumber = test_var;
   23389             :                 } else {
   23390           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   23391             :                           PyLong_Type.tp_name);
   23392           0 :                         return -1;
   23393             :                 }
   23394             :         }
   23395           0 :         return 0;
   23396             : }
   23397             : 
   23398           0 : static PyObject *py_NL_PASSWORD_VERSION_get_PasswordVersionPresent(PyObject *obj, void *closure)
   23399             : {
   23400           0 :         struct NL_PASSWORD_VERSION *object = (struct NL_PASSWORD_VERSION *)pytalloc_get_ptr(obj);
   23401             :         PyObject *py_PasswordVersionPresent;
   23402           0 :         py_PasswordVersionPresent = PyLong_FromUnsignedLongLong((uint32_t)object->PasswordVersionPresent);
   23403           0 :         return py_PasswordVersionPresent;
   23404             : }
   23405             : 
   23406           0 : static int py_NL_PASSWORD_VERSION_set_PasswordVersionPresent(PyObject *py_obj, PyObject *value, void *closure)
   23407             : {
   23408           0 :         struct NL_PASSWORD_VERSION *object = (struct NL_PASSWORD_VERSION *)pytalloc_get_ptr(py_obj);
   23409           0 :         if (value == NULL) {
   23410           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->PasswordVersionPresent");
   23411           0 :                 return -1;
   23412             :         }
   23413             :         {
   23414           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->PasswordVersionPresent));
   23415           0 :                 if (PyLong_Check(value)) {
   23416             :                         unsigned long long test_var;
   23417           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23418           0 :                         if (PyErr_Occurred() != NULL) {
   23419           0 :                                 return -1;
   23420             :                         }
   23421           0 :                         if (test_var > uint_max) {
   23422           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   23423             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23424           0 :                                 return -1;
   23425             :                         }
   23426           0 :                         object->PasswordVersionPresent = test_var;
   23427             :                 } else {
   23428           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   23429             :                           PyLong_Type.tp_name);
   23430           0 :                         return -1;
   23431             :                 }
   23432             :         }
   23433           0 :         return 0;
   23434             : }
   23435             : 
   23436             : static PyGetSetDef py_NL_PASSWORD_VERSION_getsetters[] = {
   23437             :         {
   23438             :                 .name = discard_const_p(char, "ReservedField"),
   23439             :                 .get = py_NL_PASSWORD_VERSION_get_ReservedField,
   23440             :                 .set = py_NL_PASSWORD_VERSION_set_ReservedField,
   23441             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23442             :         },
   23443             :         {
   23444             :                 .name = discard_const_p(char, "PasswordVersionNumber"),
   23445             :                 .get = py_NL_PASSWORD_VERSION_get_PasswordVersionNumber,
   23446             :                 .set = py_NL_PASSWORD_VERSION_set_PasswordVersionNumber,
   23447             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23448             :         },
   23449             :         {
   23450             :                 .name = discard_const_p(char, "PasswordVersionPresent"),
   23451             :                 .get = py_NL_PASSWORD_VERSION_get_PasswordVersionPresent,
   23452             :                 .set = py_NL_PASSWORD_VERSION_set_PasswordVersionPresent,
   23453             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23454             :         },
   23455             :         { .name = NULL }
   23456             : };
   23457             : 
   23458           0 : static PyObject *py_NL_PASSWORD_VERSION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23459             : {
   23460           0 :         return pytalloc_new(struct NL_PASSWORD_VERSION, type);
   23461             : }
   23462             : 
   23463             : 
   23464             : static PyTypeObject NL_PASSWORD_VERSION_Type = {
   23465             :         PyVarObject_HEAD_INIT(NULL, 0)
   23466             :         .tp_name = "netlogon.NL_PASSWORD_VERSION",
   23467             :         .tp_getset = py_NL_PASSWORD_VERSION_getsetters,
   23468             :         .tp_methods = NULL,
   23469             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23470             :         .tp_new = py_NL_PASSWORD_VERSION_new,
   23471             : };
   23472             : 
   23473             : 
   23474           0 : static PyObject *py_netr_CryptPassword_get_data(PyObject *obj, void *closure)
   23475             : {
   23476           0 :         struct netr_CryptPassword *object = (struct netr_CryptPassword *)pytalloc_get_ptr(obj);
   23477             :         PyObject *py_data;
   23478           0 :         py_data = PyList_New(512);
   23479           0 :         if (py_data == NULL) {
   23480           0 :                 return NULL;
   23481             :         }
   23482             :         {
   23483             :                 int data_cntr_0;
   23484           0 :                 for (data_cntr_0 = 0; data_cntr_0 < (512); data_cntr_0++) {
   23485             :                         PyObject *py_data_0;
   23486           0 :                         py_data_0 = PyLong_FromLong((uint16_t)object->data[data_cntr_0]);
   23487           0 :                         PyList_SetItem(py_data, data_cntr_0, py_data_0);
   23488             :                 }
   23489             :         }
   23490           0 :         return py_data;
   23491             : }
   23492             : 
   23493           4 : static int py_netr_CryptPassword_set_data(PyObject *py_obj, PyObject *value, void *closure)
   23494             : {
   23495           4 :         struct netr_CryptPassword *object = (struct netr_CryptPassword *)pytalloc_get_ptr(py_obj);
   23496           4 :         if (value == NULL) {
   23497           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data");
   23498           0 :                 return -1;
   23499             :         }
   23500           4 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   23501             :         {
   23502             :                 int data_cntr_0;
   23503           4 :                 if (ARRAY_SIZE(object->data) != PyList_GET_SIZE(value)) {
   23504           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));
   23505           0 :                         return -1;
   23506             :                 }
   23507        2052 :                 for (data_cntr_0 = 0; data_cntr_0 < PyList_GET_SIZE(value); data_cntr_0++) {
   23508        2048 :                         if (PyList_GET_ITEM(value, data_cntr_0) == NULL) {
   23509           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data[data_cntr_0]");
   23510           0 :                                 return -1;
   23511             :                         }
   23512             :                         {
   23513        2048 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->data[data_cntr_0]));
   23514        2048 :                                 if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_0))) {
   23515             :                                         unsigned long long test_var;
   23516        2048 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_0));
   23517        2048 :                                         if (PyErr_Occurred() != NULL) {
   23518           0 :                                                 return -1;
   23519             :                                         }
   23520        2048 :                                         if (test_var > uint_max) {
   23521           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   23522             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   23523           0 :                                                 return -1;
   23524             :                                         }
   23525        2048 :                                         object->data[data_cntr_0] = test_var;
   23526             :                                 } else {
   23527           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   23528             :                                           PyLong_Type.tp_name);
   23529           0 :                                         return -1;
   23530             :                                 }
   23531             :                         }
   23532             :                 }
   23533             :         }
   23534           4 :         return 0;
   23535             : }
   23536             : 
   23537           0 : static PyObject *py_netr_CryptPassword_get_length(PyObject *obj, void *closure)
   23538             : {
   23539           0 :         struct netr_CryptPassword *object = (struct netr_CryptPassword *)pytalloc_get_ptr(obj);
   23540             :         PyObject *py_length;
   23541           0 :         py_length = PyLong_FromUnsignedLongLong((uint32_t)object->length);
   23542           0 :         return py_length;
   23543             : }
   23544             : 
   23545           4 : static int py_netr_CryptPassword_set_length(PyObject *py_obj, PyObject *value, void *closure)
   23546             : {
   23547           4 :         struct netr_CryptPassword *object = (struct netr_CryptPassword *)pytalloc_get_ptr(py_obj);
   23548           4 :         if (value == NULL) {
   23549           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
   23550           0 :                 return -1;
   23551             :         }
   23552             :         {
   23553           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
   23554           4 :                 if (PyLong_Check(value)) {
   23555             :                         unsigned long long test_var;
   23556           4 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23557           4 :                         if (PyErr_Occurred() != NULL) {
   23558           0 :                                 return -1;
   23559             :                         }
   23560           4 :                         if (test_var > uint_max) {
   23561           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   23562             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23563           0 :                                 return -1;
   23564             :                         }
   23565           4 :                         object->length = test_var;
   23566             :                 } else {
   23567           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   23568             :                           PyLong_Type.tp_name);
   23569           0 :                         return -1;
   23570             :                 }
   23571             :         }
   23572           4 :         return 0;
   23573             : }
   23574             : 
   23575             : static PyGetSetDef py_netr_CryptPassword_getsetters[] = {
   23576             :         {
   23577             :                 .name = discard_const_p(char, "data"),
   23578             :                 .get = py_netr_CryptPassword_get_data,
   23579             :                 .set = py_netr_CryptPassword_set_data,
   23580             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   23581             :         },
   23582             :         {
   23583             :                 .name = discard_const_p(char, "length"),
   23584             :                 .get = py_netr_CryptPassword_get_length,
   23585             :                 .set = py_netr_CryptPassword_set_length,
   23586             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23587             :         },
   23588             :         { .name = NULL }
   23589             : };
   23590             : 
   23591           4 : static PyObject *py_netr_CryptPassword_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23592             : {
   23593           4 :         return pytalloc_new(struct netr_CryptPassword, type);
   23594             : }
   23595             : 
   23596             : 
   23597             : static PyTypeObject netr_CryptPassword_Type = {
   23598             :         PyVarObject_HEAD_INIT(NULL, 0)
   23599             :         .tp_name = "netlogon.netr_CryptPassword",
   23600             :         .tp_getset = py_netr_CryptPassword_getsetters,
   23601             :         .tp_methods = NULL,
   23602             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23603             :         .tp_new = py_netr_CryptPassword_new,
   23604             : };
   23605             : 
   23606             : 
   23607           0 : static PyObject *py_netr_SendToSamResetBadPasswordCount_get_guid(PyObject *obj, void *closure)
   23608             : {
   23609           0 :         struct netr_SendToSamResetBadPasswordCount *object = (struct netr_SendToSamResetBadPasswordCount *)pytalloc_get_ptr(obj);
   23610             :         PyObject *py_guid;
   23611           0 :         py_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->guid);
   23612           0 :         return py_guid;
   23613             : }
   23614             : 
   23615           0 : static int py_netr_SendToSamResetBadPasswordCount_set_guid(PyObject *py_obj, PyObject *value, void *closure)
   23616             : {
   23617           0 :         struct netr_SendToSamResetBadPasswordCount *object = (struct netr_SendToSamResetBadPasswordCount *)pytalloc_get_ptr(py_obj);
   23618           0 :         if (value == NULL) {
   23619           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->guid");
   23620           0 :                 return -1;
   23621             :         }
   23622           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   23623           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   23624           0 :                 PyErr_NoMemory();
   23625           0 :                 return -1;
   23626             :         }
   23627           0 :         object->guid = *(struct GUID *)pytalloc_get_ptr(value);
   23628           0 :         return 0;
   23629             : }
   23630             : 
   23631             : static PyGetSetDef py_netr_SendToSamResetBadPasswordCount_getsetters[] = {
   23632             :         {
   23633             :                 .name = discard_const_p(char, "guid"),
   23634             :                 .get = py_netr_SendToSamResetBadPasswordCount_get_guid,
   23635             :                 .set = py_netr_SendToSamResetBadPasswordCount_set_guid,
   23636             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   23637             :         },
   23638             :         { .name = NULL }
   23639             : };
   23640             : 
   23641           0 : static PyObject *py_netr_SendToSamResetBadPasswordCount_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23642             : {
   23643           0 :         return pytalloc_new(struct netr_SendToSamResetBadPasswordCount, type);
   23644             : }
   23645             : 
   23646             : 
   23647             : static PyTypeObject netr_SendToSamResetBadPasswordCount_Type = {
   23648             :         PyVarObject_HEAD_INIT(NULL, 0)
   23649             :         .tp_name = "netlogon.netr_SendToSamResetBadPasswordCount",
   23650             :         .tp_getset = py_netr_SendToSamResetBadPasswordCount_getsetters,
   23651             :         .tp_methods = NULL,
   23652             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23653             :         .tp_new = py_netr_SendToSamResetBadPasswordCount_new,
   23654             : };
   23655             : 
   23656           0 : static PyObject *py_import_netr_SendToSamMessage(TALLOC_CTX *mem_ctx, int level, union netr_SendToSamMessage *in)
   23657             : {
   23658             :         PyObject *ret;
   23659             : 
   23660           0 :         switch (level) {
   23661           0 :                 case SendToSamResetBadPasswordCount:
   23662           0 :                         ret = pytalloc_reference_ex(&netr_SendToSamResetBadPasswordCount_Type, mem_ctx, &in->reset_bad_password);
   23663           0 :                         return ret;
   23664             : 
   23665           0 :                 default:
   23666           0 :                         ret = Py_None;
   23667           0 :                         Py_INCREF(ret);
   23668           0 :                         return ret;
   23669             : 
   23670             :         }
   23671             :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   23672             :         return NULL;
   23673             : }
   23674             : 
   23675           0 : static union netr_SendToSamMessage *py_export_netr_SendToSamMessage(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   23676             : {
   23677           0 :         union netr_SendToSamMessage *ret = talloc_zero(mem_ctx, union netr_SendToSamMessage);
   23678           0 :         switch (level) {
   23679           0 :                 case SendToSamResetBadPasswordCount:
   23680           0 :                         if (in == NULL) {
   23681           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->reset_bad_password");
   23682           0 :                                 talloc_free(ret); return NULL;
   23683             :                         }
   23684           0 :                         PY_CHECK_TYPE(&netr_SendToSamResetBadPasswordCount_Type, in, talloc_free(ret); return NULL;);
   23685           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   23686           0 :                                 PyErr_NoMemory();
   23687           0 :                                 talloc_free(ret); return NULL;
   23688             :                         }
   23689           0 :                         ret->reset_bad_password = *(struct netr_SendToSamResetBadPasswordCount *)pytalloc_get_ptr(in);
   23690           0 :                         break;
   23691             : 
   23692           0 :                 default:
   23693           0 :                         break;
   23694             : 
   23695             :         }
   23696             : 
   23697           0 :         return ret;
   23698             : }
   23699             : 
   23700           0 : static PyObject *py_netr_SendToSamMessage_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23701             : {
   23702           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   23703           0 :         PyObject *mem_ctx_obj = NULL;
   23704           0 :         TALLOC_CTX *mem_ctx = NULL;
   23705           0 :         int level = 0;
   23706           0 :         PyObject *in_obj = NULL;
   23707           0 :         union netr_SendToSamMessage *in = NULL;
   23708             : 
   23709           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   23710             :                 discard_const_p(char *, kwnames),
   23711             :                 &mem_ctx_obj,
   23712             :                 &level,
   23713             :                 &in_obj)) {
   23714           0 :                 return NULL;
   23715             :         }
   23716           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   23717           0 :         if (mem_ctx == NULL) {
   23718           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   23719           0 :                 return NULL;
   23720             :         }
   23721           0 :         in = (union netr_SendToSamMessage *)pytalloc_get_ptr(in_obj);
   23722           0 :         if (in == NULL) {
   23723           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union netr_SendToSamMessage!");
   23724           0 :                 return NULL;
   23725             :         }
   23726             : 
   23727           0 :         return py_import_netr_SendToSamMessage(mem_ctx, level, in);
   23728             : }
   23729             : 
   23730           0 : static PyObject *py_netr_SendToSamMessage_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23731             : {
   23732           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   23733           0 :         PyObject *mem_ctx_obj = NULL;
   23734           0 :         TALLOC_CTX *mem_ctx = NULL;
   23735           0 :         int level = 0;
   23736           0 :         PyObject *in = NULL;
   23737           0 :         union netr_SendToSamMessage *out = NULL;
   23738             : 
   23739           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   23740             :                 discard_const_p(char *, kwnames),
   23741             :                 &mem_ctx_obj,
   23742             :                 &level,
   23743             :                 &in)) {
   23744           0 :                 return NULL;
   23745             :         }
   23746           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   23747           0 :         if (mem_ctx == NULL) {
   23748           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   23749           0 :                 return NULL;
   23750             :         }
   23751             : 
   23752           0 :         out = py_export_netr_SendToSamMessage(mem_ctx, level, in);
   23753           0 :         if (out == NULL) {
   23754           0 :                 return NULL;
   23755             :         }
   23756             : 
   23757           0 :         return pytalloc_GenericObject_reference(out);
   23758             : }
   23759             : 
   23760             : static PyMethodDef py_netr_SendToSamMessage_methods[] = {
   23761             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_SendToSamMessage_import),
   23762             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   23763             :                 "T.__import__(mem_ctx, level, in) => ret." },
   23764             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_SendToSamMessage_export),
   23765             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   23766             :                 "T.__export__(mem_ctx, level, in) => ret." },
   23767             :         { NULL, NULL, 0, NULL }
   23768             : };
   23769             : 
   23770           0 : static PyObject *py_netr_SendToSamMessage_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23771             : {
   23772           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   23773           0 :         return NULL;
   23774             : }
   23775             : 
   23776             : 
   23777             : static PyTypeObject netr_SendToSamMessage_Type = {
   23778             :         PyVarObject_HEAD_INIT(NULL, 0)
   23779             :         .tp_name = "netlogon.netr_SendToSamMessage",
   23780             :         .tp_getset = NULL,
   23781             :         .tp_methods = py_netr_SendToSamMessage_methods,
   23782             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23783             :         .tp_new = py_netr_SendToSamMessage_new,
   23784             : };
   23785             : 
   23786             : 
   23787           0 : static PyObject *py_netr_SendToSamBase_get_message_type(PyObject *obj, void *closure)
   23788             : {
   23789           0 :         struct netr_SendToSamBase *object = (struct netr_SendToSamBase *)pytalloc_get_ptr(obj);
   23790             :         PyObject *py_message_type;
   23791           0 :         py_message_type = PyLong_FromLong((uint16_t)object->message_type);
   23792           0 :         return py_message_type;
   23793             : }
   23794             : 
   23795           0 : static int py_netr_SendToSamBase_set_message_type(PyObject *py_obj, PyObject *value, void *closure)
   23796             : {
   23797           0 :         struct netr_SendToSamBase *object = (struct netr_SendToSamBase *)pytalloc_get_ptr(py_obj);
   23798           0 :         if (value == NULL) {
   23799           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->message_type");
   23800           0 :                 return -1;
   23801             :         }
   23802             :         {
   23803           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->message_type));
   23804           0 :                 if (PyLong_Check(value)) {
   23805             :                         unsigned long long test_var;
   23806           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23807           0 :                         if (PyErr_Occurred() != NULL) {
   23808           0 :                                 return -1;
   23809             :                         }
   23810           0 :                         if (test_var > uint_max) {
   23811           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   23812             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23813           0 :                                 return -1;
   23814             :                         }
   23815           0 :                         object->message_type = test_var;
   23816             :                 } else {
   23817           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   23818             :                           PyLong_Type.tp_name);
   23819           0 :                         return -1;
   23820             :                 }
   23821             :         }
   23822           0 :         return 0;
   23823             : }
   23824             : 
   23825           0 : static PyObject *py_netr_SendToSamBase_get_message_size(PyObject *obj, void *closure)
   23826             : {
   23827           0 :         struct netr_SendToSamBase *object = (struct netr_SendToSamBase *)pytalloc_get_ptr(obj);
   23828             :         PyObject *py_message_size;
   23829           0 :         py_message_size = PyLong_FromUnsignedLongLong((uint32_t)object->message_size);
   23830           0 :         return py_message_size;
   23831             : }
   23832             : 
   23833           0 : static int py_netr_SendToSamBase_set_message_size(PyObject *py_obj, PyObject *value, void *closure)
   23834             : {
   23835           0 :         struct netr_SendToSamBase *object = (struct netr_SendToSamBase *)pytalloc_get_ptr(py_obj);
   23836           0 :         if (value == NULL) {
   23837           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->message_size");
   23838           0 :                 return -1;
   23839             :         }
   23840             :         {
   23841           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->message_size));
   23842           0 :                 if (PyLong_Check(value)) {
   23843             :                         unsigned long long test_var;
   23844           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23845           0 :                         if (PyErr_Occurred() != NULL) {
   23846           0 :                                 return -1;
   23847             :                         }
   23848           0 :                         if (test_var > uint_max) {
   23849           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   23850             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23851           0 :                                 return -1;
   23852             :                         }
   23853           0 :                         object->message_size = test_var;
   23854             :                 } else {
   23855           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   23856             :                           PyLong_Type.tp_name);
   23857           0 :                         return -1;
   23858             :                 }
   23859             :         }
   23860           0 :         return 0;
   23861             : }
   23862             : 
   23863           0 : static PyObject *py_netr_SendToSamBase_get_message(PyObject *obj, void *closure)
   23864             : {
   23865           0 :         struct netr_SendToSamBase *object = (struct netr_SendToSamBase *)pytalloc_get_ptr(obj);
   23866             :         PyObject *py_message;
   23867           0 :         py_message = pyrpc_import_union(&netr_SendToSamMessage_Type, pytalloc_get_mem_ctx(obj), object->message_type, &object->message, "union netr_SendToSamMessage");
   23868           0 :         if (py_message == NULL) {
   23869           0 :                 return NULL;
   23870             :         }
   23871           0 :         return py_message;
   23872             : }
   23873             : 
   23874           0 : static int py_netr_SendToSamBase_set_message(PyObject *py_obj, PyObject *value, void *closure)
   23875             : {
   23876           0 :         struct netr_SendToSamBase *object = (struct netr_SendToSamBase *)pytalloc_get_ptr(py_obj);
   23877           0 :         if (value == NULL) {
   23878           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->message");
   23879           0 :                 return -1;
   23880             :         }
   23881             :         {
   23882             :                 union netr_SendToSamMessage *message_switch_1;
   23883           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");
   23884           0 :                 if (message_switch_1 == NULL) {
   23885           0 :                         return -1;
   23886             :                 }
   23887           0 :                 object->message = *message_switch_1;
   23888             :         }
   23889           0 :         return 0;
   23890             : }
   23891             : 
   23892             : static PyGetSetDef py_netr_SendToSamBase_getsetters[] = {
   23893             :         {
   23894             :                 .name = discard_const_p(char, "message_type"),
   23895             :                 .get = py_netr_SendToSamBase_get_message_type,
   23896             :                 .set = py_netr_SendToSamBase_set_message_type,
   23897             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SendToSamType")
   23898             :         },
   23899             :         {
   23900             :                 .name = discard_const_p(char, "message_size"),
   23901             :                 .get = py_netr_SendToSamBase_get_message_size,
   23902             :                 .set = py_netr_SendToSamBase_set_message_size,
   23903             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23904             :         },
   23905             :         {
   23906             :                 .name = discard_const_p(char, "message"),
   23907             :                 .get = py_netr_SendToSamBase_get_message,
   23908             :                 .set = py_netr_SendToSamBase_set_message,
   23909             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SendToSamMessage")
   23910             :         },
   23911             :         { .name = NULL }
   23912             : };
   23913             : 
   23914           0 : static PyObject *py_netr_SendToSamBase_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23915             : {
   23916           0 :         return pytalloc_new(struct netr_SendToSamBase, type);
   23917             : }
   23918             : 
   23919           0 : static PyObject *py_netr_SendToSamBase_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   23920             : {
   23921           0 :         struct netr_SendToSamBase *object = (struct netr_SendToSamBase *)pytalloc_get_ptr(py_obj);
   23922           0 :         PyObject *ret = NULL;
   23923             :         DATA_BLOB blob;
   23924             :         enum ndr_err_code err;
   23925           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   23926           0 :         if (tmp_ctx == NULL) {
   23927           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   23928           0 :                 return NULL;
   23929             :         }
   23930           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_netr_SendToSamBase);
   23931           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   23932           0 :                 TALLOC_FREE(tmp_ctx);
   23933           0 :                 PyErr_SetNdrError(err);
   23934           0 :                 return NULL;
   23935             :         }
   23936             : 
   23937           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   23938           0 :         TALLOC_FREE(tmp_ctx);
   23939           0 :         return ret;
   23940             : }
   23941             : 
   23942           0 : static PyObject *py_netr_SendToSamBase_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   23943             : {
   23944           0 :         struct netr_SendToSamBase *object = (struct netr_SendToSamBase *)pytalloc_get_ptr(py_obj);
   23945           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   23946           0 :         Py_ssize_t blob_length = 0;
   23947             :         enum ndr_err_code err;
   23948           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   23949           0 :         PyObject *allow_remaining_obj = NULL;
   23950           0 :         bool allow_remaining = false;
   23951             : 
   23952           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   23953             :                 discard_const_p(char *, kwnames),
   23954             :                 &blob.data, &blob_length,
   23955             :                 &allow_remaining_obj)) {
   23956           0 :                 return NULL;
   23957             :         }
   23958           0 :         blob.length = blob_length;
   23959             : 
   23960           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   23961           0 :                 allow_remaining = true;
   23962             :         }
   23963             : 
   23964           0 :         if (allow_remaining) {
   23965           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SendToSamBase);
   23966             :         } else {
   23967           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_netr_SendToSamBase);
   23968             :         }
   23969           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   23970           0 :                 PyErr_SetNdrError(err);
   23971           0 :                 return NULL;
   23972             :         }
   23973             : 
   23974           0 :         Py_RETURN_NONE;
   23975             : }
   23976             : 
   23977           0 : static PyObject *py_netr_SendToSamBase_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   23978             : {
   23979           0 :         struct netr_SendToSamBase *object = (struct netr_SendToSamBase *)pytalloc_get_ptr(py_obj);
   23980             :         PyObject *ret;
   23981             :         char *retstr;
   23982             : 
   23983           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_netr_SendToSamBase, "netr_SendToSamBase", object);
   23984           0 :         ret = PyUnicode_FromString(retstr);
   23985           0 :         talloc_free(retstr);
   23986             : 
   23987           0 :         return ret;
   23988             : }
   23989             : 
   23990             : static PyMethodDef py_netr_SendToSamBase_methods[] = {
   23991             :         { "__ndr_pack__", (PyCFunction)py_netr_SendToSamBase_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   23992             :         { "__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" },
   23993             :         { "__ndr_print__", (PyCFunction)py_netr_SendToSamBase_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   23994             :         { NULL, NULL, 0, NULL }
   23995             : };
   23996             : 
   23997             : 
   23998             : static PyTypeObject netr_SendToSamBase_Type = {
   23999             :         PyVarObject_HEAD_INIT(NULL, 0)
   24000             :         .tp_name = "netlogon.netr_SendToSamBase",
   24001             :         .tp_getset = py_netr_SendToSamBase_getsetters,
   24002             :         .tp_methods = py_netr_SendToSamBase_methods,
   24003             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   24004             :         .tp_new = py_netr_SendToSamBase_new,
   24005             : };
   24006             : 
   24007             : 
   24008           0 : static PyObject *py_netr_DsRAddressToSitenamesWCtr_get_count(PyObject *obj, void *closure)
   24009             : {
   24010           0 :         struct netr_DsRAddressToSitenamesWCtr *object = (struct netr_DsRAddressToSitenamesWCtr *)pytalloc_get_ptr(obj);
   24011             :         PyObject *py_count;
   24012           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
   24013           0 :         return py_count;
   24014             : }
   24015             : 
   24016           0 : static int py_netr_DsRAddressToSitenamesWCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
   24017             : {
   24018           0 :         struct netr_DsRAddressToSitenamesWCtr *object = (struct netr_DsRAddressToSitenamesWCtr *)pytalloc_get_ptr(py_obj);
   24019           0 :         if (value == NULL) {
   24020           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   24021           0 :                 return -1;
   24022             :         }
   24023             :         {
   24024           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   24025           0 :                 if (PyLong_Check(value)) {
   24026             :                         unsigned long long test_var;
   24027           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24028           0 :                         if (PyErr_Occurred() != NULL) {
   24029           0 :                                 return -1;
   24030             :                         }
   24031           0 :                         if (test_var > uint_max) {
   24032           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   24033             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24034           0 :                                 return -1;
   24035             :                         }
   24036           0 :                         object->count = test_var;
   24037             :                 } else {
   24038           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   24039             :                           PyLong_Type.tp_name);
   24040           0 :                         return -1;
   24041             :                 }
   24042             :         }
   24043           0 :         return 0;
   24044             : }
   24045             : 
   24046           0 : static PyObject *py_netr_DsRAddressToSitenamesWCtr_get_sitename(PyObject *obj, void *closure)
   24047             : {
   24048           0 :         struct netr_DsRAddressToSitenamesWCtr *object = (struct netr_DsRAddressToSitenamesWCtr *)pytalloc_get_ptr(obj);
   24049             :         PyObject *py_sitename;
   24050           0 :         if (object->sitename == NULL) {
   24051           0 :                 Py_RETURN_NONE;
   24052             :         }
   24053           0 :         if (object->sitename == NULL) {
   24054           0 :                 py_sitename = Py_None;
   24055           0 :                 Py_INCREF(py_sitename);
   24056             :         } else {
   24057           0 :                 py_sitename = PyList_New(object->count);
   24058           0 :                 if (py_sitename == NULL) {
   24059           0 :                         return NULL;
   24060             :                 }
   24061             :                 {
   24062             :                         int sitename_cntr_1;
   24063           0 :                         for (sitename_cntr_1 = 0; sitename_cntr_1 < (object->count); sitename_cntr_1++) {
   24064             :                                 PyObject *py_sitename_1;
   24065           0 :                                 py_sitename_1 = pytalloc_reference_ex(lsa_String_Type, object->sitename, &object->sitename[sitename_cntr_1]);
   24066           0 :                                 PyList_SetItem(py_sitename, sitename_cntr_1, py_sitename_1);
   24067             :                         }
   24068             :                 }
   24069             :         }
   24070           0 :         return py_sitename;
   24071             : }
   24072             : 
   24073           0 : static int py_netr_DsRAddressToSitenamesWCtr_set_sitename(PyObject *py_obj, PyObject *value, void *closure)
   24074             : {
   24075           0 :         struct netr_DsRAddressToSitenamesWCtr *object = (struct netr_DsRAddressToSitenamesWCtr *)pytalloc_get_ptr(py_obj);
   24076           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sitename));
   24077           0 :         if (value == NULL) {
   24078           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sitename");
   24079           0 :                 return -1;
   24080             :         }
   24081           0 :         if (value == Py_None) {
   24082           0 :                 object->sitename = NULL;
   24083             :         } else {
   24084           0 :                 object->sitename = NULL;
   24085           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   24086             :                 {
   24087             :                         int sitename_cntr_1;
   24088           0 :                         object->sitename = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sitename, PyList_GET_SIZE(value));
   24089           0 :                         if (!object->sitename) { return -1;; }
   24090           0 :                         talloc_set_name_const(object->sitename, "ARRAY: object->sitename");
   24091           0 :                         for (sitename_cntr_1 = 0; sitename_cntr_1 < PyList_GET_SIZE(value); sitename_cntr_1++) {
   24092           0 :                                 if (PyList_GET_ITEM(value, sitename_cntr_1) == NULL) {
   24093           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sitename[sitename_cntr_1]");
   24094           0 :                                         return -1;
   24095             :                                 }
   24096           0 :                                 PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, sitename_cntr_1), return -1;);
   24097           0 :                                 if (talloc_reference(object->sitename, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sitename_cntr_1))) == NULL) {
   24098           0 :                                         PyErr_NoMemory();
   24099           0 :                                         return -1;
   24100             :                                 }
   24101           0 :                                 object->sitename[sitename_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, sitename_cntr_1));
   24102             :                         }
   24103             :                 }
   24104             :         }
   24105           0 :         return 0;
   24106             : }
   24107             : 
   24108             : static PyGetSetDef py_netr_DsRAddressToSitenamesWCtr_getsetters[] = {
   24109             :         {
   24110             :                 .name = discard_const_p(char, "count"),
   24111             :                 .get = py_netr_DsRAddressToSitenamesWCtr_get_count,
   24112             :                 .set = py_netr_DsRAddressToSitenamesWCtr_set_count,
   24113             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   24114             :         },
   24115             :         {
   24116             :                 .name = discard_const_p(char, "sitename"),
   24117             :                 .get = py_netr_DsRAddressToSitenamesWCtr_get_sitename,
   24118             :                 .set = py_netr_DsRAddressToSitenamesWCtr_set_sitename,
   24119             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   24120             :         },
   24121             :         { .name = NULL }
   24122             : };
   24123             : 
   24124           0 : static PyObject *py_netr_DsRAddressToSitenamesWCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   24125             : {
   24126           0 :         return pytalloc_new(struct netr_DsRAddressToSitenamesWCtr, type);
   24127             : }
   24128             : 
   24129             : 
   24130             : static PyTypeObject netr_DsRAddressToSitenamesWCtr_Type = {
   24131             :         PyVarObject_HEAD_INIT(NULL, 0)
   24132             :         .tp_name = "netlogon.netr_DsRAddressToSitenamesWCtr",
   24133             :         .tp_getset = py_netr_DsRAddressToSitenamesWCtr_getsetters,
   24134             :         .tp_methods = NULL,
   24135             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   24136             :         .tp_new = py_netr_DsRAddressToSitenamesWCtr_new,
   24137             : };
   24138             : 
   24139             : 
   24140           0 : static PyObject *py_netr_DsRAddress_get_buffer(PyObject *obj, void *closure)
   24141             : {
   24142           0 :         struct netr_DsRAddress *object = (struct netr_DsRAddress *)pytalloc_get_ptr(obj);
   24143             :         PyObject *py_buffer;
   24144           0 :         if (object->buffer == NULL) {
   24145           0 :                 Py_RETURN_NONE;
   24146             :         }
   24147           0 :         if (object->buffer == NULL) {
   24148           0 :                 py_buffer = Py_None;
   24149           0 :                 Py_INCREF(py_buffer);
   24150             :         } else {
   24151           0 :                 py_buffer = PyList_New(object->size);
   24152           0 :                 if (py_buffer == NULL) {
   24153           0 :                         return NULL;
   24154             :                 }
   24155             :                 {
   24156             :                         int buffer_cntr_1;
   24157           0 :                         for (buffer_cntr_1 = 0; buffer_cntr_1 < (object->size); buffer_cntr_1++) {
   24158             :                                 PyObject *py_buffer_1;
   24159           0 :                                 py_buffer_1 = PyLong_FromLong((uint16_t)object->buffer[buffer_cntr_1]);
   24160           0 :                                 PyList_SetItem(py_buffer, buffer_cntr_1, py_buffer_1);
   24161             :                         }
   24162             :                 }
   24163             :         }
   24164           0 :         return py_buffer;
   24165             : }
   24166             : 
   24167           0 : static int py_netr_DsRAddress_set_buffer(PyObject *py_obj, PyObject *value, void *closure)
   24168             : {
   24169           0 :         struct netr_DsRAddress *object = (struct netr_DsRAddress *)pytalloc_get_ptr(py_obj);
   24170           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->buffer));
   24171           0 :         if (value == NULL) {
   24172           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->buffer");
   24173           0 :                 return -1;
   24174             :         }
   24175           0 :         if (value == Py_None) {
   24176           0 :                 object->buffer = NULL;
   24177             :         } else {
   24178           0 :                 object->buffer = NULL;
   24179           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   24180             :                 {
   24181             :                         int buffer_cntr_1;
   24182           0 :                         object->buffer = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->buffer, PyList_GET_SIZE(value));
   24183           0 :                         if (!object->buffer) { return -1;; }
   24184           0 :                         talloc_set_name_const(object->buffer, "ARRAY: object->buffer");
   24185           0 :                         for (buffer_cntr_1 = 0; buffer_cntr_1 < PyList_GET_SIZE(value); buffer_cntr_1++) {
   24186           0 :                                 if (PyList_GET_ITEM(value, buffer_cntr_1) == NULL) {
   24187           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->buffer[buffer_cntr_1]");
   24188           0 :                                         return -1;
   24189             :                                 }
   24190             :                                 {
   24191           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->buffer[buffer_cntr_1]));
   24192           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, buffer_cntr_1))) {
   24193             :                                                 unsigned long long test_var;
   24194           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, buffer_cntr_1));
   24195           0 :                                                 if (PyErr_Occurred() != NULL) {
   24196           0 :                                                         return -1;
   24197             :                                                 }
   24198           0 :                                                 if (test_var > uint_max) {
   24199           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   24200             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   24201           0 :                                                         return -1;
   24202             :                                                 }
   24203           0 :                                                 object->buffer[buffer_cntr_1] = test_var;
   24204             :                                         } else {
   24205           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",\
   24206             :                                                   PyLong_Type.tp_name);
   24207           0 :                                                 return -1;
   24208             :                                         }
   24209             :                                 }
   24210             :                         }
   24211             :                 }
   24212             :         }
   24213           0 :         return 0;
   24214             : }
   24215             : 
   24216           0 : static PyObject *py_netr_DsRAddress_get_size(PyObject *obj, void *closure)
   24217             : {
   24218           0 :         struct netr_DsRAddress *object = (struct netr_DsRAddress *)pytalloc_get_ptr(obj);
   24219             :         PyObject *py_size;
   24220           0 :         py_size = PyLong_FromUnsignedLongLong((uint32_t)object->size);
   24221           0 :         return py_size;
   24222             : }
   24223             : 
   24224           0 : static int py_netr_DsRAddress_set_size(PyObject *py_obj, PyObject *value, void *closure)
   24225             : {
   24226           0 :         struct netr_DsRAddress *object = (struct netr_DsRAddress *)pytalloc_get_ptr(py_obj);
   24227           0 :         if (value == NULL) {
   24228           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->size");
   24229           0 :                 return -1;
   24230             :         }
   24231             :         {
   24232           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->size));
   24233           0 :                 if (PyLong_Check(value)) {
   24234             :                         unsigned long long test_var;
   24235           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24236           0 :                         if (PyErr_Occurred() != NULL) {
   24237           0 :                                 return -1;
   24238             :                         }
   24239           0 :                         if (test_var > uint_max) {
   24240           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   24241             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24242           0 :                                 return -1;
   24243             :                         }
   24244           0 :                         object->size = test_var;
   24245             :                 } else {
   24246           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   24247             :                           PyLong_Type.tp_name);
   24248           0 :                         return -1;
   24249             :                 }
   24250             :         }
   24251           0 :         return 0;
   24252             : }
   24253             : 
   24254             : static PyGetSetDef py_netr_DsRAddress_getsetters[] = {
   24255             :         {
   24256             :                 .name = discard_const_p(char, "buffer"),
   24257             :                 .get = py_netr_DsRAddress_get_buffer,
   24258             :                 .set = py_netr_DsRAddress_set_buffer,
   24259             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   24260             :         },
   24261             :         {
   24262             :                 .name = discard_const_p(char, "size"),
   24263             :                 .get = py_netr_DsRAddress_get_size,
   24264             :                 .set = py_netr_DsRAddress_set_size,
   24265             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   24266             :         },
   24267             :         { .name = NULL }
   24268             : };
   24269             : 
   24270           0 : static PyObject *py_netr_DsRAddress_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   24271             : {
   24272           0 :         return pytalloc_new(struct netr_DsRAddress, type);
   24273             : }
   24274             : 
   24275             : 
   24276             : static PyTypeObject netr_DsRAddress_Type = {
   24277             :         PyVarObject_HEAD_INIT(NULL, 0)
   24278             :         .tp_name = "netlogon.netr_DsRAddress",
   24279             :         .tp_getset = py_netr_DsRAddress_getsetters,
   24280             :         .tp_methods = NULL,
   24281             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   24282             :         .tp_new = py_netr_DsRAddress_new,
   24283             : };
   24284             : 
   24285             : 
   24286           0 : static PyObject *py_netr_DomainTrust_get_netbios_name(PyObject *obj, void *closure)
   24287             : {
   24288           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(obj);
   24289             :         PyObject *py_netbios_name;
   24290           0 :         if (object->netbios_name == NULL) {
   24291           0 :                 Py_RETURN_NONE;
   24292             :         }
   24293           0 :         if (object->netbios_name == NULL) {
   24294           0 :                 py_netbios_name = Py_None;
   24295           0 :                 Py_INCREF(py_netbios_name);
   24296             :         } else {
   24297           0 :                 if (object->netbios_name == NULL) {
   24298           0 :                         py_netbios_name = Py_None;
   24299           0 :                         Py_INCREF(py_netbios_name);
   24300             :                 } else {
   24301           0 :                         py_netbios_name = PyUnicode_Decode(object->netbios_name, strlen(object->netbios_name), "utf-8", "ignore");
   24302             :                 }
   24303             :         }
   24304           0 :         return py_netbios_name;
   24305             : }
   24306             : 
   24307           0 : static int py_netr_DomainTrust_set_netbios_name(PyObject *py_obj, PyObject *value, void *closure)
   24308             : {
   24309           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(py_obj);
   24310           0 :         if (value == NULL) {
   24311           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->netbios_name");
   24312           0 :                 return -1;
   24313             :         }
   24314           0 :         if (value == Py_None) {
   24315           0 :                 object->netbios_name = NULL;
   24316             :         } else {
   24317           0 :                 object->netbios_name = NULL;
   24318             :                 {
   24319             :                         const char *test_str;
   24320             :                         const char *talloc_str;
   24321           0 :                         PyObject *unicode = NULL;
   24322           0 :                         if (PyUnicode_Check(value)) {
   24323           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   24324           0 :                                 if (unicode == NULL) {
   24325           0 :                                         PyErr_NoMemory();
   24326           0 :                                         return -1;
   24327             :                                 }
   24328           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   24329           0 :                         } else if (PyBytes_Check(value)) {
   24330           0 :                                 test_str = PyBytes_AS_STRING(value);
   24331             :                         } else {
   24332           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   24333           0 :                                 return -1;
   24334             :                         }
   24335           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   24336           0 :                         if (unicode != NULL) {
   24337           0 :                                 Py_DECREF(unicode);
   24338             :                         }
   24339           0 :                         if (talloc_str == NULL) {
   24340           0 :                                 PyErr_NoMemory();
   24341           0 :                                 return -1;
   24342             :                         }
   24343           0 :                         object->netbios_name = talloc_str;
   24344             :                 }
   24345             :         }
   24346           0 :         return 0;
   24347             : }
   24348             : 
   24349          26 : static PyObject *py_netr_DomainTrust_get_dns_name(PyObject *obj, void *closure)
   24350             : {
   24351          26 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(obj);
   24352             :         PyObject *py_dns_name;
   24353          26 :         if (object->dns_name == NULL) {
   24354           0 :                 Py_RETURN_NONE;
   24355             :         }
   24356          26 :         if (object->dns_name == NULL) {
   24357           0 :                 py_dns_name = Py_None;
   24358           0 :                 Py_INCREF(py_dns_name);
   24359             :         } else {
   24360          26 :                 if (object->dns_name == NULL) {
   24361           0 :                         py_dns_name = Py_None;
   24362           0 :                         Py_INCREF(py_dns_name);
   24363             :                 } else {
   24364          26 :                         py_dns_name = PyUnicode_Decode(object->dns_name, strlen(object->dns_name), "utf-8", "ignore");
   24365             :                 }
   24366             :         }
   24367          26 :         return py_dns_name;
   24368             : }
   24369             : 
   24370           0 : static int py_netr_DomainTrust_set_dns_name(PyObject *py_obj, PyObject *value, void *closure)
   24371             : {
   24372           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(py_obj);
   24373           0 :         if (value == NULL) {
   24374           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_name");
   24375           0 :                 return -1;
   24376             :         }
   24377           0 :         if (value == Py_None) {
   24378           0 :                 object->dns_name = NULL;
   24379             :         } else {
   24380           0 :                 object->dns_name = NULL;
   24381             :                 {
   24382             :                         const char *test_str;
   24383             :                         const char *talloc_str;
   24384           0 :                         PyObject *unicode = NULL;
   24385           0 :                         if (PyUnicode_Check(value)) {
   24386           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   24387           0 :                                 if (unicode == NULL) {
   24388           0 :                                         PyErr_NoMemory();
   24389           0 :                                         return -1;
   24390             :                                 }
   24391           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   24392           0 :                         } else if (PyBytes_Check(value)) {
   24393           0 :                                 test_str = PyBytes_AS_STRING(value);
   24394             :                         } else {
   24395           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   24396           0 :                                 return -1;
   24397             :                         }
   24398           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   24399           0 :                         if (unicode != NULL) {
   24400           0 :                                 Py_DECREF(unicode);
   24401             :                         }
   24402           0 :                         if (talloc_str == NULL) {
   24403           0 :                                 PyErr_NoMemory();
   24404           0 :                                 return -1;
   24405             :                         }
   24406           0 :                         object->dns_name = talloc_str;
   24407             :                 }
   24408             :         }
   24409           0 :         return 0;
   24410             : }
   24411             : 
   24412         252 : static PyObject *py_netr_DomainTrust_get_trust_flags(PyObject *obj, void *closure)
   24413             : {
   24414         252 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(obj);
   24415             :         PyObject *py_trust_flags;
   24416         252 :         py_trust_flags = PyLong_FromUnsignedLongLong((uint32_t)object->trust_flags);
   24417         252 :         return py_trust_flags;
   24418             : }
   24419             : 
   24420           0 : static int py_netr_DomainTrust_set_trust_flags(PyObject *py_obj, PyObject *value, void *closure)
   24421             : {
   24422           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(py_obj);
   24423           0 :         if (value == NULL) {
   24424           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->trust_flags");
   24425           0 :                 return -1;
   24426             :         }
   24427             :         {
   24428           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->trust_flags));
   24429           0 :                 if (PyLong_Check(value)) {
   24430             :                         unsigned long long test_var;
   24431           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24432           0 :                         if (PyErr_Occurred() != NULL) {
   24433           0 :                                 return -1;
   24434             :                         }
   24435           0 :                         if (test_var > uint_max) {
   24436           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   24437             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24438           0 :                                 return -1;
   24439             :                         }
   24440           0 :                         object->trust_flags = test_var;
   24441             :                 } else {
   24442           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   24443             :                           PyLong_Type.tp_name);
   24444           0 :                         return -1;
   24445             :                 }
   24446             :         }
   24447           0 :         return 0;
   24448             : }
   24449             : 
   24450           0 : static PyObject *py_netr_DomainTrust_get_parent_index(PyObject *obj, void *closure)
   24451             : {
   24452           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(obj);
   24453             :         PyObject *py_parent_index;
   24454           0 :         py_parent_index = PyLong_FromUnsignedLongLong((uint32_t)object->parent_index);
   24455           0 :         return py_parent_index;
   24456             : }
   24457             : 
   24458           0 : static int py_netr_DomainTrust_set_parent_index(PyObject *py_obj, PyObject *value, void *closure)
   24459             : {
   24460           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(py_obj);
   24461           0 :         if (value == NULL) {
   24462           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->parent_index");
   24463           0 :                 return -1;
   24464             :         }
   24465             :         {
   24466           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->parent_index));
   24467           0 :                 if (PyLong_Check(value)) {
   24468             :                         unsigned long long test_var;
   24469           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24470           0 :                         if (PyErr_Occurred() != NULL) {
   24471           0 :                                 return -1;
   24472             :                         }
   24473           0 :                         if (test_var > uint_max) {
   24474           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   24475             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24476           0 :                                 return -1;
   24477             :                         }
   24478           0 :                         object->parent_index = test_var;
   24479             :                 } else {
   24480           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   24481             :                           PyLong_Type.tp_name);
   24482           0 :                         return -1;
   24483             :                 }
   24484             :         }
   24485           0 :         return 0;
   24486             : }
   24487             : 
   24488          26 : static PyObject *py_netr_DomainTrust_get_trust_type(PyObject *obj, void *closure)
   24489             : {
   24490          26 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(obj);
   24491             :         PyObject *py_trust_type;
   24492          26 :         py_trust_type = PyLong_FromUnsignedLongLong((uint32_t)object->trust_type);
   24493          26 :         return py_trust_type;
   24494             : }
   24495             : 
   24496           0 : static int py_netr_DomainTrust_set_trust_type(PyObject *py_obj, PyObject *value, void *closure)
   24497             : {
   24498           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(py_obj);
   24499           0 :         if (value == NULL) {
   24500           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->trust_type");
   24501           0 :                 return -1;
   24502             :         }
   24503             :         {
   24504           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->trust_type));
   24505           0 :                 if (PyLong_Check(value)) {
   24506             :                         unsigned long long test_var;
   24507           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24508           0 :                         if (PyErr_Occurred() != NULL) {
   24509           0 :                                 return -1;
   24510             :                         }
   24511           0 :                         if (test_var > uint_max) {
   24512           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   24513             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24514           0 :                                 return -1;
   24515             :                         }
   24516           0 :                         object->trust_type = test_var;
   24517             :                 } else {
   24518           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   24519             :                           PyLong_Type.tp_name);
   24520           0 :                         return -1;
   24521             :                 }
   24522             :         }
   24523           0 :         return 0;
   24524             : }
   24525             : 
   24526          78 : static PyObject *py_netr_DomainTrust_get_trust_attributes(PyObject *obj, void *closure)
   24527             : {
   24528          78 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(obj);
   24529             :         PyObject *py_trust_attributes;
   24530          78 :         py_trust_attributes = PyLong_FromUnsignedLongLong((uint32_t)object->trust_attributes);
   24531          78 :         return py_trust_attributes;
   24532             : }
   24533             : 
   24534           0 : static int py_netr_DomainTrust_set_trust_attributes(PyObject *py_obj, PyObject *value, void *closure)
   24535             : {
   24536           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(py_obj);
   24537           0 :         if (value == NULL) {
   24538           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->trust_attributes");
   24539           0 :                 return -1;
   24540             :         }
   24541             :         {
   24542           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->trust_attributes));
   24543           0 :                 if (PyLong_Check(value)) {
   24544             :                         unsigned long long test_var;
   24545           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24546           0 :                         if (PyErr_Occurred() != NULL) {
   24547           0 :                                 return -1;
   24548             :                         }
   24549           0 :                         if (test_var > uint_max) {
   24550           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   24551             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24552           0 :                                 return -1;
   24553             :                         }
   24554           0 :                         object->trust_attributes = test_var;
   24555             :                 } else {
   24556           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   24557             :                           PyLong_Type.tp_name);
   24558           0 :                         return -1;
   24559             :                 }
   24560             :         }
   24561           0 :         return 0;
   24562             : }
   24563             : 
   24564           0 : static PyObject *py_netr_DomainTrust_get_sid(PyObject *obj, void *closure)
   24565             : {
   24566           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(obj);
   24567             :         PyObject *py_sid;
   24568           0 :         if (object->sid == NULL) {
   24569           0 :                 Py_RETURN_NONE;
   24570             :         }
   24571           0 :         if (object->sid == NULL) {
   24572           0 :                 py_sid = Py_None;
   24573           0 :                 Py_INCREF(py_sid);
   24574             :         } else {
   24575           0 :                 py_sid = pytalloc_reference_ex(dom_sid_Type, object->sid, object->sid);
   24576             :         }
   24577           0 :         return py_sid;
   24578             : }
   24579             : 
   24580           0 : static int py_netr_DomainTrust_set_sid(PyObject *py_obj, PyObject *value, void *closure)
   24581             : {
   24582           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(py_obj);
   24583           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sid));
   24584           0 :         if (value == NULL) {
   24585           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sid");
   24586           0 :                 return -1;
   24587             :         }
   24588           0 :         if (value == Py_None) {
   24589           0 :                 object->sid = NULL;
   24590             :         } else {
   24591           0 :                 object->sid = NULL;
   24592           0 :                 PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
   24593           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   24594           0 :                         PyErr_NoMemory();
   24595           0 :                         return -1;
   24596             :                 }
   24597           0 :                 object->sid = (struct dom_sid *)pytalloc_get_ptr(value);
   24598             :         }
   24599           0 :         return 0;
   24600             : }
   24601             : 
   24602           0 : static PyObject *py_netr_DomainTrust_get_guid(PyObject *obj, void *closure)
   24603             : {
   24604           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(obj);
   24605             :         PyObject *py_guid;
   24606           0 :         py_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->guid);
   24607           0 :         return py_guid;
   24608             : }
   24609             : 
   24610           0 : static int py_netr_DomainTrust_set_guid(PyObject *py_obj, PyObject *value, void *closure)
   24611             : {
   24612           0 :         struct netr_DomainTrust *object = (struct netr_DomainTrust *)pytalloc_get_ptr(py_obj);
   24613           0 :         if (value == NULL) {
   24614           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->guid");
   24615           0 :                 return -1;
   24616             :         }
   24617           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   24618           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   24619           0 :                 PyErr_NoMemory();
   24620           0 :                 return -1;
   24621             :         }
   24622           0 :         object->guid = *(struct GUID *)pytalloc_get_ptr(value);
   24623           0 :         return 0;
   24624             : }
   24625             : 
   24626             : static PyGetSetDef py_netr_DomainTrust_getsetters[] = {
   24627             :         {
   24628             :                 .name = discard_const_p(char, "netbios_name"),
   24629             :                 .get = py_netr_DomainTrust_get_netbios_name,
   24630             :                 .set = py_netr_DomainTrust_set_netbios_name,
   24631             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   24632             :         },
   24633             :         {
   24634             :                 .name = discard_const_p(char, "dns_name"),
   24635             :                 .get = py_netr_DomainTrust_get_dns_name,
   24636             :                 .set = py_netr_DomainTrust_set_dns_name,
   24637             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   24638             :         },
   24639             :         {
   24640             :                 .name = discard_const_p(char, "trust_flags"),
   24641             :                 .get = py_netr_DomainTrust_get_trust_flags,
   24642             :                 .set = py_netr_DomainTrust_set_trust_flags,
   24643             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_TrustFlags")
   24644             :         },
   24645             :         {
   24646             :                 .name = discard_const_p(char, "parent_index"),
   24647             :                 .get = py_netr_DomainTrust_get_parent_index,
   24648             :                 .set = py_netr_DomainTrust_set_parent_index,
   24649             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   24650             :         },
   24651             :         {
   24652             :                 .name = discard_const_p(char, "trust_type"),
   24653             :                 .get = py_netr_DomainTrust_get_trust_type,
   24654             :                 .set = py_netr_DomainTrust_set_trust_type,
   24655             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_TrustType")
   24656             :         },
   24657             :         {
   24658             :                 .name = discard_const_p(char, "trust_attributes"),
   24659             :                 .get = py_netr_DomainTrust_get_trust_attributes,
   24660             :                 .set = py_netr_DomainTrust_set_trust_attributes,
   24661             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_TrustAttributes")
   24662             :         },
   24663             :         {
   24664             :                 .name = discard_const_p(char, "sid"),
   24665             :                 .get = py_netr_DomainTrust_get_sid,
   24666             :                 .set = py_netr_DomainTrust_set_sid,
   24667             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid2")
   24668             :         },
   24669             :         {
   24670             :                 .name = discard_const_p(char, "guid"),
   24671             :                 .get = py_netr_DomainTrust_get_guid,
   24672             :                 .set = py_netr_DomainTrust_set_guid,
   24673             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   24674             :         },
   24675             :         { .name = NULL }
   24676             : };
   24677             : 
   24678           0 : static PyObject *py_netr_DomainTrust_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   24679             : {
   24680           0 :         return pytalloc_new(struct netr_DomainTrust, type);
   24681             : }
   24682             : 
   24683             : 
   24684             : static PyTypeObject netr_DomainTrust_Type = {
   24685             :         PyVarObject_HEAD_INIT(NULL, 0)
   24686             :         .tp_name = "netlogon.netr_DomainTrust",
   24687             :         .tp_getset = py_netr_DomainTrust_getsetters,
   24688             :         .tp_methods = NULL,
   24689             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   24690             :         .tp_new = py_netr_DomainTrust_new,
   24691             : };
   24692             : 
   24693             : 
   24694           0 : static PyObject *py_netr_DomainTrustList_get_count(PyObject *obj, void *closure)
   24695             : {
   24696           0 :         struct netr_DomainTrustList *object = (struct netr_DomainTrustList *)pytalloc_get_ptr(obj);
   24697             :         PyObject *py_count;
   24698           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
   24699           0 :         return py_count;
   24700             : }
   24701             : 
   24702           0 : static int py_netr_DomainTrustList_set_count(PyObject *py_obj, PyObject *value, void *closure)
   24703             : {
   24704           0 :         struct netr_DomainTrustList *object = (struct netr_DomainTrustList *)pytalloc_get_ptr(py_obj);
   24705           0 :         if (value == NULL) {
   24706           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   24707           0 :                 return -1;
   24708             :         }
   24709             :         {
   24710           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   24711           0 :                 if (PyLong_Check(value)) {
   24712             :                         unsigned long long test_var;
   24713           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24714           0 :                         if (PyErr_Occurred() != NULL) {
   24715           0 :                                 return -1;
   24716             :                         }
   24717           0 :                         if (test_var > uint_max) {
   24718           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   24719             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24720           0 :                                 return -1;
   24721             :                         }
   24722           0 :                         object->count = test_var;
   24723             :                 } else {
   24724           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   24725             :                           PyLong_Type.tp_name);
   24726           0 :                         return -1;
   24727             :                 }
   24728             :         }
   24729           0 :         return 0;
   24730             : }
   24731             : 
   24732          18 : static PyObject *py_netr_DomainTrustList_get_array(PyObject *obj, void *closure)
   24733             : {
   24734          18 :         struct netr_DomainTrustList *object = (struct netr_DomainTrustList *)pytalloc_get_ptr(obj);
   24735             :         PyObject *py_array;
   24736          18 :         if (object->array == NULL) {
   24737           0 :                 Py_RETURN_NONE;
   24738             :         }
   24739          18 :         if (object->array == NULL) {
   24740           0 :                 py_array = Py_None;
   24741           0 :                 Py_INCREF(py_array);
   24742             :         } else {
   24743          18 :                 py_array = PyList_New(object->count);
   24744          18 :                 if (py_array == NULL) {
   24745           0 :                         return NULL;
   24746             :                 }
   24747             :                 {
   24748             :                         int array_cntr_1;
   24749          62 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
   24750             :                                 PyObject *py_array_1;
   24751          44 :                                 py_array_1 = pytalloc_reference_ex(&netr_DomainTrust_Type, object->array, &object->array[array_cntr_1]);
   24752          44 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
   24753             :                         }
   24754             :                 }
   24755             :         }
   24756          18 :         return py_array;
   24757             : }
   24758             : 
   24759           0 : static int py_netr_DomainTrustList_set_array(PyObject *py_obj, PyObject *value, void *closure)
   24760             : {
   24761           0 :         struct netr_DomainTrustList *object = (struct netr_DomainTrustList *)pytalloc_get_ptr(py_obj);
   24762           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
   24763           0 :         if (value == NULL) {
   24764           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   24765           0 :                 return -1;
   24766             :         }
   24767           0 :         if (value == Py_None) {
   24768           0 :                 object->array = NULL;
   24769             :         } else {
   24770           0 :                 object->array = NULL;
   24771           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   24772             :                 {
   24773             :                         int array_cntr_1;
   24774           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   24775           0 :                         if (!object->array) { return -1;; }
   24776           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
   24777           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
   24778           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
   24779           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
   24780           0 :                                         return -1;
   24781             :                                 }
   24782           0 :                                 PY_CHECK_TYPE(&netr_DomainTrust_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
   24783           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
   24784           0 :                                         PyErr_NoMemory();
   24785           0 :                                         return -1;
   24786             :                                 }
   24787           0 :                                 object->array[array_cntr_1] = *(struct netr_DomainTrust *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
   24788             :                         }
   24789             :                 }
   24790             :         }
   24791           0 :         return 0;
   24792             : }
   24793             : 
   24794             : static PyGetSetDef py_netr_DomainTrustList_getsetters[] = {
   24795             :         {
   24796             :                 .name = discard_const_p(char, "count"),
   24797             :                 .get = py_netr_DomainTrustList_get_count,
   24798             :                 .set = py_netr_DomainTrustList_set_count,
   24799             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   24800             :         },
   24801             :         {
   24802             :                 .name = discard_const_p(char, "array"),
   24803             :                 .get = py_netr_DomainTrustList_get_array,
   24804             :                 .set = py_netr_DomainTrustList_set_array,
   24805             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DomainTrust")
   24806             :         },
   24807             :         { .name = NULL }
   24808             : };
   24809             : 
   24810           0 : static PyObject *py_netr_DomainTrustList_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   24811             : {
   24812           0 :         return pytalloc_new(struct netr_DomainTrustList, type);
   24813             : }
   24814             : 
   24815             : 
   24816             : static PyTypeObject netr_DomainTrustList_Type = {
   24817             :         PyVarObject_HEAD_INIT(NULL, 0)
   24818             :         .tp_name = "netlogon.netr_DomainTrustList",
   24819             :         .tp_getset = py_netr_DomainTrustList_getsetters,
   24820             :         .tp_methods = NULL,
   24821             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   24822             :         .tp_new = py_netr_DomainTrustList_new,
   24823             : };
   24824             : 
   24825             : 
   24826           0 : static PyObject *py_netr_DsRAddressToSitenamesExWCtr_get_count(PyObject *obj, void *closure)
   24827             : {
   24828           0 :         struct netr_DsRAddressToSitenamesExWCtr *object = (struct netr_DsRAddressToSitenamesExWCtr *)pytalloc_get_ptr(obj);
   24829             :         PyObject *py_count;
   24830           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
   24831           0 :         return py_count;
   24832             : }
   24833             : 
   24834           0 : static int py_netr_DsRAddressToSitenamesExWCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
   24835             : {
   24836           0 :         struct netr_DsRAddressToSitenamesExWCtr *object = (struct netr_DsRAddressToSitenamesExWCtr *)pytalloc_get_ptr(py_obj);
   24837           0 :         if (value == NULL) {
   24838           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   24839           0 :                 return -1;
   24840             :         }
   24841             :         {
   24842           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   24843           0 :                 if (PyLong_Check(value)) {
   24844             :                         unsigned long long test_var;
   24845           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24846           0 :                         if (PyErr_Occurred() != NULL) {
   24847           0 :                                 return -1;
   24848             :                         }
   24849           0 :                         if (test_var > uint_max) {
   24850           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   24851             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24852           0 :                                 return -1;
   24853             :                         }
   24854           0 :                         object->count = test_var;
   24855             :                 } else {
   24856           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   24857             :                           PyLong_Type.tp_name);
   24858           0 :                         return -1;
   24859             :                 }
   24860             :         }
   24861           0 :         return 0;
   24862             : }
   24863             : 
   24864           0 : static PyObject *py_netr_DsRAddressToSitenamesExWCtr_get_sitename(PyObject *obj, void *closure)
   24865             : {
   24866           0 :         struct netr_DsRAddressToSitenamesExWCtr *object = (struct netr_DsRAddressToSitenamesExWCtr *)pytalloc_get_ptr(obj);
   24867             :         PyObject *py_sitename;
   24868           0 :         if (object->sitename == NULL) {
   24869           0 :                 Py_RETURN_NONE;
   24870             :         }
   24871           0 :         if (object->sitename == NULL) {
   24872           0 :                 py_sitename = Py_None;
   24873           0 :                 Py_INCREF(py_sitename);
   24874             :         } else {
   24875           0 :                 py_sitename = PyList_New(object->count);
   24876           0 :                 if (py_sitename == NULL) {
   24877           0 :                         return NULL;
   24878             :                 }
   24879             :                 {
   24880             :                         int sitename_cntr_1;
   24881           0 :                         for (sitename_cntr_1 = 0; sitename_cntr_1 < (object->count); sitename_cntr_1++) {
   24882             :                                 PyObject *py_sitename_1;
   24883           0 :                                 py_sitename_1 = pytalloc_reference_ex(lsa_String_Type, object->sitename, &object->sitename[sitename_cntr_1]);
   24884           0 :                                 PyList_SetItem(py_sitename, sitename_cntr_1, py_sitename_1);
   24885             :                         }
   24886             :                 }
   24887             :         }
   24888           0 :         return py_sitename;
   24889             : }
   24890             : 
   24891           0 : static int py_netr_DsRAddressToSitenamesExWCtr_set_sitename(PyObject *py_obj, PyObject *value, void *closure)
   24892             : {
   24893           0 :         struct netr_DsRAddressToSitenamesExWCtr *object = (struct netr_DsRAddressToSitenamesExWCtr *)pytalloc_get_ptr(py_obj);
   24894           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sitename));
   24895           0 :         if (value == NULL) {
   24896           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sitename");
   24897           0 :                 return -1;
   24898             :         }
   24899           0 :         if (value == Py_None) {
   24900           0 :                 object->sitename = NULL;
   24901             :         } else {
   24902           0 :                 object->sitename = NULL;
   24903           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   24904             :                 {
   24905             :                         int sitename_cntr_1;
   24906           0 :                         object->sitename = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sitename, PyList_GET_SIZE(value));
   24907           0 :                         if (!object->sitename) { return -1;; }
   24908           0 :                         talloc_set_name_const(object->sitename, "ARRAY: object->sitename");
   24909           0 :                         for (sitename_cntr_1 = 0; sitename_cntr_1 < PyList_GET_SIZE(value); sitename_cntr_1++) {
   24910           0 :                                 if (PyList_GET_ITEM(value, sitename_cntr_1) == NULL) {
   24911           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sitename[sitename_cntr_1]");
   24912           0 :                                         return -1;
   24913             :                                 }
   24914           0 :                                 PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, sitename_cntr_1), return -1;);
   24915           0 :                                 if (talloc_reference(object->sitename, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sitename_cntr_1))) == NULL) {
   24916           0 :                                         PyErr_NoMemory();
   24917           0 :                                         return -1;
   24918             :                                 }
   24919           0 :                                 object->sitename[sitename_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, sitename_cntr_1));
   24920             :                         }
   24921             :                 }
   24922             :         }
   24923           0 :         return 0;
   24924             : }
   24925             : 
   24926           0 : static PyObject *py_netr_DsRAddressToSitenamesExWCtr_get_subnetname(PyObject *obj, void *closure)
   24927             : {
   24928           0 :         struct netr_DsRAddressToSitenamesExWCtr *object = (struct netr_DsRAddressToSitenamesExWCtr *)pytalloc_get_ptr(obj);
   24929             :         PyObject *py_subnetname;
   24930           0 :         if (object->subnetname == NULL) {
   24931           0 :                 Py_RETURN_NONE;
   24932             :         }
   24933           0 :         if (object->subnetname == NULL) {
   24934           0 :                 py_subnetname = Py_None;
   24935           0 :                 Py_INCREF(py_subnetname);
   24936             :         } else {
   24937           0 :                 py_subnetname = PyList_New(object->count);
   24938           0 :                 if (py_subnetname == NULL) {
   24939           0 :                         return NULL;
   24940             :                 }
   24941             :                 {
   24942             :                         int subnetname_cntr_1;
   24943           0 :                         for (subnetname_cntr_1 = 0; subnetname_cntr_1 < (object->count); subnetname_cntr_1++) {
   24944             :                                 PyObject *py_subnetname_1;
   24945           0 :                                 py_subnetname_1 = pytalloc_reference_ex(lsa_String_Type, object->subnetname, &object->subnetname[subnetname_cntr_1]);
   24946           0 :                                 PyList_SetItem(py_subnetname, subnetname_cntr_1, py_subnetname_1);
   24947             :                         }
   24948             :                 }
   24949             :         }
   24950           0 :         return py_subnetname;
   24951             : }
   24952             : 
   24953           0 : static int py_netr_DsRAddressToSitenamesExWCtr_set_subnetname(PyObject *py_obj, PyObject *value, void *closure)
   24954             : {
   24955           0 :         struct netr_DsRAddressToSitenamesExWCtr *object = (struct netr_DsRAddressToSitenamesExWCtr *)pytalloc_get_ptr(py_obj);
   24956           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->subnetname));
   24957           0 :         if (value == NULL) {
   24958           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->subnetname");
   24959           0 :                 return -1;
   24960             :         }
   24961           0 :         if (value == Py_None) {
   24962           0 :                 object->subnetname = NULL;
   24963             :         } else {
   24964           0 :                 object->subnetname = NULL;
   24965           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   24966             :                 {
   24967             :                         int subnetname_cntr_1;
   24968           0 :                         object->subnetname = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->subnetname, PyList_GET_SIZE(value));
   24969           0 :                         if (!object->subnetname) { return -1;; }
   24970           0 :                         talloc_set_name_const(object->subnetname, "ARRAY: object->subnetname");
   24971           0 :                         for (subnetname_cntr_1 = 0; subnetname_cntr_1 < PyList_GET_SIZE(value); subnetname_cntr_1++) {
   24972           0 :                                 if (PyList_GET_ITEM(value, subnetname_cntr_1) == NULL) {
   24973           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->subnetname[subnetname_cntr_1]");
   24974           0 :                                         return -1;
   24975             :                                 }
   24976           0 :                                 PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, subnetname_cntr_1), return -1;);
   24977           0 :                                 if (talloc_reference(object->subnetname, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, subnetname_cntr_1))) == NULL) {
   24978           0 :                                         PyErr_NoMemory();
   24979           0 :                                         return -1;
   24980             :                                 }
   24981           0 :                                 object->subnetname[subnetname_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, subnetname_cntr_1));
   24982             :                         }
   24983             :                 }
   24984             :         }
   24985           0 :         return 0;
   24986             : }
   24987             : 
   24988             : static PyGetSetDef py_netr_DsRAddressToSitenamesExWCtr_getsetters[] = {
   24989             :         {
   24990             :                 .name = discard_const_p(char, "count"),
   24991             :                 .get = py_netr_DsRAddressToSitenamesExWCtr_get_count,
   24992             :                 .set = py_netr_DsRAddressToSitenamesExWCtr_set_count,
   24993             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   24994             :         },
   24995             :         {
   24996             :                 .name = discard_const_p(char, "sitename"),
   24997             :                 .get = py_netr_DsRAddressToSitenamesExWCtr_get_sitename,
   24998             :                 .set = py_netr_DsRAddressToSitenamesExWCtr_set_sitename,
   24999             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   25000             :         },
   25001             :         {
   25002             :                 .name = discard_const_p(char, "subnetname"),
   25003             :                 .get = py_netr_DsRAddressToSitenamesExWCtr_get_subnetname,
   25004             :                 .set = py_netr_DsRAddressToSitenamesExWCtr_set_subnetname,
   25005             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   25006             :         },
   25007             :         { .name = NULL }
   25008             : };
   25009             : 
   25010           0 : static PyObject *py_netr_DsRAddressToSitenamesExWCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25011             : {
   25012           0 :         return pytalloc_new(struct netr_DsRAddressToSitenamesExWCtr, type);
   25013             : }
   25014             : 
   25015             : 
   25016             : static PyTypeObject netr_DsRAddressToSitenamesExWCtr_Type = {
   25017             :         PyVarObject_HEAD_INIT(NULL, 0)
   25018             :         .tp_name = "netlogon.netr_DsRAddressToSitenamesExWCtr",
   25019             :         .tp_getset = py_netr_DsRAddressToSitenamesExWCtr_getsetters,
   25020             :         .tp_methods = NULL,
   25021             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   25022             :         .tp_new = py_netr_DsRAddressToSitenamesExWCtr_new,
   25023             : };
   25024             : 
   25025             : 
   25026           0 : static PyObject *py_DcSitesCtr_get_num_sites(PyObject *obj, void *closure)
   25027             : {
   25028           0 :         struct DcSitesCtr *object = (struct DcSitesCtr *)pytalloc_get_ptr(obj);
   25029             :         PyObject *py_num_sites;
   25030           0 :         py_num_sites = PyLong_FromUnsignedLongLong((uint32_t)object->num_sites);
   25031           0 :         return py_num_sites;
   25032             : }
   25033             : 
   25034           0 : static int py_DcSitesCtr_set_num_sites(PyObject *py_obj, PyObject *value, void *closure)
   25035             : {
   25036           0 :         struct DcSitesCtr *object = (struct DcSitesCtr *)pytalloc_get_ptr(py_obj);
   25037           0 :         if (value == NULL) {
   25038           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_sites");
   25039           0 :                 return -1;
   25040             :         }
   25041             :         {
   25042           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_sites));
   25043           0 :                 if (PyLong_Check(value)) {
   25044             :                         unsigned long long test_var;
   25045           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25046           0 :                         if (PyErr_Occurred() != NULL) {
   25047           0 :                                 return -1;
   25048             :                         }
   25049           0 :                         if (test_var > uint_max) {
   25050           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   25051             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25052           0 :                                 return -1;
   25053             :                         }
   25054           0 :                         object->num_sites = test_var;
   25055             :                 } else {
   25056           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   25057             :                           PyLong_Type.tp_name);
   25058           0 :                         return -1;
   25059             :                 }
   25060             :         }
   25061           0 :         return 0;
   25062             : }
   25063             : 
   25064           0 : static PyObject *py_DcSitesCtr_get_sites(PyObject *obj, void *closure)
   25065             : {
   25066           0 :         struct DcSitesCtr *object = (struct DcSitesCtr *)pytalloc_get_ptr(obj);
   25067             :         PyObject *py_sites;
   25068           0 :         if (object->sites == NULL) {
   25069           0 :                 Py_RETURN_NONE;
   25070             :         }
   25071           0 :         if (object->sites == NULL) {
   25072           0 :                 py_sites = Py_None;
   25073           0 :                 Py_INCREF(py_sites);
   25074             :         } else {
   25075           0 :                 py_sites = PyList_New(object->num_sites);
   25076           0 :                 if (py_sites == NULL) {
   25077           0 :                         return NULL;
   25078             :                 }
   25079             :                 {
   25080             :                         int sites_cntr_1;
   25081           0 :                         for (sites_cntr_1 = 0; sites_cntr_1 < (object->num_sites); sites_cntr_1++) {
   25082             :                                 PyObject *py_sites_1;
   25083           0 :                                 py_sites_1 = pytalloc_reference_ex(lsa_String_Type, object->sites, &object->sites[sites_cntr_1]);
   25084           0 :                                 PyList_SetItem(py_sites, sites_cntr_1, py_sites_1);
   25085             :                         }
   25086             :                 }
   25087             :         }
   25088           0 :         return py_sites;
   25089             : }
   25090             : 
   25091           0 : static int py_DcSitesCtr_set_sites(PyObject *py_obj, PyObject *value, void *closure)
   25092             : {
   25093           0 :         struct DcSitesCtr *object = (struct DcSitesCtr *)pytalloc_get_ptr(py_obj);
   25094           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sites));
   25095           0 :         if (value == NULL) {
   25096           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sites");
   25097           0 :                 return -1;
   25098             :         }
   25099           0 :         if (value == Py_None) {
   25100           0 :                 object->sites = NULL;
   25101             :         } else {
   25102           0 :                 object->sites = NULL;
   25103           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   25104             :                 {
   25105             :                         int sites_cntr_1;
   25106           0 :                         object->sites = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sites, PyList_GET_SIZE(value));
   25107           0 :                         if (!object->sites) { return -1;; }
   25108           0 :                         talloc_set_name_const(object->sites, "ARRAY: object->sites");
   25109           0 :                         for (sites_cntr_1 = 0; sites_cntr_1 < PyList_GET_SIZE(value); sites_cntr_1++) {
   25110           0 :                                 if (PyList_GET_ITEM(value, sites_cntr_1) == NULL) {
   25111           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sites[sites_cntr_1]");
   25112           0 :                                         return -1;
   25113             :                                 }
   25114           0 :                                 PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, sites_cntr_1), return -1;);
   25115           0 :                                 if (talloc_reference(object->sites, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sites_cntr_1))) == NULL) {
   25116           0 :                                         PyErr_NoMemory();
   25117           0 :                                         return -1;
   25118             :                                 }
   25119           0 :                                 object->sites[sites_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, sites_cntr_1));
   25120             :                         }
   25121             :                 }
   25122             :         }
   25123           0 :         return 0;
   25124             : }
   25125             : 
   25126             : static PyGetSetDef py_DcSitesCtr_getsetters[] = {
   25127             :         {
   25128             :                 .name = discard_const_p(char, "num_sites"),
   25129             :                 .get = py_DcSitesCtr_get_num_sites,
   25130             :                 .set = py_DcSitesCtr_set_num_sites,
   25131             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25132             :         },
   25133             :         {
   25134             :                 .name = discard_const_p(char, "sites"),
   25135             :                 .get = py_DcSitesCtr_get_sites,
   25136             :                 .set = py_DcSitesCtr_set_sites,
   25137             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   25138             :         },
   25139             :         { .name = NULL }
   25140             : };
   25141             : 
   25142           0 : static PyObject *py_DcSitesCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25143             : {
   25144           0 :         return pytalloc_new(struct DcSitesCtr, type);
   25145             : }
   25146             : 
   25147             : 
   25148             : static PyTypeObject DcSitesCtr_Type = {
   25149             :         PyVarObject_HEAD_INIT(NULL, 0)
   25150             :         .tp_name = "netlogon.DcSitesCtr",
   25151             :         .tp_getset = py_DcSitesCtr_getsetters,
   25152             :         .tp_methods = NULL,
   25153             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   25154             :         .tp_new = py_DcSitesCtr_new,
   25155             : };
   25156             : 
   25157             : 
   25158           0 : static PyObject *py_netr_TrustInfo_get_count(PyObject *obj, void *closure)
   25159             : {
   25160           0 :         struct netr_TrustInfo *object = (struct netr_TrustInfo *)pytalloc_get_ptr(obj);
   25161             :         PyObject *py_count;
   25162           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
   25163           0 :         return py_count;
   25164             : }
   25165             : 
   25166           0 : static int py_netr_TrustInfo_set_count(PyObject *py_obj, PyObject *value, void *closure)
   25167             : {
   25168           0 :         struct netr_TrustInfo *object = (struct netr_TrustInfo *)pytalloc_get_ptr(py_obj);
   25169           0 :         if (value == NULL) {
   25170           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   25171           0 :                 return -1;
   25172             :         }
   25173             :         {
   25174           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   25175           0 :                 if (PyLong_Check(value)) {
   25176             :                         unsigned long long test_var;
   25177           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25178           0 :                         if (PyErr_Occurred() != NULL) {
   25179           0 :                                 return -1;
   25180             :                         }
   25181           0 :                         if (test_var > uint_max) {
   25182           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   25183             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25184           0 :                                 return -1;
   25185             :                         }
   25186           0 :                         object->count = test_var;
   25187             :                 } else {
   25188           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   25189             :                           PyLong_Type.tp_name);
   25190           0 :                         return -1;
   25191             :                 }
   25192             :         }
   25193           0 :         return 0;
   25194             : }
   25195             : 
   25196           0 : static PyObject *py_netr_TrustInfo_get_data(PyObject *obj, void *closure)
   25197             : {
   25198           0 :         struct netr_TrustInfo *object = (struct netr_TrustInfo *)pytalloc_get_ptr(obj);
   25199             :         PyObject *py_data;
   25200           0 :         if (object->data == NULL) {
   25201           0 :                 Py_RETURN_NONE;
   25202             :         }
   25203           0 :         if (object->data == NULL) {
   25204           0 :                 py_data = Py_None;
   25205           0 :                 Py_INCREF(py_data);
   25206             :         } else {
   25207           0 :                 py_data = PyList_New(object->count);
   25208           0 :                 if (py_data == NULL) {
   25209           0 :                         return NULL;
   25210             :                 }
   25211             :                 {
   25212             :                         int data_cntr_1;
   25213           0 :                         for (data_cntr_1 = 0; data_cntr_1 < (object->count); data_cntr_1++) {
   25214             :                                 PyObject *py_data_1;
   25215           0 :                                 py_data_1 = PyLong_FromUnsignedLongLong((uint32_t)object->data[data_cntr_1]);
   25216           0 :                                 PyList_SetItem(py_data, data_cntr_1, py_data_1);
   25217             :                         }
   25218             :                 }
   25219             :         }
   25220           0 :         return py_data;
   25221             : }
   25222             : 
   25223           0 : static int py_netr_TrustInfo_set_data(PyObject *py_obj, PyObject *value, void *closure)
   25224             : {
   25225           0 :         struct netr_TrustInfo *object = (struct netr_TrustInfo *)pytalloc_get_ptr(py_obj);
   25226           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->data));
   25227           0 :         if (value == NULL) {
   25228           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data");
   25229           0 :                 return -1;
   25230             :         }
   25231           0 :         if (value == Py_None) {
   25232           0 :                 object->data = NULL;
   25233             :         } else {
   25234           0 :                 object->data = NULL;
   25235           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   25236             :                 {
   25237             :                         int data_cntr_1;
   25238           0 :                         object->data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->data, PyList_GET_SIZE(value));
   25239           0 :                         if (!object->data) { return -1;; }
   25240           0 :                         talloc_set_name_const(object->data, "ARRAY: object->data");
   25241           0 :                         for (data_cntr_1 = 0; data_cntr_1 < PyList_GET_SIZE(value); data_cntr_1++) {
   25242           0 :                                 if (PyList_GET_ITEM(value, data_cntr_1) == NULL) {
   25243           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data[data_cntr_1]");
   25244           0 :                                         return -1;
   25245             :                                 }
   25246             :                                 {
   25247           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->data[data_cntr_1]));
   25248           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, data_cntr_1))) {
   25249             :                                                 unsigned long long test_var;
   25250           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, data_cntr_1));
   25251           0 :                                                 if (PyErr_Occurred() != NULL) {
   25252           0 :                                                         return -1;
   25253             :                                                 }
   25254           0 :                                                 if (test_var > uint_max) {
   25255           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   25256             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   25257           0 :                                                         return -1;
   25258             :                                                 }
   25259           0 :                                                 object->data[data_cntr_1] = test_var;
   25260             :                                         } else {
   25261           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",\
   25262             :                                                   PyLong_Type.tp_name);
   25263           0 :                                                 return -1;
   25264             :                                         }
   25265             :                                 }
   25266             :                         }
   25267             :                 }
   25268             :         }
   25269           0 :         return 0;
   25270             : }
   25271             : 
   25272           0 : static PyObject *py_netr_TrustInfo_get_entry_count(PyObject *obj, void *closure)
   25273             : {
   25274           0 :         struct netr_TrustInfo *object = (struct netr_TrustInfo *)pytalloc_get_ptr(obj);
   25275             :         PyObject *py_entry_count;
   25276           0 :         py_entry_count = PyLong_FromUnsignedLongLong((uint32_t)object->entry_count);
   25277           0 :         return py_entry_count;
   25278             : }
   25279             : 
   25280           0 : static int py_netr_TrustInfo_set_entry_count(PyObject *py_obj, PyObject *value, void *closure)
   25281             : {
   25282           0 :         struct netr_TrustInfo *object = (struct netr_TrustInfo *)pytalloc_get_ptr(py_obj);
   25283           0 :         if (value == NULL) {
   25284           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->entry_count");
   25285           0 :                 return -1;
   25286             :         }
   25287             :         {
   25288           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->entry_count));
   25289           0 :                 if (PyLong_Check(value)) {
   25290             :                         unsigned long long test_var;
   25291           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25292           0 :                         if (PyErr_Occurred() != NULL) {
   25293           0 :                                 return -1;
   25294             :                         }
   25295           0 :                         if (test_var > uint_max) {
   25296           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   25297             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25298           0 :                                 return -1;
   25299             :                         }
   25300           0 :                         object->entry_count = test_var;
   25301             :                 } else {
   25302           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   25303             :                           PyLong_Type.tp_name);
   25304           0 :                         return -1;
   25305             :                 }
   25306             :         }
   25307           0 :         return 0;
   25308             : }
   25309             : 
   25310           0 : static PyObject *py_netr_TrustInfo_get_entries(PyObject *obj, void *closure)
   25311             : {
   25312           0 :         struct netr_TrustInfo *object = (struct netr_TrustInfo *)pytalloc_get_ptr(obj);
   25313             :         PyObject *py_entries;
   25314           0 :         if (object->entries == NULL) {
   25315           0 :                 Py_RETURN_NONE;
   25316             :         }
   25317           0 :         if (object->entries == NULL) {
   25318           0 :                 py_entries = Py_None;
   25319           0 :                 Py_INCREF(py_entries);
   25320             :         } else {
   25321           0 :                 py_entries = PyList_New(object->count);
   25322           0 :                 if (py_entries == NULL) {
   25323           0 :                         return NULL;
   25324             :                 }
   25325             :                 {
   25326             :                         int entries_cntr_1;
   25327           0 :                         for (entries_cntr_1 = 0; entries_cntr_1 < (object->count); entries_cntr_1++) {
   25328             :                                 PyObject *py_entries_1;
   25329           0 :                                 py_entries_1 = pytalloc_reference_ex(lsa_String_Type, object->entries, &object->entries[entries_cntr_1]);
   25330           0 :                                 PyList_SetItem(py_entries, entries_cntr_1, py_entries_1);
   25331             :                         }
   25332             :                 }
   25333             :         }
   25334           0 :         return py_entries;
   25335             : }
   25336             : 
   25337           0 : static int py_netr_TrustInfo_set_entries(PyObject *py_obj, PyObject *value, void *closure)
   25338             : {
   25339           0 :         struct netr_TrustInfo *object = (struct netr_TrustInfo *)pytalloc_get_ptr(py_obj);
   25340           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->entries));
   25341           0 :         if (value == NULL) {
   25342           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->entries");
   25343           0 :                 return -1;
   25344             :         }
   25345           0 :         if (value == Py_None) {
   25346           0 :                 object->entries = NULL;
   25347             :         } else {
   25348           0 :                 object->entries = NULL;
   25349           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   25350             :                 {
   25351             :                         int entries_cntr_1;
   25352           0 :                         object->entries = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->entries, PyList_GET_SIZE(value));
   25353           0 :                         if (!object->entries) { return -1;; }
   25354           0 :                         talloc_set_name_const(object->entries, "ARRAY: object->entries");
   25355           0 :                         for (entries_cntr_1 = 0; entries_cntr_1 < PyList_GET_SIZE(value); entries_cntr_1++) {
   25356           0 :                                 if (PyList_GET_ITEM(value, entries_cntr_1) == NULL) {
   25357           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->entries[entries_cntr_1]");
   25358           0 :                                         return -1;
   25359             :                                 }
   25360           0 :                                 PY_CHECK_TYPE(lsa_String_Type, PyList_GET_ITEM(value, entries_cntr_1), return -1;);
   25361           0 :                                 if (talloc_reference(object->entries, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, entries_cntr_1))) == NULL) {
   25362           0 :                                         PyErr_NoMemory();
   25363           0 :                                         return -1;
   25364             :                                 }
   25365           0 :                                 object->entries[entries_cntr_1] = *(struct lsa_String *)pytalloc_get_ptr(PyList_GET_ITEM(value, entries_cntr_1));
   25366             :                         }
   25367             :                 }
   25368             :         }
   25369           0 :         return 0;
   25370             : }
   25371             : 
   25372             : static PyGetSetDef py_netr_TrustInfo_getsetters[] = {
   25373             :         {
   25374             :                 .name = discard_const_p(char, "count"),
   25375             :                 .get = py_netr_TrustInfo_get_count,
   25376             :                 .set = py_netr_TrustInfo_set_count,
   25377             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25378             :         },
   25379             :         {
   25380             :                 .name = discard_const_p(char, "data"),
   25381             :                 .get = py_netr_TrustInfo_get_data,
   25382             :                 .set = py_netr_TrustInfo_set_data,
   25383             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25384             :         },
   25385             :         {
   25386             :                 .name = discard_const_p(char, "entry_count"),
   25387             :                 .get = py_netr_TrustInfo_get_entry_count,
   25388             :                 .set = py_netr_TrustInfo_set_entry_count,
   25389             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25390             :         },
   25391             :         {
   25392             :                 .name = discard_const_p(char, "entries"),
   25393             :                 .get = py_netr_TrustInfo_get_entries,
   25394             :                 .set = py_netr_TrustInfo_set_entries,
   25395             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   25396             :         },
   25397             :         { .name = NULL }
   25398             : };
   25399             : 
   25400           0 : static PyObject *py_netr_TrustInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25401             : {
   25402           0 :         return pytalloc_new(struct netr_TrustInfo, type);
   25403             : }
   25404             : 
   25405             : 
   25406             : static PyTypeObject netr_TrustInfo_Type = {
   25407             :         PyVarObject_HEAD_INIT(NULL, 0)
   25408             :         .tp_name = "netlogon.netr_TrustInfo",
   25409             :         .tp_getset = py_netr_TrustInfo_getsetters,
   25410             :         .tp_methods = NULL,
   25411             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   25412             :         .tp_new = py_netr_TrustInfo_new,
   25413             : };
   25414             : 
   25415             : 
   25416           0 : static PyObject *py_NL_DNS_NAME_INFO_get_type(PyObject *obj, void *closure)
   25417             : {
   25418           0 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(obj);
   25419             :         PyObject *py_type;
   25420           0 :         py_type = PyLong_FromLong((uint16_t)object->type);
   25421           0 :         return py_type;
   25422             : }
   25423             : 
   25424           4 : static int py_NL_DNS_NAME_INFO_set_type(PyObject *py_obj, PyObject *value, void *closure)
   25425             : {
   25426           4 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(py_obj);
   25427           4 :         if (value == NULL) {
   25428           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->type");
   25429           0 :                 return -1;
   25430             :         }
   25431             :         {
   25432           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
   25433           4 :                 if (PyLong_Check(value)) {
   25434             :                         unsigned long long test_var;
   25435           4 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25436           4 :                         if (PyErr_Occurred() != NULL) {
   25437           0 :                                 return -1;
   25438             :                         }
   25439           4 :                         if (test_var > uint_max) {
   25440           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   25441             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25442           0 :                                 return -1;
   25443             :                         }
   25444           4 :                         object->type = test_var;
   25445             :                 } else {
   25446           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   25447             :                           PyLong_Type.tp_name);
   25448           0 :                         return -1;
   25449             :                 }
   25450             :         }
   25451           4 :         return 0;
   25452             : }
   25453             : 
   25454           0 : static PyObject *py_NL_DNS_NAME_INFO_get_dns_domain_info(PyObject *obj, void *closure)
   25455             : {
   25456           0 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(obj);
   25457             :         PyObject *py_dns_domain_info;
   25458           0 :         if (object->dns_domain_info == NULL) {
   25459           0 :                 Py_RETURN_NONE;
   25460             :         }
   25461           0 :         if (object->dns_domain_info == NULL) {
   25462           0 :                 py_dns_domain_info = Py_None;
   25463           0 :                 Py_INCREF(py_dns_domain_info);
   25464             :         } else {
   25465           0 :                 if (object->dns_domain_info == NULL) {
   25466           0 :                         py_dns_domain_info = Py_None;
   25467           0 :                         Py_INCREF(py_dns_domain_info);
   25468             :                 } else {
   25469           0 :                         py_dns_domain_info = PyUnicode_Decode(object->dns_domain_info, strlen(object->dns_domain_info), "utf-8", "ignore");
   25470             :                 }
   25471             :         }
   25472           0 :         return py_dns_domain_info;
   25473             : }
   25474             : 
   25475           0 : static int py_NL_DNS_NAME_INFO_set_dns_domain_info(PyObject *py_obj, PyObject *value, void *closure)
   25476             : {
   25477           0 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(py_obj);
   25478           0 :         if (value == NULL) {
   25479           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_domain_info");
   25480           0 :                 return -1;
   25481             :         }
   25482           0 :         if (value == Py_None) {
   25483           0 :                 object->dns_domain_info = NULL;
   25484             :         } else {
   25485           0 :                 object->dns_domain_info = NULL;
   25486             :                 {
   25487             :                         const char *test_str;
   25488             :                         const char *talloc_str;
   25489           0 :                         PyObject *unicode = NULL;
   25490           0 :                         if (PyUnicode_Check(value)) {
   25491           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   25492           0 :                                 if (unicode == NULL) {
   25493           0 :                                         PyErr_NoMemory();
   25494           0 :                                         return -1;
   25495             :                                 }
   25496           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   25497           0 :                         } else if (PyBytes_Check(value)) {
   25498           0 :                                 test_str = PyBytes_AS_STRING(value);
   25499             :                         } else {
   25500           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   25501           0 :                                 return -1;
   25502             :                         }
   25503           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   25504           0 :                         if (unicode != NULL) {
   25505           0 :                                 Py_DECREF(unicode);
   25506             :                         }
   25507           0 :                         if (talloc_str == NULL) {
   25508           0 :                                 PyErr_NoMemory();
   25509           0 :                                 return -1;
   25510             :                         }
   25511           0 :                         object->dns_domain_info = talloc_str;
   25512             :                 }
   25513             :         }
   25514           0 :         return 0;
   25515             : }
   25516             : 
   25517           0 : static PyObject *py_NL_DNS_NAME_INFO_get_dns_domain_info_type(PyObject *obj, void *closure)
   25518             : {
   25519           0 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(obj);
   25520             :         PyObject *py_dns_domain_info_type;
   25521           0 :         py_dns_domain_info_type = PyLong_FromLong((uint16_t)object->dns_domain_info_type);
   25522           0 :         return py_dns_domain_info_type;
   25523             : }
   25524             : 
   25525           4 : static int py_NL_DNS_NAME_INFO_set_dns_domain_info_type(PyObject *py_obj, PyObject *value, void *closure)
   25526             : {
   25527           4 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(py_obj);
   25528           4 :         if (value == NULL) {
   25529           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_domain_info_type");
   25530           0 :                 return -1;
   25531             :         }
   25532             :         {
   25533           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dns_domain_info_type));
   25534           4 :                 if (PyLong_Check(value)) {
   25535             :                         unsigned long long test_var;
   25536           4 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25537           4 :                         if (PyErr_Occurred() != NULL) {
   25538           0 :                                 return -1;
   25539             :                         }
   25540           4 :                         if (test_var > uint_max) {
   25541           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   25542             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25543           0 :                                 return -1;
   25544             :                         }
   25545           4 :                         object->dns_domain_info_type = test_var;
   25546             :                 } else {
   25547           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   25548             :                           PyLong_Type.tp_name);
   25549           0 :                         return -1;
   25550             :                 }
   25551             :         }
   25552           4 :         return 0;
   25553             : }
   25554             : 
   25555           0 : static PyObject *py_NL_DNS_NAME_INFO_get_priority(PyObject *obj, void *closure)
   25556             : {
   25557           0 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(obj);
   25558             :         PyObject *py_priority;
   25559           0 :         py_priority = PyLong_FromUnsignedLongLong((uint32_t)object->priority);
   25560           0 :         return py_priority;
   25561             : }
   25562             : 
   25563           4 : static int py_NL_DNS_NAME_INFO_set_priority(PyObject *py_obj, PyObject *value, void *closure)
   25564             : {
   25565           4 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(py_obj);
   25566           4 :         if (value == NULL) {
   25567           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->priority");
   25568           0 :                 return -1;
   25569             :         }
   25570             :         {
   25571           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->priority));
   25572           4 :                 if (PyLong_Check(value)) {
   25573             :                         unsigned long long test_var;
   25574           4 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25575           4 :                         if (PyErr_Occurred() != NULL) {
   25576           0 :                                 return -1;
   25577             :                         }
   25578           4 :                         if (test_var > uint_max) {
   25579           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   25580             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25581           0 :                                 return -1;
   25582             :                         }
   25583           4 :                         object->priority = test_var;
   25584             :                 } else {
   25585           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   25586             :                           PyLong_Type.tp_name);
   25587           0 :                         return -1;
   25588             :                 }
   25589             :         }
   25590           4 :         return 0;
   25591             : }
   25592             : 
   25593           0 : static PyObject *py_NL_DNS_NAME_INFO_get_weight(PyObject *obj, void *closure)
   25594             : {
   25595           0 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(obj);
   25596             :         PyObject *py_weight;
   25597           0 :         py_weight = PyLong_FromUnsignedLongLong((uint32_t)object->weight);
   25598           0 :         return py_weight;
   25599             : }
   25600             : 
   25601           4 : static int py_NL_DNS_NAME_INFO_set_weight(PyObject *py_obj, PyObject *value, void *closure)
   25602             : {
   25603           4 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(py_obj);
   25604           4 :         if (value == NULL) {
   25605           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->weight");
   25606           0 :                 return -1;
   25607             :         }
   25608             :         {
   25609           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->weight));
   25610           4 :                 if (PyLong_Check(value)) {
   25611             :                         unsigned long long test_var;
   25612           4 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25613           4 :                         if (PyErr_Occurred() != NULL) {
   25614           0 :                                 return -1;
   25615             :                         }
   25616           4 :                         if (test_var > uint_max) {
   25617           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   25618             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25619           0 :                                 return -1;
   25620             :                         }
   25621           4 :                         object->weight = test_var;
   25622             :                 } else {
   25623           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   25624             :                           PyLong_Type.tp_name);
   25625           0 :                         return -1;
   25626             :                 }
   25627             :         }
   25628           4 :         return 0;
   25629             : }
   25630             : 
   25631           0 : static PyObject *py_NL_DNS_NAME_INFO_get_port(PyObject *obj, void *closure)
   25632             : {
   25633           0 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(obj);
   25634             :         PyObject *py_port;
   25635           0 :         py_port = PyLong_FromUnsignedLongLong((uint32_t)object->port);
   25636           0 :         return py_port;
   25637             : }
   25638             : 
   25639           4 : static int py_NL_DNS_NAME_INFO_set_port(PyObject *py_obj, PyObject *value, void *closure)
   25640             : {
   25641           4 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(py_obj);
   25642           4 :         if (value == NULL) {
   25643           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->port");
   25644           0 :                 return -1;
   25645             :         }
   25646             :         {
   25647           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->port));
   25648           4 :                 if (PyLong_Check(value)) {
   25649             :                         unsigned long long test_var;
   25650           4 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25651           4 :                         if (PyErr_Occurred() != NULL) {
   25652           0 :                                 return -1;
   25653             :                         }
   25654           4 :                         if (test_var > uint_max) {
   25655           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   25656             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25657           0 :                                 return -1;
   25658             :                         }
   25659           4 :                         object->port = test_var;
   25660             :                 } else {
   25661           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   25662             :                           PyLong_Type.tp_name);
   25663           0 :                         return -1;
   25664             :                 }
   25665             :         }
   25666           4 :         return 0;
   25667             : }
   25668             : 
   25669           0 : static PyObject *py_NL_DNS_NAME_INFO_get_dns_register(PyObject *obj, void *closure)
   25670             : {
   25671           0 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(obj);
   25672             :         PyObject *py_dns_register;
   25673           0 :         py_dns_register = PyLong_FromUnsignedLongLong((uint32_t)object->dns_register);
   25674           0 :         return py_dns_register;
   25675             : }
   25676             : 
   25677           4 : static int py_NL_DNS_NAME_INFO_set_dns_register(PyObject *py_obj, PyObject *value, void *closure)
   25678             : {
   25679           4 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(py_obj);
   25680           4 :         if (value == NULL) {
   25681           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_register");
   25682           0 :                 return -1;
   25683             :         }
   25684             :         {
   25685           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dns_register));
   25686           4 :                 if (PyLong_Check(value)) {
   25687             :                         unsigned long long test_var;
   25688           4 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25689           4 :                         if (PyErr_Occurred() != NULL) {
   25690           0 :                                 return -1;
   25691             :                         }
   25692           4 :                         if (test_var > uint_max) {
   25693           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   25694             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25695           0 :                                 return -1;
   25696             :                         }
   25697           4 :                         object->dns_register = test_var;
   25698             :                 } else {
   25699           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   25700             :                           PyLong_Type.tp_name);
   25701           0 :                         return -1;
   25702             :                 }
   25703             :         }
   25704           4 :         return 0;
   25705             : }
   25706             : 
   25707           8 : static PyObject *py_NL_DNS_NAME_INFO_get_status(PyObject *obj, void *closure)
   25708             : {
   25709           8 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(obj);
   25710             :         PyObject *py_status;
   25711           8 :         py_status = PyLong_FromUnsignedLongLong((uint32_t)object->status);
   25712           8 :         return py_status;
   25713             : }
   25714             : 
   25715           0 : static int py_NL_DNS_NAME_INFO_set_status(PyObject *py_obj, PyObject *value, void *closure)
   25716             : {
   25717           0 :         struct NL_DNS_NAME_INFO *object = (struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(py_obj);
   25718           0 :         if (value == NULL) {
   25719           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->status");
   25720           0 :                 return -1;
   25721             :         }
   25722             :         {
   25723           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->status));
   25724           0 :                 if (PyLong_Check(value)) {
   25725             :                         unsigned long long test_var;
   25726           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25727           0 :                         if (PyErr_Occurred() != NULL) {
   25728           0 :                                 return -1;
   25729             :                         }
   25730           0 :                         if (test_var > uint_max) {
   25731           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   25732             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25733           0 :                                 return -1;
   25734             :                         }
   25735           0 :                         object->status = test_var;
   25736             :                 } else {
   25737           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   25738             :                           PyLong_Type.tp_name);
   25739           0 :                         return -1;
   25740             :                 }
   25741             :         }
   25742           0 :         return 0;
   25743             : }
   25744             : 
   25745             : static PyGetSetDef py_NL_DNS_NAME_INFO_getsetters[] = {
   25746             :         {
   25747             :                 .name = discard_const_p(char, "type"),
   25748             :                 .get = py_NL_DNS_NAME_INFO_get_type,
   25749             :                 .set = py_NL_DNS_NAME_INFO_set_type,
   25750             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DnsType")
   25751             :         },
   25752             :         {
   25753             :                 .name = discard_const_p(char, "dns_domain_info"),
   25754             :                 .get = py_NL_DNS_NAME_INFO_get_dns_domain_info,
   25755             :                 .set = py_NL_DNS_NAME_INFO_set_dns_domain_info,
   25756             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   25757             :         },
   25758             :         {
   25759             :                 .name = discard_const_p(char, "dns_domain_info_type"),
   25760             :                 .get = py_NL_DNS_NAME_INFO_get_dns_domain_info_type,
   25761             :                 .set = py_NL_DNS_NAME_INFO_set_dns_domain_info_type,
   25762             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DnsDomainInfoType")
   25763             :         },
   25764             :         {
   25765             :                 .name = discard_const_p(char, "priority"),
   25766             :                 .get = py_NL_DNS_NAME_INFO_get_priority,
   25767             :                 .set = py_NL_DNS_NAME_INFO_set_priority,
   25768             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25769             :         },
   25770             :         {
   25771             :                 .name = discard_const_p(char, "weight"),
   25772             :                 .get = py_NL_DNS_NAME_INFO_get_weight,
   25773             :                 .set = py_NL_DNS_NAME_INFO_set_weight,
   25774             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25775             :         },
   25776             :         {
   25777             :                 .name = discard_const_p(char, "port"),
   25778             :                 .get = py_NL_DNS_NAME_INFO_get_port,
   25779             :                 .set = py_NL_DNS_NAME_INFO_set_port,
   25780             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25781             :         },
   25782             :         {
   25783             :                 .name = discard_const_p(char, "dns_register"),
   25784             :                 .get = py_NL_DNS_NAME_INFO_get_dns_register,
   25785             :                 .set = py_NL_DNS_NAME_INFO_set_dns_register,
   25786             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25787             :         },
   25788             :         {
   25789             :                 .name = discard_const_p(char, "status"),
   25790             :                 .get = py_NL_DNS_NAME_INFO_get_status,
   25791             :                 .set = py_NL_DNS_NAME_INFO_set_status,
   25792             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25793             :         },
   25794             :         { .name = NULL }
   25795             : };
   25796             : 
   25797           4 : static PyObject *py_NL_DNS_NAME_INFO_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25798             : {
   25799           4 :         return pytalloc_new(struct NL_DNS_NAME_INFO, type);
   25800             : }
   25801             : 
   25802             : 
   25803             : static PyTypeObject NL_DNS_NAME_INFO_Type = {
   25804             :         PyVarObject_HEAD_INIT(NULL, 0)
   25805             :         .tp_name = "netlogon.NL_DNS_NAME_INFO",
   25806             :         .tp_getset = py_NL_DNS_NAME_INFO_getsetters,
   25807             :         .tp_methods = NULL,
   25808             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   25809             :         .tp_new = py_NL_DNS_NAME_INFO_new,
   25810             : };
   25811             : 
   25812             : 
   25813           0 : static PyObject *py_NL_DNS_NAME_INFO_ARRAY_get_count(PyObject *obj, void *closure)
   25814             : {
   25815           0 :         struct NL_DNS_NAME_INFO_ARRAY *object = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(obj);
   25816             :         PyObject *py_count;
   25817           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
   25818           0 :         return py_count;
   25819             : }
   25820             : 
   25821           4 : static int py_NL_DNS_NAME_INFO_ARRAY_set_count(PyObject *py_obj, PyObject *value, void *closure)
   25822             : {
   25823           4 :         struct NL_DNS_NAME_INFO_ARRAY *object = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(py_obj);
   25824           4 :         if (value == NULL) {
   25825           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   25826           0 :                 return -1;
   25827             :         }
   25828             :         {
   25829           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   25830           4 :                 if (PyLong_Check(value)) {
   25831             :                         unsigned long long test_var;
   25832           4 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25833           4 :                         if (PyErr_Occurred() != NULL) {
   25834           0 :                                 return -1;
   25835             :                         }
   25836           4 :                         if (test_var > uint_max) {
   25837           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   25838             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25839           0 :                                 return -1;
   25840             :                         }
   25841           4 :                         object->count = test_var;
   25842             :                 } else {
   25843           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   25844             :                           PyLong_Type.tp_name);
   25845           0 :                         return -1;
   25846             :                 }
   25847             :         }
   25848           4 :         return 0;
   25849             : }
   25850             : 
   25851           8 : static PyObject *py_NL_DNS_NAME_INFO_ARRAY_get_names(PyObject *obj, void *closure)
   25852             : {
   25853           8 :         struct NL_DNS_NAME_INFO_ARRAY *object = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(obj);
   25854             :         PyObject *py_names;
   25855           8 :         if (object->names == NULL) {
   25856           0 :                 Py_RETURN_NONE;
   25857             :         }
   25858           8 :         if (object->names == NULL) {
   25859           0 :                 py_names = Py_None;
   25860           0 :                 Py_INCREF(py_names);
   25861             :         } else {
   25862           8 :                 py_names = PyList_New(object->count);
   25863           8 :                 if (py_names == NULL) {
   25864           0 :                         return NULL;
   25865             :                 }
   25866             :                 {
   25867             :                         int names_cntr_1;
   25868          16 :                         for (names_cntr_1 = 0; names_cntr_1 < (object->count); names_cntr_1++) {
   25869             :                                 PyObject *py_names_1;
   25870           8 :                                 py_names_1 = pytalloc_reference_ex(&NL_DNS_NAME_INFO_Type, object->names, &object->names[names_cntr_1]);
   25871           8 :                                 PyList_SetItem(py_names, names_cntr_1, py_names_1);
   25872             :                         }
   25873             :                 }
   25874             :         }
   25875           8 :         return py_names;
   25876             : }
   25877             : 
   25878           4 : static int py_NL_DNS_NAME_INFO_ARRAY_set_names(PyObject *py_obj, PyObject *value, void *closure)
   25879             : {
   25880           4 :         struct NL_DNS_NAME_INFO_ARRAY *object = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(py_obj);
   25881           4 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->names));
   25882           4 :         if (value == NULL) {
   25883           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->names");
   25884           0 :                 return -1;
   25885             :         }
   25886           4 :         if (value == Py_None) {
   25887           0 :                 object->names = NULL;
   25888             :         } else {
   25889           4 :                 object->names = NULL;
   25890           4 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   25891             :                 {
   25892             :                         int names_cntr_1;
   25893           4 :                         object->names = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->names, PyList_GET_SIZE(value));
   25894           4 :                         if (!object->names) { return -1;; }
   25895           4 :                         talloc_set_name_const(object->names, "ARRAY: object->names");
   25896           8 :                         for (names_cntr_1 = 0; names_cntr_1 < PyList_GET_SIZE(value); names_cntr_1++) {
   25897           4 :                                 if (PyList_GET_ITEM(value, names_cntr_1) == NULL) {
   25898           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->names[names_cntr_1]");
   25899           0 :                                         return -1;
   25900             :                                 }
   25901           4 :                                 PY_CHECK_TYPE(&NL_DNS_NAME_INFO_Type, PyList_GET_ITEM(value, names_cntr_1), return -1;);
   25902           4 :                                 if (talloc_reference(object->names, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, names_cntr_1))) == NULL) {
   25903           0 :                                         PyErr_NoMemory();
   25904           0 :                                         return -1;
   25905             :                                 }
   25906           4 :                                 object->names[names_cntr_1] = *(struct NL_DNS_NAME_INFO *)pytalloc_get_ptr(PyList_GET_ITEM(value, names_cntr_1));
   25907             :                         }
   25908             :                 }
   25909             :         }
   25910           4 :         return 0;
   25911             : }
   25912             : 
   25913             : static PyGetSetDef py_NL_DNS_NAME_INFO_ARRAY_getsetters[] = {
   25914             :         {
   25915             :                 .name = discard_const_p(char, "count"),
   25916             :                 .get = py_NL_DNS_NAME_INFO_ARRAY_get_count,
   25917             :                 .set = py_NL_DNS_NAME_INFO_ARRAY_set_count,
   25918             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25919             :         },
   25920             :         {
   25921             :                 .name = discard_const_p(char, "names"),
   25922             :                 .get = py_NL_DNS_NAME_INFO_ARRAY_get_names,
   25923             :                 .set = py_NL_DNS_NAME_INFO_ARRAY_set_names,
   25924             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NL_DNS_NAME_INFO")
   25925             :         },
   25926             :         { .name = NULL }
   25927             : };
   25928             : 
   25929           4 : static PyObject *py_NL_DNS_NAME_INFO_ARRAY_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25930             : {
   25931           4 :         return pytalloc_new(struct NL_DNS_NAME_INFO_ARRAY, type);
   25932             : }
   25933             : 
   25934           0 : static PyObject *py_NL_DNS_NAME_INFO_ARRAY_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   25935             : {
   25936           0 :         struct NL_DNS_NAME_INFO_ARRAY *object = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(py_obj);
   25937           0 :         PyObject *ret = NULL;
   25938             :         DATA_BLOB blob;
   25939             :         enum ndr_err_code err;
   25940           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   25941           0 :         if (tmp_ctx == NULL) {
   25942           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   25943           0 :                 return NULL;
   25944             :         }
   25945           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_NL_DNS_NAME_INFO_ARRAY);
   25946           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   25947           0 :                 TALLOC_FREE(tmp_ctx);
   25948           0 :                 PyErr_SetNdrError(err);
   25949           0 :                 return NULL;
   25950             :         }
   25951             : 
   25952           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   25953           0 :         TALLOC_FREE(tmp_ctx);
   25954           0 :         return ret;
   25955             : }
   25956             : 
   25957           0 : static PyObject *py_NL_DNS_NAME_INFO_ARRAY_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   25958             : {
   25959           0 :         struct NL_DNS_NAME_INFO_ARRAY *object = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(py_obj);
   25960           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   25961           0 :         Py_ssize_t blob_length = 0;
   25962             :         enum ndr_err_code err;
   25963           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   25964           0 :         PyObject *allow_remaining_obj = NULL;
   25965           0 :         bool allow_remaining = false;
   25966             : 
   25967           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   25968             :                 discard_const_p(char *, kwnames),
   25969             :                 &blob.data, &blob_length,
   25970             :                 &allow_remaining_obj)) {
   25971           0 :                 return NULL;
   25972             :         }
   25973           0 :         blob.length = blob_length;
   25974             : 
   25975           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   25976           0 :                 allow_remaining = true;
   25977             :         }
   25978             : 
   25979           0 :         if (allow_remaining) {
   25980           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);
   25981             :         } else {
   25982           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);
   25983             :         }
   25984           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   25985           0 :                 PyErr_SetNdrError(err);
   25986           0 :                 return NULL;
   25987             :         }
   25988             : 
   25989           0 :         Py_RETURN_NONE;
   25990             : }
   25991             : 
   25992           0 : static PyObject *py_NL_DNS_NAME_INFO_ARRAY_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   25993             : {
   25994           0 :         struct NL_DNS_NAME_INFO_ARRAY *object = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(py_obj);
   25995             :         PyObject *ret;
   25996             :         char *retstr;
   25997             : 
   25998           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);
   25999           0 :         ret = PyUnicode_FromString(retstr);
   26000           0 :         talloc_free(retstr);
   26001             : 
   26002           0 :         return ret;
   26003             : }
   26004             : 
   26005             : static PyMethodDef py_NL_DNS_NAME_INFO_ARRAY_methods[] = {
   26006             :         { "__ndr_pack__", (PyCFunction)py_NL_DNS_NAME_INFO_ARRAY_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   26007             :         { "__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" },
   26008             :         { "__ndr_print__", (PyCFunction)py_NL_DNS_NAME_INFO_ARRAY_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   26009             :         { NULL, NULL, 0, NULL }
   26010             : };
   26011             : 
   26012             : 
   26013             : static PyTypeObject NL_DNS_NAME_INFO_ARRAY_Type = {
   26014             :         PyVarObject_HEAD_INIT(NULL, 0)
   26015             :         .tp_name = "netlogon.NL_DNS_NAME_INFO_ARRAY",
   26016             :         .tp_getset = py_NL_DNS_NAME_INFO_ARRAY_getsetters,
   26017             :         .tp_methods = py_NL_DNS_NAME_INFO_ARRAY_methods,
   26018             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   26019             :         .tp_new = py_NL_DNS_NAME_INFO_ARRAY_new,
   26020             : };
   26021             : 
   26022             : 
   26023             : 
   26024           0 : static PyObject *py_netr_LogonUasLogon_in_get_server_name(PyObject *obj, void *closure)
   26025             : {
   26026           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(obj);
   26027             :         PyObject *py_server_name;
   26028           0 :         if (object->in.server_name == NULL) {
   26029           0 :                 Py_RETURN_NONE;
   26030             :         }
   26031           0 :         if (object->in.server_name == NULL) {
   26032           0 :                 py_server_name = Py_None;
   26033           0 :                 Py_INCREF(py_server_name);
   26034             :         } else {
   26035           0 :                 if (object->in.server_name == NULL) {
   26036           0 :                         py_server_name = Py_None;
   26037           0 :                         Py_INCREF(py_server_name);
   26038             :                 } else {
   26039           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   26040             :                 }
   26041             :         }
   26042           0 :         return py_server_name;
   26043             : }
   26044             : 
   26045           0 : static int py_netr_LogonUasLogon_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   26046             : {
   26047           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(py_obj);
   26048           0 :         if (value == NULL) {
   26049           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   26050           0 :                 return -1;
   26051             :         }
   26052           0 :         if (value == Py_None) {
   26053           0 :                 object->in.server_name = NULL;
   26054             :         } else {
   26055           0 :                 object->in.server_name = NULL;
   26056             :                 {
   26057             :                         const char *test_str;
   26058             :                         const char *talloc_str;
   26059           0 :                         PyObject *unicode = NULL;
   26060           0 :                         if (PyUnicode_Check(value)) {
   26061           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   26062           0 :                                 if (unicode == NULL) {
   26063           0 :                                         PyErr_NoMemory();
   26064           0 :                                         return -1;
   26065             :                                 }
   26066           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   26067           0 :                         } else if (PyBytes_Check(value)) {
   26068           0 :                                 test_str = PyBytes_AS_STRING(value);
   26069             :                         } else {
   26070           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   26071           0 :                                 return -1;
   26072             :                         }
   26073           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   26074           0 :                         if (unicode != NULL) {
   26075           0 :                                 Py_DECREF(unicode);
   26076             :                         }
   26077           0 :                         if (talloc_str == NULL) {
   26078           0 :                                 PyErr_NoMemory();
   26079           0 :                                 return -1;
   26080             :                         }
   26081           0 :                         object->in.server_name = talloc_str;
   26082             :                 }
   26083             :         }
   26084           0 :         return 0;
   26085             : }
   26086             : 
   26087           0 : static PyObject *py_netr_LogonUasLogon_in_get_account_name(PyObject *obj, void *closure)
   26088             : {
   26089           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(obj);
   26090             :         PyObject *py_account_name;
   26091           0 :         if (object->in.account_name == NULL) {
   26092           0 :                 Py_RETURN_NONE;
   26093             :         }
   26094           0 :         if (object->in.account_name == NULL) {
   26095           0 :                 py_account_name = Py_None;
   26096           0 :                 Py_INCREF(py_account_name);
   26097             :         } else {
   26098           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   26099             :         }
   26100           0 :         return py_account_name;
   26101             : }
   26102             : 
   26103           0 : static int py_netr_LogonUasLogon_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   26104             : {
   26105           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(py_obj);
   26106           0 :         if (value == NULL) {
   26107           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.account_name");
   26108           0 :                 return -1;
   26109             :         }
   26110           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   26111           0 :         if (object->in.account_name == NULL) {
   26112           0 :                 PyErr_NoMemory();
   26113           0 :                 return -1;
   26114             :         }
   26115             :         {
   26116             :                 const char *test_str;
   26117             :                 const char *talloc_str;
   26118           0 :                 PyObject *unicode = NULL;
   26119           0 :                 if (PyUnicode_Check(value)) {
   26120           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   26121           0 :                         if (unicode == NULL) {
   26122           0 :                                 PyErr_NoMemory();
   26123           0 :                                 return -1;
   26124             :                         }
   26125           0 :                         test_str = PyBytes_AS_STRING(unicode);
   26126           0 :                 } else if (PyBytes_Check(value)) {
   26127           0 :                         test_str = PyBytes_AS_STRING(value);
   26128             :                 } else {
   26129           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   26130           0 :                         return -1;
   26131             :                 }
   26132           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   26133           0 :                 if (unicode != NULL) {
   26134           0 :                         Py_DECREF(unicode);
   26135             :                 }
   26136           0 :                 if (talloc_str == NULL) {
   26137           0 :                         PyErr_NoMemory();
   26138           0 :                         return -1;
   26139             :                 }
   26140           0 :                 object->in.account_name = talloc_str;
   26141             :         }
   26142           0 :         return 0;
   26143             : }
   26144             : 
   26145           0 : static PyObject *py_netr_LogonUasLogon_in_get_workstation(PyObject *obj, void *closure)
   26146             : {
   26147           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(obj);
   26148             :         PyObject *py_workstation;
   26149           0 :         if (object->in.workstation == NULL) {
   26150           0 :                 Py_RETURN_NONE;
   26151             :         }
   26152           0 :         if (object->in.workstation == NULL) {
   26153           0 :                 py_workstation = Py_None;
   26154           0 :                 Py_INCREF(py_workstation);
   26155             :         } else {
   26156           0 :                 py_workstation = PyUnicode_Decode(object->in.workstation, strlen(object->in.workstation), "utf-8", "ignore");
   26157             :         }
   26158           0 :         return py_workstation;
   26159             : }
   26160             : 
   26161           0 : static int py_netr_LogonUasLogon_in_set_workstation(PyObject *py_obj, PyObject *value, void *closure)
   26162             : {
   26163           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(py_obj);
   26164           0 :         if (value == NULL) {
   26165           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.workstation");
   26166           0 :                 return -1;
   26167             :         }
   26168           0 :         object->in.workstation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.workstation);
   26169           0 :         if (object->in.workstation == NULL) {
   26170           0 :                 PyErr_NoMemory();
   26171           0 :                 return -1;
   26172             :         }
   26173             :         {
   26174             :                 const char *test_str;
   26175             :                 const char *talloc_str;
   26176           0 :                 PyObject *unicode = NULL;
   26177           0 :                 if (PyUnicode_Check(value)) {
   26178           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   26179           0 :                         if (unicode == NULL) {
   26180           0 :                                 PyErr_NoMemory();
   26181           0 :                                 return -1;
   26182             :                         }
   26183           0 :                         test_str = PyBytes_AS_STRING(unicode);
   26184           0 :                 } else if (PyBytes_Check(value)) {
   26185           0 :                         test_str = PyBytes_AS_STRING(value);
   26186             :                 } else {
   26187           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   26188           0 :                         return -1;
   26189             :                 }
   26190           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   26191           0 :                 if (unicode != NULL) {
   26192           0 :                         Py_DECREF(unicode);
   26193             :                 }
   26194           0 :                 if (talloc_str == NULL) {
   26195           0 :                         PyErr_NoMemory();
   26196           0 :                         return -1;
   26197             :                 }
   26198           0 :                 object->in.workstation = talloc_str;
   26199             :         }
   26200           0 :         return 0;
   26201             : }
   26202             : 
   26203           0 : static PyObject *py_netr_LogonUasLogon_out_get_info(PyObject *obj, void *closure)
   26204             : {
   26205           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(obj);
   26206             :         PyObject *py_info;
   26207           0 :         if (object->out.info == NULL) {
   26208           0 :                 Py_RETURN_NONE;
   26209             :         }
   26210           0 :         if (*object->out.info == NULL) {
   26211           0 :                 py_info = Py_None;
   26212           0 :                 Py_INCREF(py_info);
   26213             :         } else {
   26214           0 :                 py_info = pytalloc_reference_ex(&netr_UasInfo_Type, *object->out.info, *object->out.info);
   26215             :         }
   26216           0 :         return py_info;
   26217             : }
   26218             : 
   26219           0 : static int py_netr_LogonUasLogon_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   26220             : {
   26221           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(py_obj);
   26222           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   26223           0 :         if (value == NULL) {
   26224           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
   26225           0 :                 return -1;
   26226             :         }
   26227           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   26228           0 :         if (object->out.info == NULL) {
   26229           0 :                 PyErr_NoMemory();
   26230           0 :                 return -1;
   26231             :         }
   26232           0 :         if (value == Py_None) {
   26233           0 :                 *object->out.info = NULL;
   26234             :         } else {
   26235           0 :                 *object->out.info = NULL;
   26236           0 :                 PY_CHECK_TYPE(&netr_UasInfo_Type, value, return -1;);
   26237           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   26238           0 :                         PyErr_NoMemory();
   26239           0 :                         return -1;
   26240             :                 }
   26241           0 :                 *object->out.info = (struct netr_UasInfo *)pytalloc_get_ptr(value);
   26242             :         }
   26243           0 :         return 0;
   26244             : }
   26245             : 
   26246           0 : static PyObject *py_netr_LogonUasLogon_get_result(PyObject *obj, void *closure)
   26247             : {
   26248           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(obj);
   26249             :         PyObject *py_result;
   26250           0 :         py_result = PyErr_FromWERROR(object->out.result);
   26251           0 :         return py_result;
   26252             : }
   26253             : 
   26254           0 : static int py_netr_LogonUasLogon_set_result(PyObject *py_obj, PyObject *value, void *closure)
   26255             : {
   26256           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(py_obj);
   26257           0 :         if (value == NULL) {
   26258           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   26259           0 :                 return -1;
   26260             :         }
   26261           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   26262           0 :         return 0;
   26263             : }
   26264             : 
   26265             : static PyGetSetDef py_netr_LogonUasLogon_getsetters[] = {
   26266             :         {
   26267             :                 .name = discard_const_p(char, "in_server_name"),
   26268             :                 .get = py_netr_LogonUasLogon_in_get_server_name,
   26269             :                 .set = py_netr_LogonUasLogon_in_set_server_name,
   26270             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   26271             :         },
   26272             :         {
   26273             :                 .name = discard_const_p(char, "in_account_name"),
   26274             :                 .get = py_netr_LogonUasLogon_in_get_account_name,
   26275             :                 .set = py_netr_LogonUasLogon_in_set_account_name,
   26276             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   26277             :         },
   26278             :         {
   26279             :                 .name = discard_const_p(char, "in_workstation"),
   26280             :                 .get = py_netr_LogonUasLogon_in_get_workstation,
   26281             :                 .set = py_netr_LogonUasLogon_in_set_workstation,
   26282             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   26283             :         },
   26284             :         {
   26285             :                 .name = discard_const_p(char, "out_info"),
   26286             :                 .get = py_netr_LogonUasLogon_out_get_info,
   26287             :                 .set = py_netr_LogonUasLogon_out_set_info,
   26288             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UasInfo")
   26289             :         },
   26290             :         {
   26291             :                 .name = discard_const_p(char, "result"),
   26292             :                 .get = py_netr_LogonUasLogon_get_result,
   26293             :                 .set = py_netr_LogonUasLogon_set_result,
   26294             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   26295             :         },
   26296             :         { .name = NULL }
   26297             : };
   26298             : 
   26299           0 : static PyObject *py_netr_LogonUasLogon_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   26300             : {
   26301           0 :         PyObject *self = pytalloc_new(struct netr_LogonUasLogon, type);
   26302           0 :         struct netr_LogonUasLogon *_self = (struct netr_LogonUasLogon *)pytalloc_get_ptr(self);
   26303           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   26304             :         /* a pointer to a NULL pointer */
   26305           0 :         _self->out.info = talloc_zero(mem_ctx, struct netr_UasInfo *);
   26306           0 :         return self;
   26307             : }
   26308             : 
   26309           0 : static PyObject *py_netr_LogonUasLogon_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   26310             : {
   26311             : 
   26312             : 
   26313           0 :         return PyLong_FromLong(0);
   26314             : }
   26315             : 
   26316           0 : static PyObject *py_netr_LogonUasLogon_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   26317             : {
   26318           0 :         const struct ndr_interface_call *call = NULL;
   26319           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(py_obj);
   26320           0 :         PyObject *ret = NULL;
   26321           0 :         struct ndr_push *push = NULL;
   26322             :         DATA_BLOB blob;
   26323             :         enum ndr_err_code err;
   26324             : 
   26325           0 :         if (ndr_table_netlogon.num_calls < 1) {
   26326           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonUasLogon_ndr_pack");
   26327           0 :                 return NULL;
   26328             :         }
   26329           0 :         call = &ndr_table_netlogon.calls[0];
   26330             : 
   26331           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   26332           0 :         if (push == NULL) {
   26333           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   26334           0 :                 return NULL;
   26335             :         }
   26336             : 
   26337           0 :         push->flags |= ndr_push_flags;
   26338             : 
   26339           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   26340           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   26341           0 :                 TALLOC_FREE(push);
   26342           0 :                 PyErr_SetNdrError(err);
   26343           0 :                 return NULL;
   26344             :         }
   26345           0 :         blob = ndr_push_blob(push);
   26346           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   26347           0 :         TALLOC_FREE(push);
   26348           0 :         return ret;
   26349             : }
   26350             : 
   26351           0 : static PyObject *py_netr_LogonUasLogon_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   26352             : {
   26353           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   26354           0 :         PyObject *bigendian_obj = NULL;
   26355           0 :         PyObject *ndr64_obj = NULL;
   26356           0 :         uint32_t ndr_push_flags = 0;
   26357             : 
   26358           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   26359             :                 discard_const_p(char *, kwnames),
   26360             :                 &bigendian_obj,
   26361             :                 &ndr64_obj)) {
   26362           0 :                 return NULL;
   26363             :         }
   26364             : 
   26365           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   26366           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   26367             :         }
   26368           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   26369           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   26370             :         }
   26371             : 
   26372           0 :         return py_netr_LogonUasLogon_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   26373             : }
   26374             : 
   26375           0 : static PyObject *py_netr_LogonUasLogon_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   26376             : {
   26377           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   26378           0 :         PyObject *bigendian_obj = NULL;
   26379           0 :         PyObject *ndr64_obj = NULL;
   26380           0 :         uint32_t ndr_push_flags = 0;
   26381             : 
   26382           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   26383             :                 discard_const_p(char *, kwnames),
   26384             :                 &bigendian_obj,
   26385             :                 &ndr64_obj)) {
   26386           0 :                 return NULL;
   26387             :         }
   26388             : 
   26389           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   26390           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   26391             :         }
   26392           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   26393           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   26394             :         }
   26395             : 
   26396           0 :         return py_netr_LogonUasLogon_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   26397             : }
   26398             : 
   26399           0 : static PyObject *py_netr_LogonUasLogon_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   26400             : {
   26401           0 :         const struct ndr_interface_call *call = NULL;
   26402           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(py_obj);
   26403           0 :         struct ndr_pull *pull = NULL;
   26404             :         enum ndr_err_code err;
   26405             : 
   26406           0 :         if (ndr_table_netlogon.num_calls < 1) {
   26407           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonUasLogon_ndr_unpack");
   26408           0 :                 return NULL;
   26409             :         }
   26410           0 :         call = &ndr_table_netlogon.calls[0];
   26411             : 
   26412           0 :         pull = ndr_pull_init_blob(blob, object);
   26413           0 :         if (pull == NULL) {
   26414           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   26415           0 :                 return NULL;
   26416             :         }
   26417             : 
   26418           0 :         pull->flags |= ndr_pull_flags;
   26419             : 
   26420           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   26421           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   26422           0 :                 TALLOC_FREE(pull);
   26423           0 :                 PyErr_SetNdrError(err);
   26424           0 :                 return NULL;
   26425             :         }
   26426           0 :         if (!allow_remaining) {
   26427             :                 uint32_t highest_ofs;
   26428             : 
   26429           0 :                 if (pull->offset > pull->relative_highest_offset) {
   26430           0 :                         highest_ofs = pull->offset;
   26431             :                 } else {
   26432           0 :                         highest_ofs = pull->relative_highest_offset;
   26433             :                 }
   26434           0 :                 if (highest_ofs < pull->data_size) {
   26435           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   26436             :                                 "not all bytes consumed ofs[%u] size[%u]",
   26437             :                                 highest_ofs, pull->data_size);
   26438           0 :                         TALLOC_FREE(pull);
   26439           0 :                         PyErr_SetNdrError(err);
   26440           0 :                         return NULL;
   26441             :                 }
   26442             :         }
   26443             : 
   26444           0 :         TALLOC_FREE(pull);
   26445           0 :         Py_RETURN_NONE;
   26446             : }
   26447             : 
   26448           0 : static PyObject *py_netr_LogonUasLogon_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   26449             : {
   26450             :         DATA_BLOB blob;
   26451           0 :         Py_ssize_t blob_length = 0;
   26452           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   26453           0 :         PyObject *bigendian_obj = NULL;
   26454           0 :         PyObject *ndr64_obj = NULL;
   26455           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   26456           0 :         PyObject *allow_remaining_obj = NULL;
   26457           0 :         bool allow_remaining = false;
   26458             : 
   26459           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   26460             :                 discard_const_p(char *, kwnames),
   26461             :                 &blob.data, &blob_length,
   26462             :                 &bigendian_obj,
   26463             :                 &ndr64_obj,
   26464             :                 &allow_remaining_obj)) {
   26465           0 :                 return NULL;
   26466             :         }
   26467           0 :         blob.length = blob_length;
   26468             : 
   26469           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   26470           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   26471             :         }
   26472           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   26473           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   26474             :         }
   26475             : 
   26476           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   26477           0 :                 allow_remaining = true;
   26478             :         }
   26479             : 
   26480           0 :         return py_netr_LogonUasLogon_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   26481             : }
   26482             : 
   26483           0 : static PyObject *py_netr_LogonUasLogon_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   26484             : {
   26485             :         DATA_BLOB blob;
   26486           0 :         Py_ssize_t blob_length = 0;
   26487           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   26488           0 :         PyObject *bigendian_obj = NULL;
   26489           0 :         PyObject *ndr64_obj = NULL;
   26490           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   26491           0 :         PyObject *allow_remaining_obj = NULL;
   26492           0 :         bool allow_remaining = false;
   26493             : 
   26494           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   26495             :                 discard_const_p(char *, kwnames),
   26496             :                 &blob.data, &blob_length,
   26497             :                 &bigendian_obj,
   26498             :                 &ndr64_obj,
   26499             :                 &allow_remaining_obj)) {
   26500           0 :                 return NULL;
   26501             :         }
   26502           0 :         blob.length = blob_length;
   26503             : 
   26504           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   26505           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   26506             :         }
   26507           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   26508           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   26509             :         }
   26510             : 
   26511           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   26512           0 :                 allow_remaining = true;
   26513             :         }
   26514             : 
   26515           0 :         return py_netr_LogonUasLogon_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   26516             : }
   26517             : 
   26518           0 : static PyObject *py_netr_LogonUasLogon_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   26519             : {
   26520           0 :         const struct ndr_interface_call *call = NULL;
   26521           0 :         struct netr_LogonUasLogon *object = (struct netr_LogonUasLogon *)pytalloc_get_ptr(py_obj);
   26522             :         PyObject *ret;
   26523             :         char *retstr;
   26524             : 
   26525           0 :         if (ndr_table_netlogon.num_calls < 1) {
   26526           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonUasLogon_ndr_print");
   26527           0 :                 return NULL;
   26528             :         }
   26529           0 :         call = &ndr_table_netlogon.calls[0];
   26530             : 
   26531           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   26532           0 :         ret = PyUnicode_FromString(retstr);
   26533           0 :         TALLOC_FREE(retstr);
   26534             : 
   26535           0 :         return ret;
   26536             : }
   26537             : 
   26538           0 : static PyObject *py_netr_LogonUasLogon_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   26539             : {
   26540           0 :         return py_netr_LogonUasLogon_ndr_print(py_obj, "netr_LogonUasLogon_in", NDR_IN);
   26541             : }
   26542             : 
   26543           0 : static PyObject *py_netr_LogonUasLogon_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   26544             : {
   26545           0 :         return py_netr_LogonUasLogon_ndr_print(py_obj, "netr_LogonUasLogon_out", NDR_OUT);
   26546             : }
   26547             : 
   26548             : static PyMethodDef py_netr_LogonUasLogon_methods[] = {
   26549             :         { "opnum", (PyCFunction)py_netr_LogonUasLogon_ndr_opnum, METH_NOARGS|METH_CLASS,
   26550             :                 "netlogon.netr_LogonUasLogon.opnum() -> 0 (0x00) " },
   26551             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogon_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   26552             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   26553             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogon_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   26554             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   26555             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogon_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   26556             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   26557             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogon_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   26558             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   26559             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonUasLogon_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   26560             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonUasLogon_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   26561             :         { NULL, NULL, 0, NULL }
   26562             : };
   26563             : 
   26564             : 
   26565             : static PyTypeObject netr_LogonUasLogon_Type = {
   26566             :         PyVarObject_HEAD_INIT(NULL, 0)
   26567             :         .tp_name = "netlogon.netr_LogonUasLogon",
   26568             :         .tp_getset = py_netr_LogonUasLogon_getsetters,
   26569             :         .tp_methods = py_netr_LogonUasLogon_methods,
   26570             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   26571             :         .tp_new = py_netr_LogonUasLogon_new,
   26572             : };
   26573             : 
   26574           0 : static bool pack_py_netr_LogonUasLogon_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonUasLogon *r)
   26575             : {
   26576             :         PyObject *py_server_name;
   26577             :         PyObject *py_account_name;
   26578             :         PyObject *py_workstation;
   26579           0 :         const char *kwnames[] = {
   26580             :                 "server_name", "account_name", "workstation", NULL
   26581             :         };
   26582             : 
   26583           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:netr_LogonUasLogon", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_workstation)) {
   26584           0 :                 return false;
   26585             :         }
   26586             : 
   26587           0 :         if (py_server_name == NULL) {
   26588           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   26589           0 :                 return false;
   26590             :         }
   26591           0 :         if (py_server_name == Py_None) {
   26592           0 :                 r->in.server_name = NULL;
   26593             :         } else {
   26594           0 :                 r->in.server_name = NULL;
   26595             :                 {
   26596             :                         const char *test_str;
   26597             :                         const char *talloc_str;
   26598           0 :                         PyObject *unicode = NULL;
   26599           0 :                         if (PyUnicode_Check(py_server_name)) {
   26600           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   26601           0 :                                 if (unicode == NULL) {
   26602           0 :                                         PyErr_NoMemory();
   26603           0 :                                         return false;
   26604             :                                 }
   26605           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   26606           0 :                         } else if (PyBytes_Check(py_server_name)) {
   26607           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   26608             :                         } else {
   26609           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   26610           0 :                                 return false;
   26611             :                         }
   26612           0 :                         talloc_str = talloc_strdup(r, test_str);
   26613           0 :                         if (unicode != NULL) {
   26614           0 :                                 Py_DECREF(unicode);
   26615             :                         }
   26616           0 :                         if (talloc_str == NULL) {
   26617           0 :                                 PyErr_NoMemory();
   26618           0 :                                 return false;
   26619             :                         }
   26620           0 :                         r->in.server_name = talloc_str;
   26621             :                 }
   26622             :         }
   26623           0 :         if (py_account_name == NULL) {
   26624           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.account_name");
   26625           0 :                 return false;
   26626             :         }
   26627           0 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   26628           0 :         if (r->in.account_name == NULL) {
   26629           0 :                 PyErr_NoMemory();
   26630           0 :                 return false;
   26631             :         }
   26632             :         {
   26633             :                 const char *test_str;
   26634             :                 const char *talloc_str;
   26635           0 :                 PyObject *unicode = NULL;
   26636           0 :                 if (PyUnicode_Check(py_account_name)) {
   26637           0 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   26638           0 :                         if (unicode == NULL) {
   26639           0 :                                 PyErr_NoMemory();
   26640           0 :                                 return false;
   26641             :                         }
   26642           0 :                         test_str = PyBytes_AS_STRING(unicode);
   26643           0 :                 } else if (PyBytes_Check(py_account_name)) {
   26644           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   26645             :                 } else {
   26646           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   26647           0 :                         return false;
   26648             :                 }
   26649           0 :                 talloc_str = talloc_strdup(r, test_str);
   26650           0 :                 if (unicode != NULL) {
   26651           0 :                         Py_DECREF(unicode);
   26652             :                 }
   26653           0 :                 if (talloc_str == NULL) {
   26654           0 :                         PyErr_NoMemory();
   26655           0 :                         return false;
   26656             :                 }
   26657           0 :                 r->in.account_name = talloc_str;
   26658             :         }
   26659           0 :         if (py_workstation == NULL) {
   26660           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.workstation");
   26661           0 :                 return false;
   26662             :         }
   26663           0 :         r->in.workstation = talloc_ptrtype(r, r->in.workstation);
   26664           0 :         if (r->in.workstation == NULL) {
   26665           0 :                 PyErr_NoMemory();
   26666           0 :                 return false;
   26667             :         }
   26668             :         {
   26669             :                 const char *test_str;
   26670             :                 const char *talloc_str;
   26671           0 :                 PyObject *unicode = NULL;
   26672           0 :                 if (PyUnicode_Check(py_workstation)) {
   26673           0 :                         unicode = PyUnicode_AsEncodedString(py_workstation, "utf-8", "ignore");
   26674           0 :                         if (unicode == NULL) {
   26675           0 :                                 PyErr_NoMemory();
   26676           0 :                                 return false;
   26677             :                         }
   26678           0 :                         test_str = PyBytes_AS_STRING(unicode);
   26679           0 :                 } else if (PyBytes_Check(py_workstation)) {
   26680           0 :                         test_str = PyBytes_AS_STRING(py_workstation);
   26681             :                 } else {
   26682           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_workstation)->tp_name);
   26683           0 :                         return false;
   26684             :                 }
   26685           0 :                 talloc_str = talloc_strdup(r, test_str);
   26686           0 :                 if (unicode != NULL) {
   26687           0 :                         Py_DECREF(unicode);
   26688             :                 }
   26689           0 :                 if (talloc_str == NULL) {
   26690           0 :                         PyErr_NoMemory();
   26691           0 :                         return false;
   26692             :                 }
   26693           0 :                 r->in.workstation = talloc_str;
   26694             :         }
   26695           0 :         return true;
   26696             : }
   26697             : 
   26698           0 : static PyObject *unpack_py_netr_LogonUasLogon_args_out(struct netr_LogonUasLogon *r)
   26699             : {
   26700             :         PyObject *result;
   26701             :         PyObject *py_info;
   26702           0 :         if (*r->out.info == NULL) {
   26703           0 :                 py_info = Py_None;
   26704           0 :                 Py_INCREF(py_info);
   26705             :         } else {
   26706           0 :                 py_info = pytalloc_reference_ex(&netr_UasInfo_Type, *r->out.info, *r->out.info);
   26707             :         }
   26708           0 :         result = py_info;
   26709           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   26710           0 :                 PyErr_SetWERROR(r->out.result);
   26711           0 :                 return NULL;
   26712             :         }
   26713             : 
   26714           0 :         return result;
   26715             : }
   26716             : 
   26717             : 
   26718           0 : static PyObject *py_netr_LogonUasLogoff_in_get_server_name(PyObject *obj, void *closure)
   26719             : {
   26720           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(obj);
   26721             :         PyObject *py_server_name;
   26722           0 :         if (object->in.server_name == NULL) {
   26723           0 :                 Py_RETURN_NONE;
   26724             :         }
   26725           0 :         if (object->in.server_name == NULL) {
   26726           0 :                 py_server_name = Py_None;
   26727           0 :                 Py_INCREF(py_server_name);
   26728             :         } else {
   26729           0 :                 if (object->in.server_name == NULL) {
   26730           0 :                         py_server_name = Py_None;
   26731           0 :                         Py_INCREF(py_server_name);
   26732             :                 } else {
   26733           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   26734             :                 }
   26735             :         }
   26736           0 :         return py_server_name;
   26737             : }
   26738             : 
   26739           0 : static int py_netr_LogonUasLogoff_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   26740             : {
   26741           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(py_obj);
   26742           0 :         if (value == NULL) {
   26743           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   26744           0 :                 return -1;
   26745             :         }
   26746           0 :         if (value == Py_None) {
   26747           0 :                 object->in.server_name = NULL;
   26748             :         } else {
   26749           0 :                 object->in.server_name = NULL;
   26750             :                 {
   26751             :                         const char *test_str;
   26752             :                         const char *talloc_str;
   26753           0 :                         PyObject *unicode = NULL;
   26754           0 :                         if (PyUnicode_Check(value)) {
   26755           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   26756           0 :                                 if (unicode == NULL) {
   26757           0 :                                         PyErr_NoMemory();
   26758           0 :                                         return -1;
   26759             :                                 }
   26760           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   26761           0 :                         } else if (PyBytes_Check(value)) {
   26762           0 :                                 test_str = PyBytes_AS_STRING(value);
   26763             :                         } else {
   26764           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   26765           0 :                                 return -1;
   26766             :                         }
   26767           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   26768           0 :                         if (unicode != NULL) {
   26769           0 :                                 Py_DECREF(unicode);
   26770             :                         }
   26771           0 :                         if (talloc_str == NULL) {
   26772           0 :                                 PyErr_NoMemory();
   26773           0 :                                 return -1;
   26774             :                         }
   26775           0 :                         object->in.server_name = talloc_str;
   26776             :                 }
   26777             :         }
   26778           0 :         return 0;
   26779             : }
   26780             : 
   26781           0 : static PyObject *py_netr_LogonUasLogoff_in_get_account_name(PyObject *obj, void *closure)
   26782             : {
   26783           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(obj);
   26784             :         PyObject *py_account_name;
   26785           0 :         if (object->in.account_name == NULL) {
   26786           0 :                 Py_RETURN_NONE;
   26787             :         }
   26788           0 :         if (object->in.account_name == NULL) {
   26789           0 :                 py_account_name = Py_None;
   26790           0 :                 Py_INCREF(py_account_name);
   26791             :         } else {
   26792           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   26793             :         }
   26794           0 :         return py_account_name;
   26795             : }
   26796             : 
   26797           0 : static int py_netr_LogonUasLogoff_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   26798             : {
   26799           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(py_obj);
   26800           0 :         if (value == NULL) {
   26801           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.account_name");
   26802           0 :                 return -1;
   26803             :         }
   26804           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   26805           0 :         if (object->in.account_name == NULL) {
   26806           0 :                 PyErr_NoMemory();
   26807           0 :                 return -1;
   26808             :         }
   26809             :         {
   26810             :                 const char *test_str;
   26811             :                 const char *talloc_str;
   26812           0 :                 PyObject *unicode = NULL;
   26813           0 :                 if (PyUnicode_Check(value)) {
   26814           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   26815           0 :                         if (unicode == NULL) {
   26816           0 :                                 PyErr_NoMemory();
   26817           0 :                                 return -1;
   26818             :                         }
   26819           0 :                         test_str = PyBytes_AS_STRING(unicode);
   26820           0 :                 } else if (PyBytes_Check(value)) {
   26821           0 :                         test_str = PyBytes_AS_STRING(value);
   26822             :                 } else {
   26823           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   26824           0 :                         return -1;
   26825             :                 }
   26826           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   26827           0 :                 if (unicode != NULL) {
   26828           0 :                         Py_DECREF(unicode);
   26829             :                 }
   26830           0 :                 if (talloc_str == NULL) {
   26831           0 :                         PyErr_NoMemory();
   26832           0 :                         return -1;
   26833             :                 }
   26834           0 :                 object->in.account_name = talloc_str;
   26835             :         }
   26836           0 :         return 0;
   26837             : }
   26838             : 
   26839           0 : static PyObject *py_netr_LogonUasLogoff_in_get_workstation(PyObject *obj, void *closure)
   26840             : {
   26841           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(obj);
   26842             :         PyObject *py_workstation;
   26843           0 :         if (object->in.workstation == NULL) {
   26844           0 :                 Py_RETURN_NONE;
   26845             :         }
   26846           0 :         if (object->in.workstation == NULL) {
   26847           0 :                 py_workstation = Py_None;
   26848           0 :                 Py_INCREF(py_workstation);
   26849             :         } else {
   26850           0 :                 py_workstation = PyUnicode_Decode(object->in.workstation, strlen(object->in.workstation), "utf-8", "ignore");
   26851             :         }
   26852           0 :         return py_workstation;
   26853             : }
   26854             : 
   26855           0 : static int py_netr_LogonUasLogoff_in_set_workstation(PyObject *py_obj, PyObject *value, void *closure)
   26856             : {
   26857           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(py_obj);
   26858           0 :         if (value == NULL) {
   26859           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.workstation");
   26860           0 :                 return -1;
   26861             :         }
   26862           0 :         object->in.workstation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.workstation);
   26863           0 :         if (object->in.workstation == NULL) {
   26864           0 :                 PyErr_NoMemory();
   26865           0 :                 return -1;
   26866             :         }
   26867             :         {
   26868             :                 const char *test_str;
   26869             :                 const char *talloc_str;
   26870           0 :                 PyObject *unicode = NULL;
   26871           0 :                 if (PyUnicode_Check(value)) {
   26872           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   26873           0 :                         if (unicode == NULL) {
   26874           0 :                                 PyErr_NoMemory();
   26875           0 :                                 return -1;
   26876             :                         }
   26877           0 :                         test_str = PyBytes_AS_STRING(unicode);
   26878           0 :                 } else if (PyBytes_Check(value)) {
   26879           0 :                         test_str = PyBytes_AS_STRING(value);
   26880             :                 } else {
   26881           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   26882           0 :                         return -1;
   26883             :                 }
   26884           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   26885           0 :                 if (unicode != NULL) {
   26886           0 :                         Py_DECREF(unicode);
   26887             :                 }
   26888           0 :                 if (talloc_str == NULL) {
   26889           0 :                         PyErr_NoMemory();
   26890           0 :                         return -1;
   26891             :                 }
   26892           0 :                 object->in.workstation = talloc_str;
   26893             :         }
   26894           0 :         return 0;
   26895             : }
   26896             : 
   26897           0 : static PyObject *py_netr_LogonUasLogoff_out_get_info(PyObject *obj, void *closure)
   26898             : {
   26899           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(obj);
   26900             :         PyObject *py_info;
   26901           0 :         if (object->out.info == NULL) {
   26902           0 :                 Py_RETURN_NONE;
   26903             :         }
   26904           0 :         py_info = pytalloc_reference_ex(&netr_UasLogoffInfo_Type, object->out.info, object->out.info);
   26905           0 :         return py_info;
   26906             : }
   26907             : 
   26908           0 : static int py_netr_LogonUasLogoff_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   26909             : {
   26910           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(py_obj);
   26911           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   26912           0 :         if (value == NULL) {
   26913           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
   26914           0 :                 return -1;
   26915             :         }
   26916           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   26917           0 :         if (object->out.info == NULL) {
   26918           0 :                 PyErr_NoMemory();
   26919           0 :                 return -1;
   26920             :         }
   26921           0 :         PY_CHECK_TYPE(&netr_UasLogoffInfo_Type, value, return -1;);
   26922           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   26923           0 :                 PyErr_NoMemory();
   26924           0 :                 return -1;
   26925             :         }
   26926           0 :         object->out.info = (struct netr_UasLogoffInfo *)pytalloc_get_ptr(value);
   26927           0 :         return 0;
   26928             : }
   26929             : 
   26930           0 : static PyObject *py_netr_LogonUasLogoff_get_result(PyObject *obj, void *closure)
   26931             : {
   26932           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(obj);
   26933             :         PyObject *py_result;
   26934           0 :         py_result = PyErr_FromWERROR(object->out.result);
   26935           0 :         return py_result;
   26936             : }
   26937             : 
   26938           0 : static int py_netr_LogonUasLogoff_set_result(PyObject *py_obj, PyObject *value, void *closure)
   26939             : {
   26940           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(py_obj);
   26941           0 :         if (value == NULL) {
   26942           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   26943           0 :                 return -1;
   26944             :         }
   26945           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   26946           0 :         return 0;
   26947             : }
   26948             : 
   26949             : static PyGetSetDef py_netr_LogonUasLogoff_getsetters[] = {
   26950             :         {
   26951             :                 .name = discard_const_p(char, "in_server_name"),
   26952             :                 .get = py_netr_LogonUasLogoff_in_get_server_name,
   26953             :                 .set = py_netr_LogonUasLogoff_in_set_server_name,
   26954             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   26955             :         },
   26956             :         {
   26957             :                 .name = discard_const_p(char, "in_account_name"),
   26958             :                 .get = py_netr_LogonUasLogoff_in_get_account_name,
   26959             :                 .set = py_netr_LogonUasLogoff_in_set_account_name,
   26960             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   26961             :         },
   26962             :         {
   26963             :                 .name = discard_const_p(char, "in_workstation"),
   26964             :                 .get = py_netr_LogonUasLogoff_in_get_workstation,
   26965             :                 .set = py_netr_LogonUasLogoff_in_set_workstation,
   26966             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   26967             :         },
   26968             :         {
   26969             :                 .name = discard_const_p(char, "out_info"),
   26970             :                 .get = py_netr_LogonUasLogoff_out_get_info,
   26971             :                 .set = py_netr_LogonUasLogoff_out_set_info,
   26972             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UasLogoffInfo")
   26973             :         },
   26974             :         {
   26975             :                 .name = discard_const_p(char, "result"),
   26976             :                 .get = py_netr_LogonUasLogoff_get_result,
   26977             :                 .set = py_netr_LogonUasLogoff_set_result,
   26978             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   26979             :         },
   26980             :         { .name = NULL }
   26981             : };
   26982             : 
   26983           0 : static PyObject *py_netr_LogonUasLogoff_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   26984             : {
   26985           0 :         PyObject *self = pytalloc_new(struct netr_LogonUasLogoff, type);
   26986           0 :         struct netr_LogonUasLogoff *_self = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(self);
   26987           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   26988           0 :         _self->out.info = talloc_zero(mem_ctx, struct netr_UasLogoffInfo);
   26989           0 :         return self;
   26990             : }
   26991             : 
   26992           0 : static PyObject *py_netr_LogonUasLogoff_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   26993             : {
   26994             : 
   26995             : 
   26996           0 :         return PyLong_FromLong(1);
   26997             : }
   26998             : 
   26999           0 : static PyObject *py_netr_LogonUasLogoff_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   27000             : {
   27001           0 :         const struct ndr_interface_call *call = NULL;
   27002           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(py_obj);
   27003           0 :         PyObject *ret = NULL;
   27004           0 :         struct ndr_push *push = NULL;
   27005             :         DATA_BLOB blob;
   27006             :         enum ndr_err_code err;
   27007             : 
   27008           0 :         if (ndr_table_netlogon.num_calls < 2) {
   27009           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonUasLogoff_ndr_pack");
   27010           0 :                 return NULL;
   27011             :         }
   27012           0 :         call = &ndr_table_netlogon.calls[1];
   27013             : 
   27014           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   27015           0 :         if (push == NULL) {
   27016           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   27017           0 :                 return NULL;
   27018             :         }
   27019             : 
   27020           0 :         push->flags |= ndr_push_flags;
   27021             : 
   27022           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   27023           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   27024           0 :                 TALLOC_FREE(push);
   27025           0 :                 PyErr_SetNdrError(err);
   27026           0 :                 return NULL;
   27027             :         }
   27028           0 :         blob = ndr_push_blob(push);
   27029           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   27030           0 :         TALLOC_FREE(push);
   27031           0 :         return ret;
   27032             : }
   27033             : 
   27034           0 : static PyObject *py_netr_LogonUasLogoff_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   27035             : {
   27036           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   27037           0 :         PyObject *bigendian_obj = NULL;
   27038           0 :         PyObject *ndr64_obj = NULL;
   27039           0 :         uint32_t ndr_push_flags = 0;
   27040             : 
   27041           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   27042             :                 discard_const_p(char *, kwnames),
   27043             :                 &bigendian_obj,
   27044             :                 &ndr64_obj)) {
   27045           0 :                 return NULL;
   27046             :         }
   27047             : 
   27048           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   27049           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   27050             :         }
   27051           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   27052           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   27053             :         }
   27054             : 
   27055           0 :         return py_netr_LogonUasLogoff_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   27056             : }
   27057             : 
   27058           0 : static PyObject *py_netr_LogonUasLogoff_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   27059             : {
   27060           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   27061           0 :         PyObject *bigendian_obj = NULL;
   27062           0 :         PyObject *ndr64_obj = NULL;
   27063           0 :         uint32_t ndr_push_flags = 0;
   27064             : 
   27065           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   27066             :                 discard_const_p(char *, kwnames),
   27067             :                 &bigendian_obj,
   27068             :                 &ndr64_obj)) {
   27069           0 :                 return NULL;
   27070             :         }
   27071             : 
   27072           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   27073           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   27074             :         }
   27075           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   27076           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   27077             :         }
   27078             : 
   27079           0 :         return py_netr_LogonUasLogoff_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   27080             : }
   27081             : 
   27082           0 : static PyObject *py_netr_LogonUasLogoff_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   27083             : {
   27084           0 :         const struct ndr_interface_call *call = NULL;
   27085           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(py_obj);
   27086           0 :         struct ndr_pull *pull = NULL;
   27087             :         enum ndr_err_code err;
   27088             : 
   27089           0 :         if (ndr_table_netlogon.num_calls < 2) {
   27090           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonUasLogoff_ndr_unpack");
   27091           0 :                 return NULL;
   27092             :         }
   27093           0 :         call = &ndr_table_netlogon.calls[1];
   27094             : 
   27095           0 :         pull = ndr_pull_init_blob(blob, object);
   27096           0 :         if (pull == NULL) {
   27097           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   27098           0 :                 return NULL;
   27099             :         }
   27100             : 
   27101           0 :         pull->flags |= ndr_pull_flags;
   27102             : 
   27103           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   27104           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   27105           0 :                 TALLOC_FREE(pull);
   27106           0 :                 PyErr_SetNdrError(err);
   27107           0 :                 return NULL;
   27108             :         }
   27109           0 :         if (!allow_remaining) {
   27110             :                 uint32_t highest_ofs;
   27111             : 
   27112           0 :                 if (pull->offset > pull->relative_highest_offset) {
   27113           0 :                         highest_ofs = pull->offset;
   27114             :                 } else {
   27115           0 :                         highest_ofs = pull->relative_highest_offset;
   27116             :                 }
   27117           0 :                 if (highest_ofs < pull->data_size) {
   27118           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   27119             :                                 "not all bytes consumed ofs[%u] size[%u]",
   27120             :                                 highest_ofs, pull->data_size);
   27121           0 :                         TALLOC_FREE(pull);
   27122           0 :                         PyErr_SetNdrError(err);
   27123           0 :                         return NULL;
   27124             :                 }
   27125             :         }
   27126             : 
   27127           0 :         TALLOC_FREE(pull);
   27128           0 :         Py_RETURN_NONE;
   27129             : }
   27130             : 
   27131           0 : static PyObject *py_netr_LogonUasLogoff_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   27132             : {
   27133             :         DATA_BLOB blob;
   27134           0 :         Py_ssize_t blob_length = 0;
   27135           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   27136           0 :         PyObject *bigendian_obj = NULL;
   27137           0 :         PyObject *ndr64_obj = NULL;
   27138           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   27139           0 :         PyObject *allow_remaining_obj = NULL;
   27140           0 :         bool allow_remaining = false;
   27141             : 
   27142           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   27143             :                 discard_const_p(char *, kwnames),
   27144             :                 &blob.data, &blob_length,
   27145             :                 &bigendian_obj,
   27146             :                 &ndr64_obj,
   27147             :                 &allow_remaining_obj)) {
   27148           0 :                 return NULL;
   27149             :         }
   27150           0 :         blob.length = blob_length;
   27151             : 
   27152           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   27153           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   27154             :         }
   27155           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   27156           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   27157             :         }
   27158             : 
   27159           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   27160           0 :                 allow_remaining = true;
   27161             :         }
   27162             : 
   27163           0 :         return py_netr_LogonUasLogoff_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   27164             : }
   27165             : 
   27166           0 : static PyObject *py_netr_LogonUasLogoff_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   27167             : {
   27168             :         DATA_BLOB blob;
   27169           0 :         Py_ssize_t blob_length = 0;
   27170           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   27171           0 :         PyObject *bigendian_obj = NULL;
   27172           0 :         PyObject *ndr64_obj = NULL;
   27173           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   27174           0 :         PyObject *allow_remaining_obj = NULL;
   27175           0 :         bool allow_remaining = false;
   27176             : 
   27177           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   27178             :                 discard_const_p(char *, kwnames),
   27179             :                 &blob.data, &blob_length,
   27180             :                 &bigendian_obj,
   27181             :                 &ndr64_obj,
   27182             :                 &allow_remaining_obj)) {
   27183           0 :                 return NULL;
   27184             :         }
   27185           0 :         blob.length = blob_length;
   27186             : 
   27187           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   27188           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   27189             :         }
   27190           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   27191           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   27192             :         }
   27193             : 
   27194           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   27195           0 :                 allow_remaining = true;
   27196             :         }
   27197             : 
   27198           0 :         return py_netr_LogonUasLogoff_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   27199             : }
   27200             : 
   27201           0 : static PyObject *py_netr_LogonUasLogoff_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   27202             : {
   27203           0 :         const struct ndr_interface_call *call = NULL;
   27204           0 :         struct netr_LogonUasLogoff *object = (struct netr_LogonUasLogoff *)pytalloc_get_ptr(py_obj);
   27205             :         PyObject *ret;
   27206             :         char *retstr;
   27207             : 
   27208           0 :         if (ndr_table_netlogon.num_calls < 2) {
   27209           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonUasLogoff_ndr_print");
   27210           0 :                 return NULL;
   27211             :         }
   27212           0 :         call = &ndr_table_netlogon.calls[1];
   27213             : 
   27214           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   27215           0 :         ret = PyUnicode_FromString(retstr);
   27216           0 :         TALLOC_FREE(retstr);
   27217             : 
   27218           0 :         return ret;
   27219             : }
   27220             : 
   27221           0 : static PyObject *py_netr_LogonUasLogoff_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   27222             : {
   27223           0 :         return py_netr_LogonUasLogoff_ndr_print(py_obj, "netr_LogonUasLogoff_in", NDR_IN);
   27224             : }
   27225             : 
   27226           0 : static PyObject *py_netr_LogonUasLogoff_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   27227             : {
   27228           0 :         return py_netr_LogonUasLogoff_ndr_print(py_obj, "netr_LogonUasLogoff_out", NDR_OUT);
   27229             : }
   27230             : 
   27231             : static PyMethodDef py_netr_LogonUasLogoff_methods[] = {
   27232             :         { "opnum", (PyCFunction)py_netr_LogonUasLogoff_ndr_opnum, METH_NOARGS|METH_CLASS,
   27233             :                 "netlogon.netr_LogonUasLogoff.opnum() -> 1 (0x01) " },
   27234             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogoff_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   27235             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   27236             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogoff_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   27237             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   27238             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogoff_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   27239             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   27240             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonUasLogoff_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   27241             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   27242             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonUasLogoff_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   27243             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonUasLogoff_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   27244             :         { NULL, NULL, 0, NULL }
   27245             : };
   27246             : 
   27247             : 
   27248             : static PyTypeObject netr_LogonUasLogoff_Type = {
   27249             :         PyVarObject_HEAD_INIT(NULL, 0)
   27250             :         .tp_name = "netlogon.netr_LogonUasLogoff",
   27251             :         .tp_getset = py_netr_LogonUasLogoff_getsetters,
   27252             :         .tp_methods = py_netr_LogonUasLogoff_methods,
   27253             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   27254             :         .tp_new = py_netr_LogonUasLogoff_new,
   27255             : };
   27256             : 
   27257           0 : static bool pack_py_netr_LogonUasLogoff_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonUasLogoff *r)
   27258             : {
   27259             :         PyObject *py_server_name;
   27260             :         PyObject *py_account_name;
   27261             :         PyObject *py_workstation;
   27262           0 :         const char *kwnames[] = {
   27263             :                 "server_name", "account_name", "workstation", NULL
   27264             :         };
   27265             : 
   27266           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:netr_LogonUasLogoff", discard_const_p(char *, kwnames), &py_server_name, &py_account_name, &py_workstation)) {
   27267           0 :                 return false;
   27268             :         }
   27269             : 
   27270           0 :         if (py_server_name == NULL) {
   27271           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   27272           0 :                 return false;
   27273             :         }
   27274           0 :         if (py_server_name == Py_None) {
   27275           0 :                 r->in.server_name = NULL;
   27276             :         } else {
   27277           0 :                 r->in.server_name = NULL;
   27278             :                 {
   27279             :                         const char *test_str;
   27280             :                         const char *talloc_str;
   27281           0 :                         PyObject *unicode = NULL;
   27282           0 :                         if (PyUnicode_Check(py_server_name)) {
   27283           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   27284           0 :                                 if (unicode == NULL) {
   27285           0 :                                         PyErr_NoMemory();
   27286           0 :                                         return false;
   27287             :                                 }
   27288           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27289           0 :                         } else if (PyBytes_Check(py_server_name)) {
   27290           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   27291             :                         } else {
   27292           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   27293           0 :                                 return false;
   27294             :                         }
   27295           0 :                         talloc_str = talloc_strdup(r, test_str);
   27296           0 :                         if (unicode != NULL) {
   27297           0 :                                 Py_DECREF(unicode);
   27298             :                         }
   27299           0 :                         if (talloc_str == NULL) {
   27300           0 :                                 PyErr_NoMemory();
   27301           0 :                                 return false;
   27302             :                         }
   27303           0 :                         r->in.server_name = talloc_str;
   27304             :                 }
   27305             :         }
   27306           0 :         if (py_account_name == NULL) {
   27307           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.account_name");
   27308           0 :                 return false;
   27309             :         }
   27310           0 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   27311           0 :         if (r->in.account_name == NULL) {
   27312           0 :                 PyErr_NoMemory();
   27313           0 :                 return false;
   27314             :         }
   27315             :         {
   27316             :                 const char *test_str;
   27317             :                 const char *talloc_str;
   27318           0 :                 PyObject *unicode = NULL;
   27319           0 :                 if (PyUnicode_Check(py_account_name)) {
   27320           0 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   27321           0 :                         if (unicode == NULL) {
   27322           0 :                                 PyErr_NoMemory();
   27323           0 :                                 return false;
   27324             :                         }
   27325           0 :                         test_str = PyBytes_AS_STRING(unicode);
   27326           0 :                 } else if (PyBytes_Check(py_account_name)) {
   27327           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   27328             :                 } else {
   27329           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   27330           0 :                         return false;
   27331             :                 }
   27332           0 :                 talloc_str = talloc_strdup(r, test_str);
   27333           0 :                 if (unicode != NULL) {
   27334           0 :                         Py_DECREF(unicode);
   27335             :                 }
   27336           0 :                 if (talloc_str == NULL) {
   27337           0 :                         PyErr_NoMemory();
   27338           0 :                         return false;
   27339             :                 }
   27340           0 :                 r->in.account_name = talloc_str;
   27341             :         }
   27342           0 :         if (py_workstation == NULL) {
   27343           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.workstation");
   27344           0 :                 return false;
   27345             :         }
   27346           0 :         r->in.workstation = talloc_ptrtype(r, r->in.workstation);
   27347           0 :         if (r->in.workstation == NULL) {
   27348           0 :                 PyErr_NoMemory();
   27349           0 :                 return false;
   27350             :         }
   27351             :         {
   27352             :                 const char *test_str;
   27353             :                 const char *talloc_str;
   27354           0 :                 PyObject *unicode = NULL;
   27355           0 :                 if (PyUnicode_Check(py_workstation)) {
   27356           0 :                         unicode = PyUnicode_AsEncodedString(py_workstation, "utf-8", "ignore");
   27357           0 :                         if (unicode == NULL) {
   27358           0 :                                 PyErr_NoMemory();
   27359           0 :                                 return false;
   27360             :                         }
   27361           0 :                         test_str = PyBytes_AS_STRING(unicode);
   27362           0 :                 } else if (PyBytes_Check(py_workstation)) {
   27363           0 :                         test_str = PyBytes_AS_STRING(py_workstation);
   27364             :                 } else {
   27365           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_workstation)->tp_name);
   27366           0 :                         return false;
   27367             :                 }
   27368           0 :                 talloc_str = talloc_strdup(r, test_str);
   27369           0 :                 if (unicode != NULL) {
   27370           0 :                         Py_DECREF(unicode);
   27371             :                 }
   27372           0 :                 if (talloc_str == NULL) {
   27373           0 :                         PyErr_NoMemory();
   27374           0 :                         return false;
   27375             :                 }
   27376           0 :                 r->in.workstation = talloc_str;
   27377             :         }
   27378           0 :         return true;
   27379             : }
   27380             : 
   27381           0 : static PyObject *unpack_py_netr_LogonUasLogoff_args_out(struct netr_LogonUasLogoff *r)
   27382             : {
   27383             :         PyObject *result;
   27384             :         PyObject *py_info;
   27385           0 :         py_info = pytalloc_reference_ex(&netr_UasLogoffInfo_Type, r->out.info, r->out.info);
   27386           0 :         result = py_info;
   27387           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   27388           0 :                 PyErr_SetWERROR(r->out.result);
   27389           0 :                 return NULL;
   27390             :         }
   27391             : 
   27392           0 :         return result;
   27393             : }
   27394             : 
   27395             : 
   27396           0 : static PyObject *py_netr_LogonSamLogon_in_get_server_name(PyObject *obj, void *closure)
   27397             : {
   27398           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(obj);
   27399             :         PyObject *py_server_name;
   27400           0 :         if (object->in.server_name == NULL) {
   27401           0 :                 Py_RETURN_NONE;
   27402             :         }
   27403           0 :         if (object->in.server_name == NULL) {
   27404           0 :                 py_server_name = Py_None;
   27405           0 :                 Py_INCREF(py_server_name);
   27406             :         } else {
   27407           0 :                 if (object->in.server_name == NULL) {
   27408           0 :                         py_server_name = Py_None;
   27409           0 :                         Py_INCREF(py_server_name);
   27410             :                 } else {
   27411           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   27412             :                 }
   27413             :         }
   27414           0 :         return py_server_name;
   27415             : }
   27416             : 
   27417           0 : static int py_netr_LogonSamLogon_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   27418             : {
   27419           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   27420           0 :         if (value == NULL) {
   27421           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   27422           0 :                 return -1;
   27423             :         }
   27424           0 :         if (value == Py_None) {
   27425           0 :                 object->in.server_name = NULL;
   27426             :         } else {
   27427           0 :                 object->in.server_name = NULL;
   27428             :                 {
   27429             :                         const char *test_str;
   27430             :                         const char *talloc_str;
   27431           0 :                         PyObject *unicode = NULL;
   27432           0 :                         if (PyUnicode_Check(value)) {
   27433           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27434           0 :                                 if (unicode == NULL) {
   27435           0 :                                         PyErr_NoMemory();
   27436           0 :                                         return -1;
   27437             :                                 }
   27438           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27439           0 :                         } else if (PyBytes_Check(value)) {
   27440           0 :                                 test_str = PyBytes_AS_STRING(value);
   27441             :                         } else {
   27442           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27443           0 :                                 return -1;
   27444             :                         }
   27445           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27446           0 :                         if (unicode != NULL) {
   27447           0 :                                 Py_DECREF(unicode);
   27448             :                         }
   27449           0 :                         if (talloc_str == NULL) {
   27450           0 :                                 PyErr_NoMemory();
   27451           0 :                                 return -1;
   27452             :                         }
   27453           0 :                         object->in.server_name = talloc_str;
   27454             :                 }
   27455             :         }
   27456           0 :         return 0;
   27457             : }
   27458             : 
   27459           0 : static PyObject *py_netr_LogonSamLogon_in_get_computer_name(PyObject *obj, void *closure)
   27460             : {
   27461           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(obj);
   27462             :         PyObject *py_computer_name;
   27463           0 :         if (object->in.computer_name == NULL) {
   27464           0 :                 Py_RETURN_NONE;
   27465             :         }
   27466           0 :         if (object->in.computer_name == NULL) {
   27467           0 :                 py_computer_name = Py_None;
   27468           0 :                 Py_INCREF(py_computer_name);
   27469             :         } else {
   27470           0 :                 if (object->in.computer_name == NULL) {
   27471           0 :                         py_computer_name = Py_None;
   27472           0 :                         Py_INCREF(py_computer_name);
   27473             :                 } else {
   27474           0 :                         py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   27475             :                 }
   27476             :         }
   27477           0 :         return py_computer_name;
   27478             : }
   27479             : 
   27480           0 : static int py_netr_LogonSamLogon_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   27481             : {
   27482           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   27483           0 :         if (value == NULL) {
   27484           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   27485           0 :                 return -1;
   27486             :         }
   27487           0 :         if (value == Py_None) {
   27488           0 :                 object->in.computer_name = NULL;
   27489             :         } else {
   27490           0 :                 object->in.computer_name = NULL;
   27491             :                 {
   27492             :                         const char *test_str;
   27493             :                         const char *talloc_str;
   27494           0 :                         PyObject *unicode = NULL;
   27495           0 :                         if (PyUnicode_Check(value)) {
   27496           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27497           0 :                                 if (unicode == NULL) {
   27498           0 :                                         PyErr_NoMemory();
   27499           0 :                                         return -1;
   27500             :                                 }
   27501           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27502           0 :                         } else if (PyBytes_Check(value)) {
   27503           0 :                                 test_str = PyBytes_AS_STRING(value);
   27504             :                         } else {
   27505           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27506           0 :                                 return -1;
   27507             :                         }
   27508           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27509           0 :                         if (unicode != NULL) {
   27510           0 :                                 Py_DECREF(unicode);
   27511             :                         }
   27512           0 :                         if (talloc_str == NULL) {
   27513           0 :                                 PyErr_NoMemory();
   27514           0 :                                 return -1;
   27515             :                         }
   27516           0 :                         object->in.computer_name = talloc_str;
   27517             :                 }
   27518             :         }
   27519           0 :         return 0;
   27520             : }
   27521             : 
   27522           0 : static PyObject *py_netr_LogonSamLogon_in_get_credential(PyObject *obj, void *closure)
   27523             : {
   27524           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(obj);
   27525             :         PyObject *py_credential;
   27526           0 :         if (object->in.credential == NULL) {
   27527           0 :                 Py_RETURN_NONE;
   27528             :         }
   27529           0 :         if (object->in.credential == NULL) {
   27530           0 :                 py_credential = Py_None;
   27531           0 :                 Py_INCREF(py_credential);
   27532             :         } else {
   27533           0 :                 py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   27534             :         }
   27535           0 :         return py_credential;
   27536             : }
   27537             : 
   27538           0 : static int py_netr_LogonSamLogon_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   27539             : {
   27540           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   27541           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   27542           0 :         if (value == NULL) {
   27543           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   27544           0 :                 return -1;
   27545             :         }
   27546           0 :         if (value == Py_None) {
   27547           0 :                 object->in.credential = NULL;
   27548             :         } else {
   27549           0 :                 object->in.credential = NULL;
   27550           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   27551           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   27552           0 :                         PyErr_NoMemory();
   27553           0 :                         return -1;
   27554             :                 }
   27555           0 :                 object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   27556             :         }
   27557           0 :         return 0;
   27558             : }
   27559             : 
   27560           0 : static PyObject *py_netr_LogonSamLogon_in_get_return_authenticator(PyObject *obj, void *closure)
   27561             : {
   27562           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(obj);
   27563             :         PyObject *py_return_authenticator;
   27564           0 :         if (object->in.return_authenticator == NULL) {
   27565           0 :                 Py_RETURN_NONE;
   27566             :         }
   27567           0 :         if (object->in.return_authenticator == NULL) {
   27568           0 :                 py_return_authenticator = Py_None;
   27569           0 :                 Py_INCREF(py_return_authenticator);
   27570             :         } else {
   27571           0 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   27572             :         }
   27573           0 :         return py_return_authenticator;
   27574             : }
   27575             : 
   27576           0 : static int py_netr_LogonSamLogon_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   27577             : {
   27578           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   27579           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   27580           0 :         if (value == NULL) {
   27581           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.return_authenticator");
   27582           0 :                 return -1;
   27583             :         }
   27584           0 :         if (value == Py_None) {
   27585           0 :                 object->in.return_authenticator = NULL;
   27586             :         } else {
   27587           0 :                 object->in.return_authenticator = NULL;
   27588           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   27589           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   27590           0 :                         PyErr_NoMemory();
   27591           0 :                         return -1;
   27592             :                 }
   27593           0 :                 object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   27594             :         }
   27595           0 :         return 0;
   27596             : }
   27597             : 
   27598           0 : static PyObject *py_netr_LogonSamLogon_out_get_return_authenticator(PyObject *obj, void *closure)
   27599             : {
   27600           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(obj);
   27601             :         PyObject *py_return_authenticator;
   27602           0 :         if (object->out.return_authenticator == NULL) {
   27603           0 :                 Py_RETURN_NONE;
   27604             :         }
   27605           0 :         if (object->out.return_authenticator == NULL) {
   27606           0 :                 py_return_authenticator = Py_None;
   27607           0 :                 Py_INCREF(py_return_authenticator);
   27608             :         } else {
   27609           0 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   27610             :         }
   27611           0 :         return py_return_authenticator;
   27612             : }
   27613             : 
   27614           0 : static int py_netr_LogonSamLogon_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   27615             : {
   27616           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   27617           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   27618           0 :         if (value == NULL) {
   27619           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   27620           0 :                 return -1;
   27621             :         }
   27622           0 :         if (value == Py_None) {
   27623           0 :                 object->out.return_authenticator = NULL;
   27624             :         } else {
   27625           0 :                 object->out.return_authenticator = NULL;
   27626           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   27627           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   27628           0 :                         PyErr_NoMemory();
   27629           0 :                         return -1;
   27630             :                 }
   27631           0 :                 object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   27632             :         }
   27633           0 :         return 0;
   27634             : }
   27635             : 
   27636           0 : static PyObject *py_netr_LogonSamLogon_in_get_logon_level(PyObject *obj, void *closure)
   27637             : {
   27638           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(obj);
   27639             :         PyObject *py_logon_level;
   27640           0 :         py_logon_level = PyLong_FromLong((uint16_t)object->in.logon_level);
   27641           0 :         return py_logon_level;
   27642             : }
   27643             : 
   27644           0 : static int py_netr_LogonSamLogon_in_set_logon_level(PyObject *py_obj, PyObject *value, void *closure)
   27645             : {
   27646           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   27647           0 :         if (value == NULL) {
   27648           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_level");
   27649           0 :                 return -1;
   27650             :         }
   27651             :         {
   27652           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.logon_level));
   27653           0 :                 if (PyLong_Check(value)) {
   27654             :                         unsigned long long test_var;
   27655           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27656           0 :                         if (PyErr_Occurred() != NULL) {
   27657           0 :                                 return -1;
   27658             :                         }
   27659           0 :                         if (test_var > uint_max) {
   27660           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   27661             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27662           0 :                                 return -1;
   27663             :                         }
   27664           0 :                         object->in.logon_level = test_var;
   27665             :                 } else {
   27666           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   27667             :                           PyLong_Type.tp_name);
   27668           0 :                         return -1;
   27669             :                 }
   27670             :         }
   27671           0 :         return 0;
   27672             : }
   27673             : 
   27674           0 : static PyObject *py_netr_LogonSamLogon_in_get_logon(PyObject *obj, void *closure)
   27675             : {
   27676           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(obj);
   27677             :         PyObject *py_logon;
   27678           0 :         if (object->in.logon == NULL) {
   27679           0 :                 Py_RETURN_NONE;
   27680             :         }
   27681           0 :         py_logon = pyrpc_import_union(&netr_LogonLevel_Type, object->in.logon, object->in.logon_level, object->in.logon, "union netr_LogonLevel");
   27682           0 :         if (py_logon == NULL) {
   27683           0 :                 return NULL;
   27684             :         }
   27685           0 :         return py_logon;
   27686             : }
   27687             : 
   27688           0 : static int py_netr_LogonSamLogon_in_set_logon(PyObject *py_obj, PyObject *value, void *closure)
   27689             : {
   27690           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   27691           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.logon));
   27692           0 :         if (value == NULL) {
   27693           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon");
   27694           0 :                 return -1;
   27695             :         }
   27696           0 :         object->in.logon = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon);
   27697           0 :         if (object->in.logon == NULL) {
   27698           0 :                 PyErr_NoMemory();
   27699           0 :                 return -1;
   27700             :         }
   27701             :         {
   27702             :                 union netr_LogonLevel *logon_switch_1;
   27703           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");
   27704           0 :                 if (logon_switch_1 == NULL) {
   27705           0 :                         return -1;
   27706             :                 }
   27707           0 :                 object->in.logon = logon_switch_1;
   27708             :         }
   27709           0 :         return 0;
   27710             : }
   27711             : 
   27712           0 : static PyObject *py_netr_LogonSamLogon_in_get_validation_level(PyObject *obj, void *closure)
   27713             : {
   27714           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(obj);
   27715             :         PyObject *py_validation_level;
   27716           0 :         py_validation_level = PyLong_FromLong((uint16_t)object->in.validation_level);
   27717           0 :         return py_validation_level;
   27718             : }
   27719             : 
   27720           0 : static int py_netr_LogonSamLogon_in_set_validation_level(PyObject *py_obj, PyObject *value, void *closure)
   27721             : {
   27722           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   27723           0 :         if (value == NULL) {
   27724           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.validation_level");
   27725           0 :                 return -1;
   27726             :         }
   27727             :         {
   27728           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.validation_level));
   27729           0 :                 if (PyLong_Check(value)) {
   27730             :                         unsigned long long test_var;
   27731           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27732           0 :                         if (PyErr_Occurred() != NULL) {
   27733           0 :                                 return -1;
   27734             :                         }
   27735           0 :                         if (test_var > uint_max) {
   27736           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   27737             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27738           0 :                                 return -1;
   27739             :                         }
   27740           0 :                         object->in.validation_level = test_var;
   27741             :                 } else {
   27742           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   27743             :                           PyLong_Type.tp_name);
   27744           0 :                         return -1;
   27745             :                 }
   27746             :         }
   27747           0 :         return 0;
   27748             : }
   27749             : 
   27750           0 : static PyObject *py_netr_LogonSamLogon_out_get_validation(PyObject *obj, void *closure)
   27751             : {
   27752           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(obj);
   27753             :         PyObject *py_validation;
   27754           0 :         if (object->out.validation == NULL) {
   27755           0 :                 Py_RETURN_NONE;
   27756             :         }
   27757           0 :         py_validation = pyrpc_import_union(&netr_Validation_Type, object->out.validation, object->in.validation_level, object->out.validation, "union netr_Validation");
   27758           0 :         if (py_validation == NULL) {
   27759           0 :                 return NULL;
   27760             :         }
   27761           0 :         return py_validation;
   27762             : }
   27763             : 
   27764           0 : static int py_netr_LogonSamLogon_out_set_validation(PyObject *py_obj, PyObject *value, void *closure)
   27765             : {
   27766           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   27767           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.validation));
   27768           0 :         if (value == NULL) {
   27769           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.validation");
   27770           0 :                 return -1;
   27771             :         }
   27772           0 :         object->out.validation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.validation);
   27773           0 :         if (object->out.validation == NULL) {
   27774           0 :                 PyErr_NoMemory();
   27775           0 :                 return -1;
   27776             :         }
   27777             :         {
   27778             :                 union netr_Validation *validation_switch_1;
   27779           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");
   27780           0 :                 if (validation_switch_1 == NULL) {
   27781           0 :                         return -1;
   27782             :                 }
   27783           0 :                 object->out.validation = validation_switch_1;
   27784             :         }
   27785           0 :         return 0;
   27786             : }
   27787             : 
   27788           0 : static PyObject *py_netr_LogonSamLogon_out_get_authoritative(PyObject *obj, void *closure)
   27789             : {
   27790           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(obj);
   27791             :         PyObject *py_authoritative;
   27792           0 :         if (object->out.authoritative == NULL) {
   27793           0 :                 Py_RETURN_NONE;
   27794             :         }
   27795           0 :         py_authoritative = PyLong_FromLong((uint16_t)*object->out.authoritative);
   27796           0 :         return py_authoritative;
   27797             : }
   27798             : 
   27799           0 : static int py_netr_LogonSamLogon_out_set_authoritative(PyObject *py_obj, PyObject *value, void *closure)
   27800             : {
   27801           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   27802           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.authoritative));
   27803           0 :         if (value == NULL) {
   27804           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.authoritative");
   27805           0 :                 return -1;
   27806             :         }
   27807           0 :         object->out.authoritative = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.authoritative);
   27808           0 :         if (object->out.authoritative == NULL) {
   27809           0 :                 PyErr_NoMemory();
   27810           0 :                 return -1;
   27811             :         }
   27812             :         {
   27813           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.authoritative));
   27814           0 :                 if (PyLong_Check(value)) {
   27815             :                         unsigned long long test_var;
   27816           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27817           0 :                         if (PyErr_Occurred() != NULL) {
   27818           0 :                                 return -1;
   27819             :                         }
   27820           0 :                         if (test_var > uint_max) {
   27821           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   27822             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27823           0 :                                 return -1;
   27824             :                         }
   27825           0 :                         *object->out.authoritative = test_var;
   27826             :                 } else {
   27827           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   27828             :                           PyLong_Type.tp_name);
   27829           0 :                         return -1;
   27830             :                 }
   27831             :         }
   27832           0 :         return 0;
   27833             : }
   27834             : 
   27835           0 : static PyObject *py_netr_LogonSamLogon_get_result(PyObject *obj, void *closure)
   27836             : {
   27837           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(obj);
   27838             :         PyObject *py_result;
   27839           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   27840           0 :         return py_result;
   27841             : }
   27842             : 
   27843           0 : static int py_netr_LogonSamLogon_set_result(PyObject *py_obj, PyObject *value, void *closure)
   27844             : {
   27845           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   27846           0 :         if (value == NULL) {
   27847           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   27848           0 :                 return -1;
   27849             :         }
   27850           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   27851           0 :         return 0;
   27852             : }
   27853             : 
   27854             : static PyGetSetDef py_netr_LogonSamLogon_getsetters[] = {
   27855             :         {
   27856             :                 .name = discard_const_p(char, "in_server_name"),
   27857             :                 .get = py_netr_LogonSamLogon_in_get_server_name,
   27858             :                 .set = py_netr_LogonSamLogon_in_set_server_name,
   27859             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   27860             :         },
   27861             :         {
   27862             :                 .name = discard_const_p(char, "in_computer_name"),
   27863             :                 .get = py_netr_LogonSamLogon_in_get_computer_name,
   27864             :                 .set = py_netr_LogonSamLogon_in_set_computer_name,
   27865             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   27866             :         },
   27867             :         {
   27868             :                 .name = discard_const_p(char, "in_credential"),
   27869             :                 .get = py_netr_LogonSamLogon_in_get_credential,
   27870             :                 .set = py_netr_LogonSamLogon_in_set_credential,
   27871             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   27872             :         },
   27873             :         {
   27874             :                 .name = discard_const_p(char, "in_return_authenticator"),
   27875             :                 .get = py_netr_LogonSamLogon_in_get_return_authenticator,
   27876             :                 .set = py_netr_LogonSamLogon_in_set_return_authenticator,
   27877             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   27878             :         },
   27879             :         {
   27880             :                 .name = discard_const_p(char, "out_return_authenticator"),
   27881             :                 .get = py_netr_LogonSamLogon_out_get_return_authenticator,
   27882             :                 .set = py_netr_LogonSamLogon_out_set_return_authenticator,
   27883             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   27884             :         },
   27885             :         {
   27886             :                 .name = discard_const_p(char, "in_logon_level"),
   27887             :                 .get = py_netr_LogonSamLogon_in_get_logon_level,
   27888             :                 .set = py_netr_LogonSamLogon_in_set_logon_level,
   27889             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonInfoClass")
   27890             :         },
   27891             :         {
   27892             :                 .name = discard_const_p(char, "in_logon"),
   27893             :                 .get = py_netr_LogonSamLogon_in_get_logon,
   27894             :                 .set = py_netr_LogonSamLogon_in_set_logon,
   27895             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonLevel")
   27896             :         },
   27897             :         {
   27898             :                 .name = discard_const_p(char, "in_validation_level"),
   27899             :                 .get = py_netr_LogonSamLogon_in_get_validation_level,
   27900             :                 .set = py_netr_LogonSamLogon_in_set_validation_level,
   27901             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   27902             :         },
   27903             :         {
   27904             :                 .name = discard_const_p(char, "out_validation"),
   27905             :                 .get = py_netr_LogonSamLogon_out_get_validation,
   27906             :                 .set = py_netr_LogonSamLogon_out_set_validation,
   27907             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Validation")
   27908             :         },
   27909             :         {
   27910             :                 .name = discard_const_p(char, "out_authoritative"),
   27911             :                 .get = py_netr_LogonSamLogon_out_get_authoritative,
   27912             :                 .set = py_netr_LogonSamLogon_out_set_authoritative,
   27913             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   27914             :         },
   27915             :         {
   27916             :                 .name = discard_const_p(char, "result"),
   27917             :                 .get = py_netr_LogonSamLogon_get_result,
   27918             :                 .set = py_netr_LogonSamLogon_set_result,
   27919             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   27920             :         },
   27921             :         { .name = NULL }
   27922             : };
   27923             : 
   27924           0 : static PyObject *py_netr_LogonSamLogon_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   27925             : {
   27926           0 :         PyObject *self = pytalloc_new(struct netr_LogonSamLogon, type);
   27927           0 :         struct netr_LogonSamLogon *_self = (struct netr_LogonSamLogon *)pytalloc_get_ptr(self);
   27928           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   27929           0 :         _self->in.logon = talloc_zero(mem_ctx, union netr_LogonLevel);
   27930           0 :         _self->out.validation = talloc_zero(mem_ctx, union netr_Validation);
   27931           0 :         _self->out.authoritative = talloc_zero(mem_ctx, uint8_t);
   27932           0 :         return self;
   27933             : }
   27934             : 
   27935           0 : static PyObject *py_netr_LogonSamLogon_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   27936             : {
   27937             : 
   27938             : 
   27939           0 :         return PyLong_FromLong(2);
   27940             : }
   27941             : 
   27942           0 : static PyObject *py_netr_LogonSamLogon_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   27943             : {
   27944           0 :         const struct ndr_interface_call *call = NULL;
   27945           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   27946           0 :         PyObject *ret = NULL;
   27947           0 :         struct ndr_push *push = NULL;
   27948             :         DATA_BLOB blob;
   27949             :         enum ndr_err_code err;
   27950             : 
   27951           0 :         if (ndr_table_netlogon.num_calls < 3) {
   27952           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogon_ndr_pack");
   27953           0 :                 return NULL;
   27954             :         }
   27955           0 :         call = &ndr_table_netlogon.calls[2];
   27956             : 
   27957           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   27958           0 :         if (push == NULL) {
   27959           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   27960           0 :                 return NULL;
   27961             :         }
   27962             : 
   27963           0 :         push->flags |= ndr_push_flags;
   27964             : 
   27965           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   27966           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   27967           0 :                 TALLOC_FREE(push);
   27968           0 :                 PyErr_SetNdrError(err);
   27969           0 :                 return NULL;
   27970             :         }
   27971           0 :         blob = ndr_push_blob(push);
   27972           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   27973           0 :         TALLOC_FREE(push);
   27974           0 :         return ret;
   27975             : }
   27976             : 
   27977           0 : static PyObject *py_netr_LogonSamLogon_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   27978             : {
   27979           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   27980           0 :         PyObject *bigendian_obj = NULL;
   27981           0 :         PyObject *ndr64_obj = NULL;
   27982           0 :         uint32_t ndr_push_flags = 0;
   27983             : 
   27984           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   27985             :                 discard_const_p(char *, kwnames),
   27986             :                 &bigendian_obj,
   27987             :                 &ndr64_obj)) {
   27988           0 :                 return NULL;
   27989             :         }
   27990             : 
   27991           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   27992           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   27993             :         }
   27994           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   27995           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   27996             :         }
   27997             : 
   27998           0 :         return py_netr_LogonSamLogon_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   27999             : }
   28000             : 
   28001           0 : static PyObject *py_netr_LogonSamLogon_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   28002             : {
   28003           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   28004           0 :         PyObject *bigendian_obj = NULL;
   28005           0 :         PyObject *ndr64_obj = NULL;
   28006           0 :         uint32_t ndr_push_flags = 0;
   28007             : 
   28008           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   28009             :                 discard_const_p(char *, kwnames),
   28010             :                 &bigendian_obj,
   28011             :                 &ndr64_obj)) {
   28012           0 :                 return NULL;
   28013             :         }
   28014             : 
   28015           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   28016           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   28017             :         }
   28018           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   28019           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   28020             :         }
   28021             : 
   28022           0 :         return py_netr_LogonSamLogon_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   28023             : }
   28024             : 
   28025           0 : static PyObject *py_netr_LogonSamLogon_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   28026             : {
   28027           0 :         const struct ndr_interface_call *call = NULL;
   28028           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   28029           0 :         struct ndr_pull *pull = NULL;
   28030             :         enum ndr_err_code err;
   28031             : 
   28032           0 :         if (ndr_table_netlogon.num_calls < 3) {
   28033           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogon_ndr_unpack");
   28034           0 :                 return NULL;
   28035             :         }
   28036           0 :         call = &ndr_table_netlogon.calls[2];
   28037             : 
   28038           0 :         pull = ndr_pull_init_blob(blob, object);
   28039           0 :         if (pull == NULL) {
   28040           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   28041           0 :                 return NULL;
   28042             :         }
   28043             : 
   28044           0 :         pull->flags |= ndr_pull_flags;
   28045             : 
   28046           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   28047           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   28048           0 :                 TALLOC_FREE(pull);
   28049           0 :                 PyErr_SetNdrError(err);
   28050           0 :                 return NULL;
   28051             :         }
   28052           0 :         if (!allow_remaining) {
   28053             :                 uint32_t highest_ofs;
   28054             : 
   28055           0 :                 if (pull->offset > pull->relative_highest_offset) {
   28056           0 :                         highest_ofs = pull->offset;
   28057             :                 } else {
   28058           0 :                         highest_ofs = pull->relative_highest_offset;
   28059             :                 }
   28060           0 :                 if (highest_ofs < pull->data_size) {
   28061           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   28062             :                                 "not all bytes consumed ofs[%u] size[%u]",
   28063             :                                 highest_ofs, pull->data_size);
   28064           0 :                         TALLOC_FREE(pull);
   28065           0 :                         PyErr_SetNdrError(err);
   28066           0 :                         return NULL;
   28067             :                 }
   28068             :         }
   28069             : 
   28070           0 :         TALLOC_FREE(pull);
   28071           0 :         Py_RETURN_NONE;
   28072             : }
   28073             : 
   28074           0 : static PyObject *py_netr_LogonSamLogon_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   28075             : {
   28076             :         DATA_BLOB blob;
   28077           0 :         Py_ssize_t blob_length = 0;
   28078           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   28079           0 :         PyObject *bigendian_obj = NULL;
   28080           0 :         PyObject *ndr64_obj = NULL;
   28081           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   28082           0 :         PyObject *allow_remaining_obj = NULL;
   28083           0 :         bool allow_remaining = false;
   28084             : 
   28085           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   28086             :                 discard_const_p(char *, kwnames),
   28087             :                 &blob.data, &blob_length,
   28088             :                 &bigendian_obj,
   28089             :                 &ndr64_obj,
   28090             :                 &allow_remaining_obj)) {
   28091           0 :                 return NULL;
   28092             :         }
   28093           0 :         blob.length = blob_length;
   28094             : 
   28095           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   28096           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   28097             :         }
   28098           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   28099           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   28100             :         }
   28101             : 
   28102           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   28103           0 :                 allow_remaining = true;
   28104             :         }
   28105             : 
   28106           0 :         return py_netr_LogonSamLogon_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   28107             : }
   28108             : 
   28109           0 : static PyObject *py_netr_LogonSamLogon_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   28110             : {
   28111             :         DATA_BLOB blob;
   28112           0 :         Py_ssize_t blob_length = 0;
   28113           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   28114           0 :         PyObject *bigendian_obj = NULL;
   28115           0 :         PyObject *ndr64_obj = NULL;
   28116           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   28117           0 :         PyObject *allow_remaining_obj = NULL;
   28118           0 :         bool allow_remaining = false;
   28119             : 
   28120           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   28121             :                 discard_const_p(char *, kwnames),
   28122             :                 &blob.data, &blob_length,
   28123             :                 &bigendian_obj,
   28124             :                 &ndr64_obj,
   28125             :                 &allow_remaining_obj)) {
   28126           0 :                 return NULL;
   28127             :         }
   28128           0 :         blob.length = blob_length;
   28129             : 
   28130           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   28131           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   28132             :         }
   28133           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   28134           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   28135             :         }
   28136             : 
   28137           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   28138           0 :                 allow_remaining = true;
   28139             :         }
   28140             : 
   28141           0 :         return py_netr_LogonSamLogon_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   28142             : }
   28143             : 
   28144           0 : static PyObject *py_netr_LogonSamLogon_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   28145             : {
   28146           0 :         const struct ndr_interface_call *call = NULL;
   28147           0 :         struct netr_LogonSamLogon *object = (struct netr_LogonSamLogon *)pytalloc_get_ptr(py_obj);
   28148             :         PyObject *ret;
   28149             :         char *retstr;
   28150             : 
   28151           0 :         if (ndr_table_netlogon.num_calls < 3) {
   28152           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogon_ndr_print");
   28153           0 :                 return NULL;
   28154             :         }
   28155           0 :         call = &ndr_table_netlogon.calls[2];
   28156             : 
   28157           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   28158           0 :         ret = PyUnicode_FromString(retstr);
   28159           0 :         TALLOC_FREE(retstr);
   28160             : 
   28161           0 :         return ret;
   28162             : }
   28163             : 
   28164           0 : static PyObject *py_netr_LogonSamLogon_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   28165             : {
   28166           0 :         return py_netr_LogonSamLogon_ndr_print(py_obj, "netr_LogonSamLogon_in", NDR_IN);
   28167             : }
   28168             : 
   28169           0 : static PyObject *py_netr_LogonSamLogon_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   28170             : {
   28171           0 :         return py_netr_LogonSamLogon_ndr_print(py_obj, "netr_LogonSamLogon_out", NDR_OUT);
   28172             : }
   28173             : 
   28174             : static PyMethodDef py_netr_LogonSamLogon_methods[] = {
   28175             :         { "opnum", (PyCFunction)py_netr_LogonSamLogon_ndr_opnum, METH_NOARGS|METH_CLASS,
   28176             :                 "netlogon.netr_LogonSamLogon.opnum() -> 2 (0x02) " },
   28177             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogon_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   28178             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   28179             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogon_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   28180             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   28181             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogon_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   28182             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   28183             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogon_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   28184             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   28185             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonSamLogon_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   28186             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonSamLogon_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   28187             :         { NULL, NULL, 0, NULL }
   28188             : };
   28189             : 
   28190             : 
   28191             : static PyTypeObject netr_LogonSamLogon_Type = {
   28192             :         PyVarObject_HEAD_INIT(NULL, 0)
   28193             :         .tp_name = "netlogon.netr_LogonSamLogon",
   28194             :         .tp_getset = py_netr_LogonSamLogon_getsetters,
   28195             :         .tp_methods = py_netr_LogonSamLogon_methods,
   28196             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   28197             :         .tp_new = py_netr_LogonSamLogon_new,
   28198             : };
   28199             : 
   28200           0 : static bool pack_py_netr_LogonSamLogon_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonSamLogon *r)
   28201             : {
   28202             :         PyObject *py_server_name;
   28203             :         PyObject *py_computer_name;
   28204             :         PyObject *py_credential;
   28205             :         PyObject *py_return_authenticator;
   28206             :         PyObject *py_logon_level;
   28207             :         PyObject *py_logon;
   28208             :         PyObject *py_validation_level;
   28209           0 :         const char *kwnames[] = {
   28210             :                 "server_name", "computer_name", "credential", "return_authenticator", "logon_level", "logon", "validation_level", NULL
   28211             :         };
   28212             : 
   28213           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)) {
   28214           0 :                 return false;
   28215             :         }
   28216             : 
   28217           0 :         if (py_server_name == NULL) {
   28218           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   28219           0 :                 return false;
   28220             :         }
   28221           0 :         if (py_server_name == Py_None) {
   28222           0 :                 r->in.server_name = NULL;
   28223             :         } else {
   28224           0 :                 r->in.server_name = NULL;
   28225             :                 {
   28226             :                         const char *test_str;
   28227             :                         const char *talloc_str;
   28228           0 :                         PyObject *unicode = NULL;
   28229           0 :                         if (PyUnicode_Check(py_server_name)) {
   28230           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   28231           0 :                                 if (unicode == NULL) {
   28232           0 :                                         PyErr_NoMemory();
   28233           0 :                                         return false;
   28234             :                                 }
   28235           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   28236           0 :                         } else if (PyBytes_Check(py_server_name)) {
   28237           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   28238             :                         } else {
   28239           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   28240           0 :                                 return false;
   28241             :                         }
   28242           0 :                         talloc_str = talloc_strdup(r, test_str);
   28243           0 :                         if (unicode != NULL) {
   28244           0 :                                 Py_DECREF(unicode);
   28245             :                         }
   28246           0 :                         if (talloc_str == NULL) {
   28247           0 :                                 PyErr_NoMemory();
   28248           0 :                                 return false;
   28249             :                         }
   28250           0 :                         r->in.server_name = talloc_str;
   28251             :                 }
   28252             :         }
   28253           0 :         if (py_computer_name == NULL) {
   28254           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   28255           0 :                 return false;
   28256             :         }
   28257           0 :         if (py_computer_name == Py_None) {
   28258           0 :                 r->in.computer_name = NULL;
   28259             :         } else {
   28260           0 :                 r->in.computer_name = NULL;
   28261             :                 {
   28262             :                         const char *test_str;
   28263             :                         const char *talloc_str;
   28264           0 :                         PyObject *unicode = NULL;
   28265           0 :                         if (PyUnicode_Check(py_computer_name)) {
   28266           0 :                                 unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   28267           0 :                                 if (unicode == NULL) {
   28268           0 :                                         PyErr_NoMemory();
   28269           0 :                                         return false;
   28270             :                                 }
   28271           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   28272           0 :                         } else if (PyBytes_Check(py_computer_name)) {
   28273           0 :                                 test_str = PyBytes_AS_STRING(py_computer_name);
   28274             :                         } else {
   28275           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   28276           0 :                                 return false;
   28277             :                         }
   28278           0 :                         talloc_str = talloc_strdup(r, test_str);
   28279           0 :                         if (unicode != NULL) {
   28280           0 :                                 Py_DECREF(unicode);
   28281             :                         }
   28282           0 :                         if (talloc_str == NULL) {
   28283           0 :                                 PyErr_NoMemory();
   28284           0 :                                 return false;
   28285             :                         }
   28286           0 :                         r->in.computer_name = talloc_str;
   28287             :                 }
   28288             :         }
   28289           0 :         if (py_credential == NULL) {
   28290           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   28291           0 :                 return false;
   28292             :         }
   28293           0 :         if (py_credential == Py_None) {
   28294           0 :                 r->in.credential = NULL;
   28295             :         } else {
   28296           0 :                 r->in.credential = NULL;
   28297           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   28298           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   28299           0 :                         PyErr_NoMemory();
   28300           0 :                         return false;
   28301             :                 }
   28302           0 :                 r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   28303             :         }
   28304           0 :         if (py_return_authenticator == NULL) {
   28305           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.return_authenticator");
   28306           0 :                 return false;
   28307             :         }
   28308           0 :         if (py_return_authenticator == Py_None) {
   28309           0 :                 r->in.return_authenticator = NULL;
   28310             :         } else {
   28311           0 :                 r->in.return_authenticator = NULL;
   28312           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   28313           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   28314           0 :                         PyErr_NoMemory();
   28315           0 :                         return false;
   28316             :                 }
   28317           0 :                 r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   28318             :         }
   28319           0 :         if (py_logon_level == NULL) {
   28320           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_level");
   28321           0 :                 return false;
   28322             :         }
   28323             :         {
   28324           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.logon_level));
   28325           0 :                 if (PyLong_Check(py_logon_level)) {
   28326             :                         unsigned long long test_var;
   28327           0 :                         test_var = PyLong_AsUnsignedLongLong(py_logon_level);
   28328           0 :                         if (PyErr_Occurred() != NULL) {
   28329           0 :                                 return false;
   28330             :                         }
   28331           0 :                         if (test_var > uint_max) {
   28332           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   28333             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28334           0 :                                 return false;
   28335             :                         }
   28336           0 :                         r->in.logon_level = test_var;
   28337             :                 } else {
   28338           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   28339             :                           PyLong_Type.tp_name);
   28340           0 :                         return false;
   28341             :                 }
   28342             :         }
   28343           0 :         if (py_logon == NULL) {
   28344           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon");
   28345           0 :                 return false;
   28346             :         }
   28347           0 :         r->in.logon = talloc_ptrtype(r, r->in.logon);
   28348           0 :         if (r->in.logon == NULL) {
   28349           0 :                 PyErr_NoMemory();
   28350           0 :                 return false;
   28351             :         }
   28352             :         {
   28353             :                 union netr_LogonLevel *logon_switch_1;
   28354           0 :                 logon_switch_1 = (union netr_LogonLevel *)pyrpc_export_union(&netr_LogonLevel_Type, r, r->in.logon_level, py_logon, "union netr_LogonLevel");
   28355           0 :                 if (logon_switch_1 == NULL) {
   28356           0 :                         return false;
   28357             :                 }
   28358           0 :                 r->in.logon = logon_switch_1;
   28359             :         }
   28360           0 :         if (py_validation_level == NULL) {
   28361           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.validation_level");
   28362           0 :                 return false;
   28363             :         }
   28364             :         {
   28365           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.validation_level));
   28366           0 :                 if (PyLong_Check(py_validation_level)) {
   28367             :                         unsigned long long test_var;
   28368           0 :                         test_var = PyLong_AsUnsignedLongLong(py_validation_level);
   28369           0 :                         if (PyErr_Occurred() != NULL) {
   28370           0 :                                 return false;
   28371             :                         }
   28372           0 :                         if (test_var > uint_max) {
   28373           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   28374             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28375           0 :                                 return false;
   28376             :                         }
   28377           0 :                         r->in.validation_level = test_var;
   28378             :                 } else {
   28379           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   28380             :                           PyLong_Type.tp_name);
   28381           0 :                         return false;
   28382             :                 }
   28383             :         }
   28384           0 :         return true;
   28385             : }
   28386             : 
   28387           0 : static PyObject *unpack_py_netr_LogonSamLogon_args_out(struct netr_LogonSamLogon *r)
   28388             : {
   28389             :         PyObject *result;
   28390             :         PyObject *py_return_authenticator;
   28391             :         PyObject *py_validation;
   28392             :         PyObject *py_authoritative;
   28393           0 :         result = PyTuple_New(3);
   28394           0 :         if (r->out.return_authenticator == NULL) {
   28395           0 :                 py_return_authenticator = Py_None;
   28396           0 :                 Py_INCREF(py_return_authenticator);
   28397             :         } else {
   28398           0 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   28399             :         }
   28400           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   28401           0 :         py_validation = pyrpc_import_union(&netr_Validation_Type, r->out.validation, r->in.validation_level, r->out.validation, "union netr_Validation");
   28402           0 :         if (py_validation == NULL) {
   28403           0 :                 return NULL;
   28404             :         }
   28405           0 :         PyTuple_SetItem(result, 1, py_validation);
   28406           0 :         py_authoritative = PyLong_FromLong((uint16_t)*r->out.authoritative);
   28407           0 :         PyTuple_SetItem(result, 2, py_authoritative);
   28408           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   28409           0 :                 PyErr_SetNTSTATUS(r->out.result);
   28410           0 :                 return NULL;
   28411             :         }
   28412             : 
   28413           0 :         return result;
   28414             : }
   28415             : 
   28416             : 
   28417           0 : static PyObject *py_netr_LogonSamLogoff_in_get_server_name(PyObject *obj, void *closure)
   28418             : {
   28419           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(obj);
   28420             :         PyObject *py_server_name;
   28421           0 :         if (object->in.server_name == NULL) {
   28422           0 :                 Py_RETURN_NONE;
   28423             :         }
   28424           0 :         if (object->in.server_name == NULL) {
   28425           0 :                 py_server_name = Py_None;
   28426           0 :                 Py_INCREF(py_server_name);
   28427             :         } else {
   28428           0 :                 if (object->in.server_name == NULL) {
   28429           0 :                         py_server_name = Py_None;
   28430           0 :                         Py_INCREF(py_server_name);
   28431             :                 } else {
   28432           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   28433             :                 }
   28434             :         }
   28435           0 :         return py_server_name;
   28436             : }
   28437             : 
   28438           0 : static int py_netr_LogonSamLogoff_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   28439             : {
   28440           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(py_obj);
   28441           0 :         if (value == NULL) {
   28442           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   28443           0 :                 return -1;
   28444             :         }
   28445           0 :         if (value == Py_None) {
   28446           0 :                 object->in.server_name = NULL;
   28447             :         } else {
   28448           0 :                 object->in.server_name = NULL;
   28449             :                 {
   28450             :                         const char *test_str;
   28451             :                         const char *talloc_str;
   28452           0 :                         PyObject *unicode = NULL;
   28453           0 :                         if (PyUnicode_Check(value)) {
   28454           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   28455           0 :                                 if (unicode == NULL) {
   28456           0 :                                         PyErr_NoMemory();
   28457           0 :                                         return -1;
   28458             :                                 }
   28459           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   28460           0 :                         } else if (PyBytes_Check(value)) {
   28461           0 :                                 test_str = PyBytes_AS_STRING(value);
   28462             :                         } else {
   28463           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   28464           0 :                                 return -1;
   28465             :                         }
   28466           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   28467           0 :                         if (unicode != NULL) {
   28468           0 :                                 Py_DECREF(unicode);
   28469             :                         }
   28470           0 :                         if (talloc_str == NULL) {
   28471           0 :                                 PyErr_NoMemory();
   28472           0 :                                 return -1;
   28473             :                         }
   28474           0 :                         object->in.server_name = talloc_str;
   28475             :                 }
   28476             :         }
   28477           0 :         return 0;
   28478             : }
   28479             : 
   28480           0 : static PyObject *py_netr_LogonSamLogoff_in_get_computer_name(PyObject *obj, void *closure)
   28481             : {
   28482           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(obj);
   28483             :         PyObject *py_computer_name;
   28484           0 :         if (object->in.computer_name == NULL) {
   28485           0 :                 Py_RETURN_NONE;
   28486             :         }
   28487           0 :         if (object->in.computer_name == NULL) {
   28488           0 :                 py_computer_name = Py_None;
   28489           0 :                 Py_INCREF(py_computer_name);
   28490             :         } else {
   28491           0 :                 if (object->in.computer_name == NULL) {
   28492           0 :                         py_computer_name = Py_None;
   28493           0 :                         Py_INCREF(py_computer_name);
   28494             :                 } else {
   28495           0 :                         py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   28496             :                 }
   28497             :         }
   28498           0 :         return py_computer_name;
   28499             : }
   28500             : 
   28501           0 : static int py_netr_LogonSamLogoff_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   28502             : {
   28503           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(py_obj);
   28504           0 :         if (value == NULL) {
   28505           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   28506           0 :                 return -1;
   28507             :         }
   28508           0 :         if (value == Py_None) {
   28509           0 :                 object->in.computer_name = NULL;
   28510             :         } else {
   28511           0 :                 object->in.computer_name = NULL;
   28512             :                 {
   28513             :                         const char *test_str;
   28514             :                         const char *talloc_str;
   28515           0 :                         PyObject *unicode = NULL;
   28516           0 :                         if (PyUnicode_Check(value)) {
   28517           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   28518           0 :                                 if (unicode == NULL) {
   28519           0 :                                         PyErr_NoMemory();
   28520           0 :                                         return -1;
   28521             :                                 }
   28522           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   28523           0 :                         } else if (PyBytes_Check(value)) {
   28524           0 :                                 test_str = PyBytes_AS_STRING(value);
   28525             :                         } else {
   28526           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   28527           0 :                                 return -1;
   28528             :                         }
   28529           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   28530           0 :                         if (unicode != NULL) {
   28531           0 :                                 Py_DECREF(unicode);
   28532             :                         }
   28533           0 :                         if (talloc_str == NULL) {
   28534           0 :                                 PyErr_NoMemory();
   28535           0 :                                 return -1;
   28536             :                         }
   28537           0 :                         object->in.computer_name = talloc_str;
   28538             :                 }
   28539             :         }
   28540           0 :         return 0;
   28541             : }
   28542             : 
   28543           0 : static PyObject *py_netr_LogonSamLogoff_in_get_credential(PyObject *obj, void *closure)
   28544             : {
   28545           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(obj);
   28546             :         PyObject *py_credential;
   28547           0 :         if (object->in.credential == NULL) {
   28548           0 :                 Py_RETURN_NONE;
   28549             :         }
   28550           0 :         if (object->in.credential == NULL) {
   28551           0 :                 py_credential = Py_None;
   28552           0 :                 Py_INCREF(py_credential);
   28553             :         } else {
   28554           0 :                 py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   28555             :         }
   28556           0 :         return py_credential;
   28557             : }
   28558             : 
   28559           0 : static int py_netr_LogonSamLogoff_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   28560             : {
   28561           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(py_obj);
   28562           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   28563           0 :         if (value == NULL) {
   28564           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   28565           0 :                 return -1;
   28566             :         }
   28567           0 :         if (value == Py_None) {
   28568           0 :                 object->in.credential = NULL;
   28569             :         } else {
   28570           0 :                 object->in.credential = NULL;
   28571           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   28572           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   28573           0 :                         PyErr_NoMemory();
   28574           0 :                         return -1;
   28575             :                 }
   28576           0 :                 object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   28577             :         }
   28578           0 :         return 0;
   28579             : }
   28580             : 
   28581           0 : static PyObject *py_netr_LogonSamLogoff_in_get_return_authenticator(PyObject *obj, void *closure)
   28582             : {
   28583           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(obj);
   28584             :         PyObject *py_return_authenticator;
   28585           0 :         if (object->in.return_authenticator == NULL) {
   28586           0 :                 Py_RETURN_NONE;
   28587             :         }
   28588           0 :         if (object->in.return_authenticator == NULL) {
   28589           0 :                 py_return_authenticator = Py_None;
   28590           0 :                 Py_INCREF(py_return_authenticator);
   28591             :         } else {
   28592           0 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   28593             :         }
   28594           0 :         return py_return_authenticator;
   28595             : }
   28596             : 
   28597           0 : static int py_netr_LogonSamLogoff_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   28598             : {
   28599           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(py_obj);
   28600           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   28601           0 :         if (value == NULL) {
   28602           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.return_authenticator");
   28603           0 :                 return -1;
   28604             :         }
   28605           0 :         if (value == Py_None) {
   28606           0 :                 object->in.return_authenticator = NULL;
   28607             :         } else {
   28608           0 :                 object->in.return_authenticator = NULL;
   28609           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   28610           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   28611           0 :                         PyErr_NoMemory();
   28612           0 :                         return -1;
   28613             :                 }
   28614           0 :                 object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   28615             :         }
   28616           0 :         return 0;
   28617             : }
   28618             : 
   28619           0 : static PyObject *py_netr_LogonSamLogoff_out_get_return_authenticator(PyObject *obj, void *closure)
   28620             : {
   28621           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(obj);
   28622             :         PyObject *py_return_authenticator;
   28623           0 :         if (object->out.return_authenticator == NULL) {
   28624           0 :                 Py_RETURN_NONE;
   28625             :         }
   28626           0 :         if (object->out.return_authenticator == NULL) {
   28627           0 :                 py_return_authenticator = Py_None;
   28628           0 :                 Py_INCREF(py_return_authenticator);
   28629             :         } else {
   28630           0 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   28631             :         }
   28632           0 :         return py_return_authenticator;
   28633             : }
   28634             : 
   28635           0 : static int py_netr_LogonSamLogoff_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   28636             : {
   28637           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(py_obj);
   28638           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   28639           0 :         if (value == NULL) {
   28640           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   28641           0 :                 return -1;
   28642             :         }
   28643           0 :         if (value == Py_None) {
   28644           0 :                 object->out.return_authenticator = NULL;
   28645             :         } else {
   28646           0 :                 object->out.return_authenticator = NULL;
   28647           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   28648           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   28649           0 :                         PyErr_NoMemory();
   28650           0 :                         return -1;
   28651             :                 }
   28652           0 :                 object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   28653             :         }
   28654           0 :         return 0;
   28655             : }
   28656             : 
   28657           0 : static PyObject *py_netr_LogonSamLogoff_in_get_logon_level(PyObject *obj, void *closure)
   28658             : {
   28659           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(obj);
   28660             :         PyObject *py_logon_level;
   28661           0 :         py_logon_level = PyLong_FromLong((uint16_t)object->in.logon_level);
   28662           0 :         return py_logon_level;
   28663             : }
   28664             : 
   28665           0 : static int py_netr_LogonSamLogoff_in_set_logon_level(PyObject *py_obj, PyObject *value, void *closure)
   28666             : {
   28667           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(py_obj);
   28668           0 :         if (value == NULL) {
   28669           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_level");
   28670           0 :                 return -1;
   28671             :         }
   28672             :         {
   28673           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.logon_level));
   28674           0 :                 if (PyLong_Check(value)) {
   28675             :                         unsigned long long test_var;
   28676           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28677           0 :                         if (PyErr_Occurred() != NULL) {
   28678           0 :                                 return -1;
   28679             :                         }
   28680           0 :                         if (test_var > uint_max) {
   28681           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   28682             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28683           0 :                                 return -1;
   28684             :                         }
   28685           0 :                         object->in.logon_level = test_var;
   28686             :                 } else {
   28687           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   28688             :                           PyLong_Type.tp_name);
   28689           0 :                         return -1;
   28690             :                 }
   28691             :         }
   28692           0 :         return 0;
   28693             : }
   28694             : 
   28695           0 : static PyObject *py_netr_LogonSamLogoff_in_get_logon(PyObject *obj, void *closure)
   28696             : {
   28697           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(obj);
   28698             :         PyObject *py_logon;
   28699           0 :         py_logon = pyrpc_import_union(&netr_LogonLevel_Type, pytalloc_get_mem_ctx(obj), object->in.logon_level, &object->in.logon, "union netr_LogonLevel");
   28700           0 :         if (py_logon == NULL) {
   28701           0 :                 return NULL;
   28702             :         }
   28703           0 :         return py_logon;
   28704             : }
   28705             : 
   28706           0 : static int py_netr_LogonSamLogoff_in_set_logon(PyObject *py_obj, PyObject *value, void *closure)
   28707             : {
   28708           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(py_obj);
   28709           0 :         if (value == NULL) {
   28710           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon");
   28711           0 :                 return -1;
   28712             :         }
   28713             :         {
   28714             :                 union netr_LogonLevel *logon_switch_0;
   28715           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");
   28716           0 :                 if (logon_switch_0 == NULL) {
   28717           0 :                         return -1;
   28718             :                 }
   28719           0 :                 object->in.logon = *logon_switch_0;
   28720             :         }
   28721           0 :         return 0;
   28722             : }
   28723             : 
   28724           0 : static PyObject *py_netr_LogonSamLogoff_get_result(PyObject *obj, void *closure)
   28725             : {
   28726           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(obj);
   28727             :         PyObject *py_result;
   28728           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   28729           0 :         return py_result;
   28730             : }
   28731             : 
   28732           0 : static int py_netr_LogonSamLogoff_set_result(PyObject *py_obj, PyObject *value, void *closure)
   28733             : {
   28734           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(py_obj);
   28735           0 :         if (value == NULL) {
   28736           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   28737           0 :                 return -1;
   28738             :         }
   28739           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   28740           0 :         return 0;
   28741             : }
   28742             : 
   28743             : static PyGetSetDef py_netr_LogonSamLogoff_getsetters[] = {
   28744             :         {
   28745             :                 .name = discard_const_p(char, "in_server_name"),
   28746             :                 .get = py_netr_LogonSamLogoff_in_get_server_name,
   28747             :                 .set = py_netr_LogonSamLogoff_in_set_server_name,
   28748             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   28749             :         },
   28750             :         {
   28751             :                 .name = discard_const_p(char, "in_computer_name"),
   28752             :                 .get = py_netr_LogonSamLogoff_in_get_computer_name,
   28753             :                 .set = py_netr_LogonSamLogoff_in_set_computer_name,
   28754             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   28755             :         },
   28756             :         {
   28757             :                 .name = discard_const_p(char, "in_credential"),
   28758             :                 .get = py_netr_LogonSamLogoff_in_get_credential,
   28759             :                 .set = py_netr_LogonSamLogoff_in_set_credential,
   28760             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   28761             :         },
   28762             :         {
   28763             :                 .name = discard_const_p(char, "in_return_authenticator"),
   28764             :                 .get = py_netr_LogonSamLogoff_in_get_return_authenticator,
   28765             :                 .set = py_netr_LogonSamLogoff_in_set_return_authenticator,
   28766             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   28767             :         },
   28768             :         {
   28769             :                 .name = discard_const_p(char, "out_return_authenticator"),
   28770             :                 .get = py_netr_LogonSamLogoff_out_get_return_authenticator,
   28771             :                 .set = py_netr_LogonSamLogoff_out_set_return_authenticator,
   28772             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   28773             :         },
   28774             :         {
   28775             :                 .name = discard_const_p(char, "in_logon_level"),
   28776             :                 .get = py_netr_LogonSamLogoff_in_get_logon_level,
   28777             :                 .set = py_netr_LogonSamLogoff_in_set_logon_level,
   28778             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonInfoClass")
   28779             :         },
   28780             :         {
   28781             :                 .name = discard_const_p(char, "in_logon"),
   28782             :                 .get = py_netr_LogonSamLogoff_in_get_logon,
   28783             :                 .set = py_netr_LogonSamLogoff_in_set_logon,
   28784             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonLevel")
   28785             :         },
   28786             :         {
   28787             :                 .name = discard_const_p(char, "result"),
   28788             :                 .get = py_netr_LogonSamLogoff_get_result,
   28789             :                 .set = py_netr_LogonSamLogoff_set_result,
   28790             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   28791             :         },
   28792             :         { .name = NULL }
   28793             : };
   28794             : 
   28795           0 : static PyObject *py_netr_LogonSamLogoff_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   28796             : {
   28797           0 :         PyObject *self = pytalloc_new(struct netr_LogonSamLogoff, type);
   28798           0 :         return self;
   28799             : }
   28800             : 
   28801           0 : static PyObject *py_netr_LogonSamLogoff_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   28802             : {
   28803             : 
   28804             : 
   28805           0 :         return PyLong_FromLong(3);
   28806             : }
   28807             : 
   28808           0 : static PyObject *py_netr_LogonSamLogoff_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   28809             : {
   28810           0 :         const struct ndr_interface_call *call = NULL;
   28811           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(py_obj);
   28812           0 :         PyObject *ret = NULL;
   28813           0 :         struct ndr_push *push = NULL;
   28814             :         DATA_BLOB blob;
   28815             :         enum ndr_err_code err;
   28816             : 
   28817           0 :         if (ndr_table_netlogon.num_calls < 4) {
   28818           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogoff_ndr_pack");
   28819           0 :                 return NULL;
   28820             :         }
   28821           0 :         call = &ndr_table_netlogon.calls[3];
   28822             : 
   28823           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   28824           0 :         if (push == NULL) {
   28825           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   28826           0 :                 return NULL;
   28827             :         }
   28828             : 
   28829           0 :         push->flags |= ndr_push_flags;
   28830             : 
   28831           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   28832           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   28833           0 :                 TALLOC_FREE(push);
   28834           0 :                 PyErr_SetNdrError(err);
   28835           0 :                 return NULL;
   28836             :         }
   28837           0 :         blob = ndr_push_blob(push);
   28838           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   28839           0 :         TALLOC_FREE(push);
   28840           0 :         return ret;
   28841             : }
   28842             : 
   28843           0 : static PyObject *py_netr_LogonSamLogoff_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   28844             : {
   28845           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   28846           0 :         PyObject *bigendian_obj = NULL;
   28847           0 :         PyObject *ndr64_obj = NULL;
   28848           0 :         uint32_t ndr_push_flags = 0;
   28849             : 
   28850           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   28851             :                 discard_const_p(char *, kwnames),
   28852             :                 &bigendian_obj,
   28853             :                 &ndr64_obj)) {
   28854           0 :                 return NULL;
   28855             :         }
   28856             : 
   28857           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   28858           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   28859             :         }
   28860           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   28861           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   28862             :         }
   28863             : 
   28864           0 :         return py_netr_LogonSamLogoff_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   28865             : }
   28866             : 
   28867           0 : static PyObject *py_netr_LogonSamLogoff_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   28868             : {
   28869           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   28870           0 :         PyObject *bigendian_obj = NULL;
   28871           0 :         PyObject *ndr64_obj = NULL;
   28872           0 :         uint32_t ndr_push_flags = 0;
   28873             : 
   28874           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   28875             :                 discard_const_p(char *, kwnames),
   28876             :                 &bigendian_obj,
   28877             :                 &ndr64_obj)) {
   28878           0 :                 return NULL;
   28879             :         }
   28880             : 
   28881           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   28882           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   28883             :         }
   28884           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   28885           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   28886             :         }
   28887             : 
   28888           0 :         return py_netr_LogonSamLogoff_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   28889             : }
   28890             : 
   28891           0 : static PyObject *py_netr_LogonSamLogoff_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   28892             : {
   28893           0 :         const struct ndr_interface_call *call = NULL;
   28894           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(py_obj);
   28895           0 :         struct ndr_pull *pull = NULL;
   28896             :         enum ndr_err_code err;
   28897             : 
   28898           0 :         if (ndr_table_netlogon.num_calls < 4) {
   28899           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogoff_ndr_unpack");
   28900           0 :                 return NULL;
   28901             :         }
   28902           0 :         call = &ndr_table_netlogon.calls[3];
   28903             : 
   28904           0 :         pull = ndr_pull_init_blob(blob, object);
   28905           0 :         if (pull == NULL) {
   28906           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   28907           0 :                 return NULL;
   28908             :         }
   28909             : 
   28910           0 :         pull->flags |= ndr_pull_flags;
   28911             : 
   28912           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   28913           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   28914           0 :                 TALLOC_FREE(pull);
   28915           0 :                 PyErr_SetNdrError(err);
   28916           0 :                 return NULL;
   28917             :         }
   28918           0 :         if (!allow_remaining) {
   28919             :                 uint32_t highest_ofs;
   28920             : 
   28921           0 :                 if (pull->offset > pull->relative_highest_offset) {
   28922           0 :                         highest_ofs = pull->offset;
   28923             :                 } else {
   28924           0 :                         highest_ofs = pull->relative_highest_offset;
   28925             :                 }
   28926           0 :                 if (highest_ofs < pull->data_size) {
   28927           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   28928             :                                 "not all bytes consumed ofs[%u] size[%u]",
   28929             :                                 highest_ofs, pull->data_size);
   28930           0 :                         TALLOC_FREE(pull);
   28931           0 :                         PyErr_SetNdrError(err);
   28932           0 :                         return NULL;
   28933             :                 }
   28934             :         }
   28935             : 
   28936           0 :         TALLOC_FREE(pull);
   28937           0 :         Py_RETURN_NONE;
   28938             : }
   28939             : 
   28940           0 : static PyObject *py_netr_LogonSamLogoff_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   28941             : {
   28942             :         DATA_BLOB blob;
   28943           0 :         Py_ssize_t blob_length = 0;
   28944           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   28945           0 :         PyObject *bigendian_obj = NULL;
   28946           0 :         PyObject *ndr64_obj = NULL;
   28947           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   28948           0 :         PyObject *allow_remaining_obj = NULL;
   28949           0 :         bool allow_remaining = false;
   28950             : 
   28951           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   28952             :                 discard_const_p(char *, kwnames),
   28953             :                 &blob.data, &blob_length,
   28954             :                 &bigendian_obj,
   28955             :                 &ndr64_obj,
   28956             :                 &allow_remaining_obj)) {
   28957           0 :                 return NULL;
   28958             :         }
   28959           0 :         blob.length = blob_length;
   28960             : 
   28961           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   28962           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   28963             :         }
   28964           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   28965           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   28966             :         }
   28967             : 
   28968           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   28969           0 :                 allow_remaining = true;
   28970             :         }
   28971             : 
   28972           0 :         return py_netr_LogonSamLogoff_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   28973             : }
   28974             : 
   28975           0 : static PyObject *py_netr_LogonSamLogoff_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   28976             : {
   28977             :         DATA_BLOB blob;
   28978           0 :         Py_ssize_t blob_length = 0;
   28979           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   28980           0 :         PyObject *bigendian_obj = NULL;
   28981           0 :         PyObject *ndr64_obj = NULL;
   28982           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   28983           0 :         PyObject *allow_remaining_obj = NULL;
   28984           0 :         bool allow_remaining = false;
   28985             : 
   28986           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   28987             :                 discard_const_p(char *, kwnames),
   28988             :                 &blob.data, &blob_length,
   28989             :                 &bigendian_obj,
   28990             :                 &ndr64_obj,
   28991             :                 &allow_remaining_obj)) {
   28992           0 :                 return NULL;
   28993             :         }
   28994           0 :         blob.length = blob_length;
   28995             : 
   28996           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   28997           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   28998             :         }
   28999           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   29000           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   29001             :         }
   29002             : 
   29003           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   29004           0 :                 allow_remaining = true;
   29005             :         }
   29006             : 
   29007           0 :         return py_netr_LogonSamLogoff_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   29008             : }
   29009             : 
   29010           0 : static PyObject *py_netr_LogonSamLogoff_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   29011             : {
   29012           0 :         const struct ndr_interface_call *call = NULL;
   29013           0 :         struct netr_LogonSamLogoff *object = (struct netr_LogonSamLogoff *)pytalloc_get_ptr(py_obj);
   29014             :         PyObject *ret;
   29015             :         char *retstr;
   29016             : 
   29017           0 :         if (ndr_table_netlogon.num_calls < 4) {
   29018           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogoff_ndr_print");
   29019           0 :                 return NULL;
   29020             :         }
   29021           0 :         call = &ndr_table_netlogon.calls[3];
   29022             : 
   29023           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   29024           0 :         ret = PyUnicode_FromString(retstr);
   29025           0 :         TALLOC_FREE(retstr);
   29026             : 
   29027           0 :         return ret;
   29028             : }
   29029             : 
   29030           0 : static PyObject *py_netr_LogonSamLogoff_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   29031             : {
   29032           0 :         return py_netr_LogonSamLogoff_ndr_print(py_obj, "netr_LogonSamLogoff_in", NDR_IN);
   29033             : }
   29034             : 
   29035           0 : static PyObject *py_netr_LogonSamLogoff_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   29036             : {
   29037           0 :         return py_netr_LogonSamLogoff_ndr_print(py_obj, "netr_LogonSamLogoff_out", NDR_OUT);
   29038             : }
   29039             : 
   29040             : static PyMethodDef py_netr_LogonSamLogoff_methods[] = {
   29041             :         { "opnum", (PyCFunction)py_netr_LogonSamLogoff_ndr_opnum, METH_NOARGS|METH_CLASS,
   29042             :                 "netlogon.netr_LogonSamLogoff.opnum() -> 3 (0x03) " },
   29043             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogoff_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   29044             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   29045             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogoff_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   29046             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   29047             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogoff_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   29048             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   29049             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogoff_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   29050             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   29051             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonSamLogoff_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   29052             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonSamLogoff_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   29053             :         { NULL, NULL, 0, NULL }
   29054             : };
   29055             : 
   29056             : 
   29057             : static PyTypeObject netr_LogonSamLogoff_Type = {
   29058             :         PyVarObject_HEAD_INIT(NULL, 0)
   29059             :         .tp_name = "netlogon.netr_LogonSamLogoff",
   29060             :         .tp_getset = py_netr_LogonSamLogoff_getsetters,
   29061             :         .tp_methods = py_netr_LogonSamLogoff_methods,
   29062             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   29063             :         .tp_new = py_netr_LogonSamLogoff_new,
   29064             : };
   29065             : 
   29066           0 : static bool pack_py_netr_LogonSamLogoff_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonSamLogoff *r)
   29067             : {
   29068             :         PyObject *py_server_name;
   29069             :         PyObject *py_computer_name;
   29070             :         PyObject *py_credential;
   29071             :         PyObject *py_return_authenticator;
   29072             :         PyObject *py_logon_level;
   29073             :         PyObject *py_logon;
   29074           0 :         const char *kwnames[] = {
   29075             :                 "server_name", "computer_name", "credential", "return_authenticator", "logon_level", "logon", NULL
   29076             :         };
   29077             : 
   29078           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)) {
   29079           0 :                 return false;
   29080             :         }
   29081             : 
   29082           0 :         if (py_server_name == NULL) {
   29083           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   29084           0 :                 return false;
   29085             :         }
   29086           0 :         if (py_server_name == Py_None) {
   29087           0 :                 r->in.server_name = NULL;
   29088             :         } else {
   29089           0 :                 r->in.server_name = NULL;
   29090             :                 {
   29091             :                         const char *test_str;
   29092             :                         const char *talloc_str;
   29093           0 :                         PyObject *unicode = NULL;
   29094           0 :                         if (PyUnicode_Check(py_server_name)) {
   29095           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   29096           0 :                                 if (unicode == NULL) {
   29097           0 :                                         PyErr_NoMemory();
   29098           0 :                                         return false;
   29099             :                                 }
   29100           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   29101           0 :                         } else if (PyBytes_Check(py_server_name)) {
   29102           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   29103             :                         } else {
   29104           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   29105           0 :                                 return false;
   29106             :                         }
   29107           0 :                         talloc_str = talloc_strdup(r, test_str);
   29108           0 :                         if (unicode != NULL) {
   29109           0 :                                 Py_DECREF(unicode);
   29110             :                         }
   29111           0 :                         if (talloc_str == NULL) {
   29112           0 :                                 PyErr_NoMemory();
   29113           0 :                                 return false;
   29114             :                         }
   29115           0 :                         r->in.server_name = talloc_str;
   29116             :                 }
   29117             :         }
   29118           0 :         if (py_computer_name == NULL) {
   29119           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   29120           0 :                 return false;
   29121             :         }
   29122           0 :         if (py_computer_name == Py_None) {
   29123           0 :                 r->in.computer_name = NULL;
   29124             :         } else {
   29125           0 :                 r->in.computer_name = NULL;
   29126             :                 {
   29127             :                         const char *test_str;
   29128             :                         const char *talloc_str;
   29129           0 :                         PyObject *unicode = NULL;
   29130           0 :                         if (PyUnicode_Check(py_computer_name)) {
   29131           0 :                                 unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   29132           0 :                                 if (unicode == NULL) {
   29133           0 :                                         PyErr_NoMemory();
   29134           0 :                                         return false;
   29135             :                                 }
   29136           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   29137           0 :                         } else if (PyBytes_Check(py_computer_name)) {
   29138           0 :                                 test_str = PyBytes_AS_STRING(py_computer_name);
   29139             :                         } else {
   29140           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   29141           0 :                                 return false;
   29142             :                         }
   29143           0 :                         talloc_str = talloc_strdup(r, test_str);
   29144           0 :                         if (unicode != NULL) {
   29145           0 :                                 Py_DECREF(unicode);
   29146             :                         }
   29147           0 :                         if (talloc_str == NULL) {
   29148           0 :                                 PyErr_NoMemory();
   29149           0 :                                 return false;
   29150             :                         }
   29151           0 :                         r->in.computer_name = talloc_str;
   29152             :                 }
   29153             :         }
   29154           0 :         if (py_credential == NULL) {
   29155           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   29156           0 :                 return false;
   29157             :         }
   29158           0 :         if (py_credential == Py_None) {
   29159           0 :                 r->in.credential = NULL;
   29160             :         } else {
   29161           0 :                 r->in.credential = NULL;
   29162           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   29163           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   29164           0 :                         PyErr_NoMemory();
   29165           0 :                         return false;
   29166             :                 }
   29167           0 :                 r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   29168             :         }
   29169           0 :         if (py_return_authenticator == NULL) {
   29170           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.return_authenticator");
   29171           0 :                 return false;
   29172             :         }
   29173           0 :         if (py_return_authenticator == Py_None) {
   29174           0 :                 r->in.return_authenticator = NULL;
   29175             :         } else {
   29176           0 :                 r->in.return_authenticator = NULL;
   29177           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   29178           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   29179           0 :                         PyErr_NoMemory();
   29180           0 :                         return false;
   29181             :                 }
   29182           0 :                 r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   29183             :         }
   29184           0 :         if (py_logon_level == NULL) {
   29185           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_level");
   29186           0 :                 return false;
   29187             :         }
   29188             :         {
   29189           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.logon_level));
   29190           0 :                 if (PyLong_Check(py_logon_level)) {
   29191             :                         unsigned long long test_var;
   29192           0 :                         test_var = PyLong_AsUnsignedLongLong(py_logon_level);
   29193           0 :                         if (PyErr_Occurred() != NULL) {
   29194           0 :                                 return false;
   29195             :                         }
   29196           0 :                         if (test_var > uint_max) {
   29197           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   29198             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29199           0 :                                 return false;
   29200             :                         }
   29201           0 :                         r->in.logon_level = test_var;
   29202             :                 } else {
   29203           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   29204             :                           PyLong_Type.tp_name);
   29205           0 :                         return false;
   29206             :                 }
   29207             :         }
   29208           0 :         if (py_logon == NULL) {
   29209           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon");
   29210           0 :                 return false;
   29211             :         }
   29212             :         {
   29213             :                 union netr_LogonLevel *logon_switch_0;
   29214           0 :                 logon_switch_0 = (union netr_LogonLevel *)pyrpc_export_union(&netr_LogonLevel_Type, r, r->in.logon_level, py_logon, "union netr_LogonLevel");
   29215           0 :                 if (logon_switch_0 == NULL) {
   29216           0 :                         return false;
   29217             :                 }
   29218           0 :                 r->in.logon = *logon_switch_0;
   29219             :         }
   29220           0 :         return true;
   29221             : }
   29222             : 
   29223           0 : static PyObject *unpack_py_netr_LogonSamLogoff_args_out(struct netr_LogonSamLogoff *r)
   29224             : {
   29225             :         PyObject *result;
   29226             :         PyObject *py_return_authenticator;
   29227           0 :         if (r->out.return_authenticator == NULL) {
   29228           0 :                 py_return_authenticator = Py_None;
   29229           0 :                 Py_INCREF(py_return_authenticator);
   29230             :         } else {
   29231           0 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   29232             :         }
   29233           0 :         result = py_return_authenticator;
   29234           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   29235           0 :                 PyErr_SetNTSTATUS(r->out.result);
   29236           0 :                 return NULL;
   29237             :         }
   29238             : 
   29239           0 :         return result;
   29240             : }
   29241             : 
   29242             : 
   29243           0 : static PyObject *py_netr_ServerReqChallenge_in_get_server_name(PyObject *obj, void *closure)
   29244             : {
   29245           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(obj);
   29246             :         PyObject *py_server_name;
   29247           0 :         if (object->in.server_name == NULL) {
   29248           0 :                 Py_RETURN_NONE;
   29249             :         }
   29250           0 :         if (object->in.server_name == NULL) {
   29251           0 :                 py_server_name = Py_None;
   29252           0 :                 Py_INCREF(py_server_name);
   29253             :         } else {
   29254           0 :                 if (object->in.server_name == NULL) {
   29255           0 :                         py_server_name = Py_None;
   29256           0 :                         Py_INCREF(py_server_name);
   29257             :                 } else {
   29258           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   29259             :                 }
   29260             :         }
   29261           0 :         return py_server_name;
   29262             : }
   29263             : 
   29264           0 : static int py_netr_ServerReqChallenge_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   29265             : {
   29266           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(py_obj);
   29267           0 :         if (value == NULL) {
   29268           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   29269           0 :                 return -1;
   29270             :         }
   29271           0 :         if (value == Py_None) {
   29272           0 :                 object->in.server_name = NULL;
   29273             :         } else {
   29274           0 :                 object->in.server_name = NULL;
   29275             :                 {
   29276             :                         const char *test_str;
   29277             :                         const char *talloc_str;
   29278           0 :                         PyObject *unicode = NULL;
   29279           0 :                         if (PyUnicode_Check(value)) {
   29280           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   29281           0 :                                 if (unicode == NULL) {
   29282           0 :                                         PyErr_NoMemory();
   29283           0 :                                         return -1;
   29284             :                                 }
   29285           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   29286           0 :                         } else if (PyBytes_Check(value)) {
   29287           0 :                                 test_str = PyBytes_AS_STRING(value);
   29288             :                         } else {
   29289           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   29290           0 :                                 return -1;
   29291             :                         }
   29292           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   29293           0 :                         if (unicode != NULL) {
   29294           0 :                                 Py_DECREF(unicode);
   29295             :                         }
   29296           0 :                         if (talloc_str == NULL) {
   29297           0 :                                 PyErr_NoMemory();
   29298           0 :                                 return -1;
   29299             :                         }
   29300           0 :                         object->in.server_name = talloc_str;
   29301             :                 }
   29302             :         }
   29303           0 :         return 0;
   29304             : }
   29305             : 
   29306           0 : static PyObject *py_netr_ServerReqChallenge_in_get_computer_name(PyObject *obj, void *closure)
   29307             : {
   29308           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(obj);
   29309             :         PyObject *py_computer_name;
   29310           0 :         if (object->in.computer_name == NULL) {
   29311           0 :                 Py_RETURN_NONE;
   29312             :         }
   29313           0 :         if (object->in.computer_name == NULL) {
   29314           0 :                 py_computer_name = Py_None;
   29315           0 :                 Py_INCREF(py_computer_name);
   29316             :         } else {
   29317           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   29318             :         }
   29319           0 :         return py_computer_name;
   29320             : }
   29321             : 
   29322           0 : static int py_netr_ServerReqChallenge_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   29323             : {
   29324           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(py_obj);
   29325           0 :         if (value == NULL) {
   29326           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   29327           0 :                 return -1;
   29328             :         }
   29329           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   29330           0 :         if (object->in.computer_name == NULL) {
   29331           0 :                 PyErr_NoMemory();
   29332           0 :                 return -1;
   29333             :         }
   29334             :         {
   29335             :                 const char *test_str;
   29336             :                 const char *talloc_str;
   29337           0 :                 PyObject *unicode = NULL;
   29338           0 :                 if (PyUnicode_Check(value)) {
   29339           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   29340           0 :                         if (unicode == NULL) {
   29341           0 :                                 PyErr_NoMemory();
   29342           0 :                                 return -1;
   29343             :                         }
   29344           0 :                         test_str = PyBytes_AS_STRING(unicode);
   29345           0 :                 } else if (PyBytes_Check(value)) {
   29346           0 :                         test_str = PyBytes_AS_STRING(value);
   29347             :                 } else {
   29348           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   29349           0 :                         return -1;
   29350             :                 }
   29351           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   29352           0 :                 if (unicode != NULL) {
   29353           0 :                         Py_DECREF(unicode);
   29354             :                 }
   29355           0 :                 if (talloc_str == NULL) {
   29356           0 :                         PyErr_NoMemory();
   29357           0 :                         return -1;
   29358             :                 }
   29359           0 :                 object->in.computer_name = talloc_str;
   29360             :         }
   29361           0 :         return 0;
   29362             : }
   29363             : 
   29364           0 : static PyObject *py_netr_ServerReqChallenge_in_get_credentials(PyObject *obj, void *closure)
   29365             : {
   29366           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(obj);
   29367             :         PyObject *py_credentials;
   29368           0 :         if (object->in.credentials == NULL) {
   29369           0 :                 Py_RETURN_NONE;
   29370             :         }
   29371           0 :         py_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->in.credentials, object->in.credentials);
   29372           0 :         return py_credentials;
   29373             : }
   29374             : 
   29375           0 : static int py_netr_ServerReqChallenge_in_set_credentials(PyObject *py_obj, PyObject *value, void *closure)
   29376             : {
   29377           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(py_obj);
   29378           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credentials));
   29379           0 :         if (value == NULL) {
   29380           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credentials");
   29381           0 :                 return -1;
   29382             :         }
   29383           0 :         object->in.credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credentials);
   29384           0 :         if (object->in.credentials == NULL) {
   29385           0 :                 PyErr_NoMemory();
   29386           0 :                 return -1;
   29387             :         }
   29388           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
   29389           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   29390           0 :                 PyErr_NoMemory();
   29391           0 :                 return -1;
   29392             :         }
   29393           0 :         object->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
   29394           0 :         return 0;
   29395             : }
   29396             : 
   29397           0 : static PyObject *py_netr_ServerReqChallenge_out_get_return_credentials(PyObject *obj, void *closure)
   29398             : {
   29399           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(obj);
   29400             :         PyObject *py_return_credentials;
   29401           0 :         if (object->out.return_credentials == NULL) {
   29402           0 :                 Py_RETURN_NONE;
   29403             :         }
   29404           0 :         py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->out.return_credentials, object->out.return_credentials);
   29405           0 :         return py_return_credentials;
   29406             : }
   29407             : 
   29408           0 : static int py_netr_ServerReqChallenge_out_set_return_credentials(PyObject *py_obj, PyObject *value, void *closure)
   29409             : {
   29410           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(py_obj);
   29411           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_credentials));
   29412           0 :         if (value == NULL) {
   29413           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_credentials");
   29414           0 :                 return -1;
   29415             :         }
   29416           0 :         object->out.return_credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_credentials);
   29417           0 :         if (object->out.return_credentials == NULL) {
   29418           0 :                 PyErr_NoMemory();
   29419           0 :                 return -1;
   29420             :         }
   29421           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
   29422           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   29423           0 :                 PyErr_NoMemory();
   29424           0 :                 return -1;
   29425             :         }
   29426           0 :         object->out.return_credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
   29427           0 :         return 0;
   29428             : }
   29429             : 
   29430           0 : static PyObject *py_netr_ServerReqChallenge_get_result(PyObject *obj, void *closure)
   29431             : {
   29432           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(obj);
   29433             :         PyObject *py_result;
   29434           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   29435           0 :         return py_result;
   29436             : }
   29437             : 
   29438           0 : static int py_netr_ServerReqChallenge_set_result(PyObject *py_obj, PyObject *value, void *closure)
   29439             : {
   29440           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(py_obj);
   29441           0 :         if (value == NULL) {
   29442           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   29443           0 :                 return -1;
   29444             :         }
   29445           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   29446           0 :         return 0;
   29447             : }
   29448             : 
   29449             : static PyGetSetDef py_netr_ServerReqChallenge_getsetters[] = {
   29450             :         {
   29451             :                 .name = discard_const_p(char, "in_server_name"),
   29452             :                 .get = py_netr_ServerReqChallenge_in_get_server_name,
   29453             :                 .set = py_netr_ServerReqChallenge_in_set_server_name,
   29454             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   29455             :         },
   29456             :         {
   29457             :                 .name = discard_const_p(char, "in_computer_name"),
   29458             :                 .get = py_netr_ServerReqChallenge_in_get_computer_name,
   29459             :                 .set = py_netr_ServerReqChallenge_in_set_computer_name,
   29460             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   29461             :         },
   29462             :         {
   29463             :                 .name = discard_const_p(char, "in_credentials"),
   29464             :                 .get = py_netr_ServerReqChallenge_in_get_credentials,
   29465             :                 .set = py_netr_ServerReqChallenge_in_set_credentials,
   29466             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
   29467             :         },
   29468             :         {
   29469             :                 .name = discard_const_p(char, "out_return_credentials"),
   29470             :                 .get = py_netr_ServerReqChallenge_out_get_return_credentials,
   29471             :                 .set = py_netr_ServerReqChallenge_out_set_return_credentials,
   29472             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
   29473             :         },
   29474             :         {
   29475             :                 .name = discard_const_p(char, "result"),
   29476             :                 .get = py_netr_ServerReqChallenge_get_result,
   29477             :                 .set = py_netr_ServerReqChallenge_set_result,
   29478             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   29479             :         },
   29480             :         { .name = NULL }
   29481             : };
   29482             : 
   29483           0 : static PyObject *py_netr_ServerReqChallenge_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   29484             : {
   29485           0 :         PyObject *self = pytalloc_new(struct netr_ServerReqChallenge, type);
   29486           0 :         struct netr_ServerReqChallenge *_self = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(self);
   29487           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   29488           0 :         _self->in.credentials = talloc_zero(mem_ctx, struct netr_Credential);
   29489           0 :         _self->out.return_credentials = talloc_zero(mem_ctx, struct netr_Credential);
   29490           0 :         return self;
   29491             : }
   29492             : 
   29493           0 : static PyObject *py_netr_ServerReqChallenge_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   29494             : {
   29495             : 
   29496             : 
   29497           0 :         return PyLong_FromLong(4);
   29498             : }
   29499             : 
   29500           0 : static PyObject *py_netr_ServerReqChallenge_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   29501             : {
   29502           0 :         const struct ndr_interface_call *call = NULL;
   29503           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(py_obj);
   29504           0 :         PyObject *ret = NULL;
   29505           0 :         struct ndr_push *push = NULL;
   29506             :         DATA_BLOB blob;
   29507             :         enum ndr_err_code err;
   29508             : 
   29509           0 :         if (ndr_table_netlogon.num_calls < 5) {
   29510           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerReqChallenge_ndr_pack");
   29511           0 :                 return NULL;
   29512             :         }
   29513           0 :         call = &ndr_table_netlogon.calls[4];
   29514             : 
   29515           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   29516           0 :         if (push == NULL) {
   29517           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   29518           0 :                 return NULL;
   29519             :         }
   29520             : 
   29521           0 :         push->flags |= ndr_push_flags;
   29522             : 
   29523           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   29524           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   29525           0 :                 TALLOC_FREE(push);
   29526           0 :                 PyErr_SetNdrError(err);
   29527           0 :                 return NULL;
   29528             :         }
   29529           0 :         blob = ndr_push_blob(push);
   29530           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   29531           0 :         TALLOC_FREE(push);
   29532           0 :         return ret;
   29533             : }
   29534             : 
   29535           0 : static PyObject *py_netr_ServerReqChallenge_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   29536             : {
   29537           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   29538           0 :         PyObject *bigendian_obj = NULL;
   29539           0 :         PyObject *ndr64_obj = NULL;
   29540           0 :         uint32_t ndr_push_flags = 0;
   29541             : 
   29542           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   29543             :                 discard_const_p(char *, kwnames),
   29544             :                 &bigendian_obj,
   29545             :                 &ndr64_obj)) {
   29546           0 :                 return NULL;
   29547             :         }
   29548             : 
   29549           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   29550           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   29551             :         }
   29552           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   29553           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   29554             :         }
   29555             : 
   29556           0 :         return py_netr_ServerReqChallenge_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   29557             : }
   29558             : 
   29559           0 : static PyObject *py_netr_ServerReqChallenge_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   29560             : {
   29561           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   29562           0 :         PyObject *bigendian_obj = NULL;
   29563           0 :         PyObject *ndr64_obj = NULL;
   29564           0 :         uint32_t ndr_push_flags = 0;
   29565             : 
   29566           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   29567             :                 discard_const_p(char *, kwnames),
   29568             :                 &bigendian_obj,
   29569             :                 &ndr64_obj)) {
   29570           0 :                 return NULL;
   29571             :         }
   29572             : 
   29573           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   29574           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   29575             :         }
   29576           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   29577           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   29578             :         }
   29579             : 
   29580           0 :         return py_netr_ServerReqChallenge_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   29581             : }
   29582             : 
   29583           0 : static PyObject *py_netr_ServerReqChallenge_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   29584             : {
   29585           0 :         const struct ndr_interface_call *call = NULL;
   29586           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(py_obj);
   29587           0 :         struct ndr_pull *pull = NULL;
   29588             :         enum ndr_err_code err;
   29589             : 
   29590           0 :         if (ndr_table_netlogon.num_calls < 5) {
   29591           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerReqChallenge_ndr_unpack");
   29592           0 :                 return NULL;
   29593             :         }
   29594           0 :         call = &ndr_table_netlogon.calls[4];
   29595             : 
   29596           0 :         pull = ndr_pull_init_blob(blob, object);
   29597           0 :         if (pull == NULL) {
   29598           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   29599           0 :                 return NULL;
   29600             :         }
   29601             : 
   29602           0 :         pull->flags |= ndr_pull_flags;
   29603             : 
   29604           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   29605           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   29606           0 :                 TALLOC_FREE(pull);
   29607           0 :                 PyErr_SetNdrError(err);
   29608           0 :                 return NULL;
   29609             :         }
   29610           0 :         if (!allow_remaining) {
   29611             :                 uint32_t highest_ofs;
   29612             : 
   29613           0 :                 if (pull->offset > pull->relative_highest_offset) {
   29614           0 :                         highest_ofs = pull->offset;
   29615             :                 } else {
   29616           0 :                         highest_ofs = pull->relative_highest_offset;
   29617             :                 }
   29618           0 :                 if (highest_ofs < pull->data_size) {
   29619           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   29620             :                                 "not all bytes consumed ofs[%u] size[%u]",
   29621             :                                 highest_ofs, pull->data_size);
   29622           0 :                         TALLOC_FREE(pull);
   29623           0 :                         PyErr_SetNdrError(err);
   29624           0 :                         return NULL;
   29625             :                 }
   29626             :         }
   29627             : 
   29628           0 :         TALLOC_FREE(pull);
   29629           0 :         Py_RETURN_NONE;
   29630             : }
   29631             : 
   29632           0 : static PyObject *py_netr_ServerReqChallenge_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   29633             : {
   29634             :         DATA_BLOB blob;
   29635           0 :         Py_ssize_t blob_length = 0;
   29636           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   29637           0 :         PyObject *bigendian_obj = NULL;
   29638           0 :         PyObject *ndr64_obj = NULL;
   29639           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   29640           0 :         PyObject *allow_remaining_obj = NULL;
   29641           0 :         bool allow_remaining = false;
   29642             : 
   29643           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   29644             :                 discard_const_p(char *, kwnames),
   29645             :                 &blob.data, &blob_length,
   29646             :                 &bigendian_obj,
   29647             :                 &ndr64_obj,
   29648             :                 &allow_remaining_obj)) {
   29649           0 :                 return NULL;
   29650             :         }
   29651           0 :         blob.length = blob_length;
   29652             : 
   29653           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   29654           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   29655             :         }
   29656           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   29657           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   29658             :         }
   29659             : 
   29660           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   29661           0 :                 allow_remaining = true;
   29662             :         }
   29663             : 
   29664           0 :         return py_netr_ServerReqChallenge_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   29665             : }
   29666             : 
   29667           0 : static PyObject *py_netr_ServerReqChallenge_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   29668             : {
   29669             :         DATA_BLOB blob;
   29670           0 :         Py_ssize_t blob_length = 0;
   29671           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   29672           0 :         PyObject *bigendian_obj = NULL;
   29673           0 :         PyObject *ndr64_obj = NULL;
   29674           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   29675           0 :         PyObject *allow_remaining_obj = NULL;
   29676           0 :         bool allow_remaining = false;
   29677             : 
   29678           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   29679             :                 discard_const_p(char *, kwnames),
   29680             :                 &blob.data, &blob_length,
   29681             :                 &bigendian_obj,
   29682             :                 &ndr64_obj,
   29683             :                 &allow_remaining_obj)) {
   29684           0 :                 return NULL;
   29685             :         }
   29686           0 :         blob.length = blob_length;
   29687             : 
   29688           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   29689           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   29690             :         }
   29691           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   29692           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   29693             :         }
   29694             : 
   29695           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   29696           0 :                 allow_remaining = true;
   29697             :         }
   29698             : 
   29699           0 :         return py_netr_ServerReqChallenge_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   29700             : }
   29701             : 
   29702           0 : static PyObject *py_netr_ServerReqChallenge_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   29703             : {
   29704           0 :         const struct ndr_interface_call *call = NULL;
   29705           0 :         struct netr_ServerReqChallenge *object = (struct netr_ServerReqChallenge *)pytalloc_get_ptr(py_obj);
   29706             :         PyObject *ret;
   29707             :         char *retstr;
   29708             : 
   29709           0 :         if (ndr_table_netlogon.num_calls < 5) {
   29710           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerReqChallenge_ndr_print");
   29711           0 :                 return NULL;
   29712             :         }
   29713           0 :         call = &ndr_table_netlogon.calls[4];
   29714             : 
   29715           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   29716           0 :         ret = PyUnicode_FromString(retstr);
   29717           0 :         TALLOC_FREE(retstr);
   29718             : 
   29719           0 :         return ret;
   29720             : }
   29721             : 
   29722           0 : static PyObject *py_netr_ServerReqChallenge_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   29723             : {
   29724           0 :         return py_netr_ServerReqChallenge_ndr_print(py_obj, "netr_ServerReqChallenge_in", NDR_IN);
   29725             : }
   29726             : 
   29727           0 : static PyObject *py_netr_ServerReqChallenge_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   29728             : {
   29729           0 :         return py_netr_ServerReqChallenge_ndr_print(py_obj, "netr_ServerReqChallenge_out", NDR_OUT);
   29730             : }
   29731             : 
   29732             : static PyMethodDef py_netr_ServerReqChallenge_methods[] = {
   29733             :         { "opnum", (PyCFunction)py_netr_ServerReqChallenge_ndr_opnum, METH_NOARGS|METH_CLASS,
   29734             :                 "netlogon.netr_ServerReqChallenge.opnum() -> 4 (0x04) " },
   29735             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerReqChallenge_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   29736             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   29737             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerReqChallenge_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   29738             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   29739             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerReqChallenge_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   29740             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   29741             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerReqChallenge_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   29742             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   29743             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerReqChallenge_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   29744             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerReqChallenge_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   29745             :         { NULL, NULL, 0, NULL }
   29746             : };
   29747             : 
   29748             : 
   29749             : static PyTypeObject netr_ServerReqChallenge_Type = {
   29750             :         PyVarObject_HEAD_INIT(NULL, 0)
   29751             :         .tp_name = "netlogon.netr_ServerReqChallenge",
   29752             :         .tp_getset = py_netr_ServerReqChallenge_getsetters,
   29753             :         .tp_methods = py_netr_ServerReqChallenge_methods,
   29754             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   29755             :         .tp_new = py_netr_ServerReqChallenge_new,
   29756             : };
   29757             : 
   29758           4 : static bool pack_py_netr_ServerReqChallenge_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerReqChallenge *r)
   29759             : {
   29760             :         PyObject *py_server_name;
   29761             :         PyObject *py_computer_name;
   29762             :         PyObject *py_credentials;
   29763           4 :         const char *kwnames[] = {
   29764             :                 "server_name", "computer_name", "credentials", NULL
   29765             :         };
   29766             : 
   29767           4 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:netr_ServerReqChallenge", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_credentials)) {
   29768           0 :                 return false;
   29769             :         }
   29770             : 
   29771           4 :         if (py_server_name == NULL) {
   29772           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   29773           0 :                 return false;
   29774             :         }
   29775           4 :         if (py_server_name == Py_None) {
   29776           0 :                 r->in.server_name = NULL;
   29777             :         } else {
   29778           4 :                 r->in.server_name = NULL;
   29779             :                 {
   29780             :                         const char *test_str;
   29781             :                         const char *talloc_str;
   29782           4 :                         PyObject *unicode = NULL;
   29783           4 :                         if (PyUnicode_Check(py_server_name)) {
   29784           4 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   29785           4 :                                 if (unicode == NULL) {
   29786           0 :                                         PyErr_NoMemory();
   29787           0 :                                         return false;
   29788             :                                 }
   29789           4 :                                 test_str = PyBytes_AS_STRING(unicode);
   29790           0 :                         } else if (PyBytes_Check(py_server_name)) {
   29791           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   29792             :                         } else {
   29793           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   29794           0 :                                 return false;
   29795             :                         }
   29796           4 :                         talloc_str = talloc_strdup(r, test_str);
   29797           4 :                         if (unicode != NULL) {
   29798           4 :                                 Py_DECREF(unicode);
   29799             :                         }
   29800           4 :                         if (talloc_str == NULL) {
   29801           0 :                                 PyErr_NoMemory();
   29802           0 :                                 return false;
   29803             :                         }
   29804           4 :                         r->in.server_name = talloc_str;
   29805             :                 }
   29806             :         }
   29807           4 :         if (py_computer_name == NULL) {
   29808           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   29809           0 :                 return false;
   29810             :         }
   29811           4 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   29812           4 :         if (r->in.computer_name == NULL) {
   29813           0 :                 PyErr_NoMemory();
   29814           0 :                 return false;
   29815             :         }
   29816             :         {
   29817             :                 const char *test_str;
   29818             :                 const char *talloc_str;
   29819           4 :                 PyObject *unicode = NULL;
   29820           4 :                 if (PyUnicode_Check(py_computer_name)) {
   29821           4 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   29822           4 :                         if (unicode == NULL) {
   29823           0 :                                 PyErr_NoMemory();
   29824           0 :                                 return false;
   29825             :                         }
   29826           4 :                         test_str = PyBytes_AS_STRING(unicode);
   29827           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   29828           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   29829             :                 } else {
   29830           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   29831           0 :                         return false;
   29832             :                 }
   29833           4 :                 talloc_str = talloc_strdup(r, test_str);
   29834           4 :                 if (unicode != NULL) {
   29835           4 :                         Py_DECREF(unicode);
   29836             :                 }
   29837           4 :                 if (talloc_str == NULL) {
   29838           0 :                         PyErr_NoMemory();
   29839           0 :                         return false;
   29840             :                 }
   29841           4 :                 r->in.computer_name = talloc_str;
   29842             :         }
   29843           4 :         if (py_credentials == NULL) {
   29844           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credentials");
   29845           0 :                 return false;
   29846             :         }
   29847           4 :         r->in.credentials = talloc_ptrtype(r, r->in.credentials);
   29848           4 :         if (r->in.credentials == NULL) {
   29849           0 :                 PyErr_NoMemory();
   29850           0 :                 return false;
   29851             :         }
   29852           4 :         PY_CHECK_TYPE(&netr_Credential_Type, py_credentials, return false;);
   29853           4 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credentials)) == NULL) {
   29854           0 :                 PyErr_NoMemory();
   29855           0 :                 return false;
   29856             :         }
   29857           4 :         r->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(py_credentials);
   29858           4 :         return true;
   29859             : }
   29860             : 
   29861           4 : static PyObject *unpack_py_netr_ServerReqChallenge_args_out(struct netr_ServerReqChallenge *r)
   29862             : {
   29863             :         PyObject *result;
   29864             :         PyObject *py_return_credentials;
   29865           4 :         py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, r->out.return_credentials, r->out.return_credentials);
   29866           4 :         result = py_return_credentials;
   29867           4 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   29868           0 :                 PyErr_SetNTSTATUS(r->out.result);
   29869           0 :                 return NULL;
   29870             :         }
   29871             : 
   29872           4 :         return result;
   29873             : }
   29874             : 
   29875             : 
   29876           0 : static PyObject *py_netr_ServerAuthenticate_in_get_server_name(PyObject *obj, void *closure)
   29877             : {
   29878           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(obj);
   29879             :         PyObject *py_server_name;
   29880           0 :         if (object->in.server_name == NULL) {
   29881           0 :                 Py_RETURN_NONE;
   29882             :         }
   29883           0 :         if (object->in.server_name == NULL) {
   29884           0 :                 py_server_name = Py_None;
   29885           0 :                 Py_INCREF(py_server_name);
   29886             :         } else {
   29887           0 :                 if (object->in.server_name == NULL) {
   29888           0 :                         py_server_name = Py_None;
   29889           0 :                         Py_INCREF(py_server_name);
   29890             :                 } else {
   29891           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   29892             :                 }
   29893             :         }
   29894           0 :         return py_server_name;
   29895             : }
   29896             : 
   29897           0 : static int py_netr_ServerAuthenticate_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   29898             : {
   29899           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(py_obj);
   29900           0 :         if (value == NULL) {
   29901           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   29902           0 :                 return -1;
   29903             :         }
   29904           0 :         if (value == Py_None) {
   29905           0 :                 object->in.server_name = NULL;
   29906             :         } else {
   29907           0 :                 object->in.server_name = NULL;
   29908             :                 {
   29909             :                         const char *test_str;
   29910             :                         const char *talloc_str;
   29911           0 :                         PyObject *unicode = NULL;
   29912           0 :                         if (PyUnicode_Check(value)) {
   29913           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   29914           0 :                                 if (unicode == NULL) {
   29915           0 :                                         PyErr_NoMemory();
   29916           0 :                                         return -1;
   29917             :                                 }
   29918           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   29919           0 :                         } else if (PyBytes_Check(value)) {
   29920           0 :                                 test_str = PyBytes_AS_STRING(value);
   29921             :                         } else {
   29922           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   29923           0 :                                 return -1;
   29924             :                         }
   29925           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   29926           0 :                         if (unicode != NULL) {
   29927           0 :                                 Py_DECREF(unicode);
   29928             :                         }
   29929           0 :                         if (talloc_str == NULL) {
   29930           0 :                                 PyErr_NoMemory();
   29931           0 :                                 return -1;
   29932             :                         }
   29933           0 :                         object->in.server_name = talloc_str;
   29934             :                 }
   29935             :         }
   29936           0 :         return 0;
   29937             : }
   29938             : 
   29939           0 : static PyObject *py_netr_ServerAuthenticate_in_get_account_name(PyObject *obj, void *closure)
   29940             : {
   29941           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(obj);
   29942             :         PyObject *py_account_name;
   29943           0 :         if (object->in.account_name == NULL) {
   29944           0 :                 Py_RETURN_NONE;
   29945             :         }
   29946           0 :         if (object->in.account_name == NULL) {
   29947           0 :                 py_account_name = Py_None;
   29948           0 :                 Py_INCREF(py_account_name);
   29949             :         } else {
   29950           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   29951             :         }
   29952           0 :         return py_account_name;
   29953             : }
   29954             : 
   29955           0 : static int py_netr_ServerAuthenticate_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   29956             : {
   29957           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(py_obj);
   29958           0 :         if (value == NULL) {
   29959           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.account_name");
   29960           0 :                 return -1;
   29961             :         }
   29962           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   29963           0 :         if (object->in.account_name == NULL) {
   29964           0 :                 PyErr_NoMemory();
   29965           0 :                 return -1;
   29966             :         }
   29967             :         {
   29968             :                 const char *test_str;
   29969             :                 const char *talloc_str;
   29970           0 :                 PyObject *unicode = NULL;
   29971           0 :                 if (PyUnicode_Check(value)) {
   29972           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   29973           0 :                         if (unicode == NULL) {
   29974           0 :                                 PyErr_NoMemory();
   29975           0 :                                 return -1;
   29976             :                         }
   29977           0 :                         test_str = PyBytes_AS_STRING(unicode);
   29978           0 :                 } else if (PyBytes_Check(value)) {
   29979           0 :                         test_str = PyBytes_AS_STRING(value);
   29980             :                 } else {
   29981           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   29982           0 :                         return -1;
   29983             :                 }
   29984           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   29985           0 :                 if (unicode != NULL) {
   29986           0 :                         Py_DECREF(unicode);
   29987             :                 }
   29988           0 :                 if (talloc_str == NULL) {
   29989           0 :                         PyErr_NoMemory();
   29990           0 :                         return -1;
   29991             :                 }
   29992           0 :                 object->in.account_name = talloc_str;
   29993             :         }
   29994           0 :         return 0;
   29995             : }
   29996             : 
   29997           0 : static PyObject *py_netr_ServerAuthenticate_in_get_secure_channel_type(PyObject *obj, void *closure)
   29998             : {
   29999           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(obj);
   30000             :         PyObject *py_secure_channel_type;
   30001           0 :         py_secure_channel_type = PyLong_FromLong((uint16_t)object->in.secure_channel_type);
   30002           0 :         return py_secure_channel_type;
   30003             : }
   30004             : 
   30005           0 : static int py_netr_ServerAuthenticate_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
   30006             : {
   30007           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(py_obj);
   30008           0 :         if (value == NULL) {
   30009           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.secure_channel_type");
   30010           0 :                 return -1;
   30011             :         }
   30012             :         {
   30013           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
   30014           0 :                 if (PyLong_Check(value)) {
   30015             :                         unsigned long long test_var;
   30016           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   30017           0 :                         if (PyErr_Occurred() != NULL) {
   30018           0 :                                 return -1;
   30019             :                         }
   30020           0 :                         if (test_var > uint_max) {
   30021           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   30022             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30023           0 :                                 return -1;
   30024             :                         }
   30025           0 :                         object->in.secure_channel_type = test_var;
   30026             :                 } else {
   30027           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   30028             :                           PyLong_Type.tp_name);
   30029           0 :                         return -1;
   30030             :                 }
   30031             :         }
   30032           0 :         return 0;
   30033             : }
   30034             : 
   30035           0 : static PyObject *py_netr_ServerAuthenticate_in_get_computer_name(PyObject *obj, void *closure)
   30036             : {
   30037           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(obj);
   30038             :         PyObject *py_computer_name;
   30039           0 :         if (object->in.computer_name == NULL) {
   30040           0 :                 Py_RETURN_NONE;
   30041             :         }
   30042           0 :         if (object->in.computer_name == NULL) {
   30043           0 :                 py_computer_name = Py_None;
   30044           0 :                 Py_INCREF(py_computer_name);
   30045             :         } else {
   30046           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   30047             :         }
   30048           0 :         return py_computer_name;
   30049             : }
   30050             : 
   30051           0 : static int py_netr_ServerAuthenticate_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   30052             : {
   30053           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(py_obj);
   30054           0 :         if (value == NULL) {
   30055           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   30056           0 :                 return -1;
   30057             :         }
   30058           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   30059           0 :         if (object->in.computer_name == NULL) {
   30060           0 :                 PyErr_NoMemory();
   30061           0 :                 return -1;
   30062             :         }
   30063             :         {
   30064             :                 const char *test_str;
   30065             :                 const char *talloc_str;
   30066           0 :                 PyObject *unicode = NULL;
   30067           0 :                 if (PyUnicode_Check(value)) {
   30068           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   30069           0 :                         if (unicode == NULL) {
   30070           0 :                                 PyErr_NoMemory();
   30071           0 :                                 return -1;
   30072             :                         }
   30073           0 :                         test_str = PyBytes_AS_STRING(unicode);
   30074           0 :                 } else if (PyBytes_Check(value)) {
   30075           0 :                         test_str = PyBytes_AS_STRING(value);
   30076             :                 } else {
   30077           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   30078           0 :                         return -1;
   30079             :                 }
   30080           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   30081           0 :                 if (unicode != NULL) {
   30082           0 :                         Py_DECREF(unicode);
   30083             :                 }
   30084           0 :                 if (talloc_str == NULL) {
   30085           0 :                         PyErr_NoMemory();
   30086           0 :                         return -1;
   30087             :                 }
   30088           0 :                 object->in.computer_name = talloc_str;
   30089             :         }
   30090           0 :         return 0;
   30091             : }
   30092             : 
   30093           0 : static PyObject *py_netr_ServerAuthenticate_in_get_credentials(PyObject *obj, void *closure)
   30094             : {
   30095           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(obj);
   30096             :         PyObject *py_credentials;
   30097           0 :         if (object->in.credentials == NULL) {
   30098           0 :                 Py_RETURN_NONE;
   30099             :         }
   30100           0 :         py_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->in.credentials, object->in.credentials);
   30101           0 :         return py_credentials;
   30102             : }
   30103             : 
   30104           0 : static int py_netr_ServerAuthenticate_in_set_credentials(PyObject *py_obj, PyObject *value, void *closure)
   30105             : {
   30106           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(py_obj);
   30107           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credentials));
   30108           0 :         if (value == NULL) {
   30109           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credentials");
   30110           0 :                 return -1;
   30111             :         }
   30112           0 :         object->in.credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credentials);
   30113           0 :         if (object->in.credentials == NULL) {
   30114           0 :                 PyErr_NoMemory();
   30115           0 :                 return -1;
   30116             :         }
   30117           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
   30118           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   30119           0 :                 PyErr_NoMemory();
   30120           0 :                 return -1;
   30121             :         }
   30122           0 :         object->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
   30123           0 :         return 0;
   30124             : }
   30125             : 
   30126           0 : static PyObject *py_netr_ServerAuthenticate_out_get_return_credentials(PyObject *obj, void *closure)
   30127             : {
   30128           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(obj);
   30129             :         PyObject *py_return_credentials;
   30130           0 :         if (object->out.return_credentials == NULL) {
   30131           0 :                 Py_RETURN_NONE;
   30132             :         }
   30133           0 :         py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->out.return_credentials, object->out.return_credentials);
   30134           0 :         return py_return_credentials;
   30135             : }
   30136             : 
   30137           0 : static int py_netr_ServerAuthenticate_out_set_return_credentials(PyObject *py_obj, PyObject *value, void *closure)
   30138             : {
   30139           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(py_obj);
   30140           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_credentials));
   30141           0 :         if (value == NULL) {
   30142           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_credentials");
   30143           0 :                 return -1;
   30144             :         }
   30145           0 :         object->out.return_credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_credentials);
   30146           0 :         if (object->out.return_credentials == NULL) {
   30147           0 :                 PyErr_NoMemory();
   30148           0 :                 return -1;
   30149             :         }
   30150           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
   30151           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   30152           0 :                 PyErr_NoMemory();
   30153           0 :                 return -1;
   30154             :         }
   30155           0 :         object->out.return_credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
   30156           0 :         return 0;
   30157             : }
   30158             : 
   30159           0 : static PyObject *py_netr_ServerAuthenticate_get_result(PyObject *obj, void *closure)
   30160             : {
   30161           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(obj);
   30162             :         PyObject *py_result;
   30163           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   30164           0 :         return py_result;
   30165             : }
   30166             : 
   30167           0 : static int py_netr_ServerAuthenticate_set_result(PyObject *py_obj, PyObject *value, void *closure)
   30168             : {
   30169           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(py_obj);
   30170           0 :         if (value == NULL) {
   30171           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   30172           0 :                 return -1;
   30173             :         }
   30174           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   30175           0 :         return 0;
   30176             : }
   30177             : 
   30178             : static PyGetSetDef py_netr_ServerAuthenticate_getsetters[] = {
   30179             :         {
   30180             :                 .name = discard_const_p(char, "in_server_name"),
   30181             :                 .get = py_netr_ServerAuthenticate_in_get_server_name,
   30182             :                 .set = py_netr_ServerAuthenticate_in_set_server_name,
   30183             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   30184             :         },
   30185             :         {
   30186             :                 .name = discard_const_p(char, "in_account_name"),
   30187             :                 .get = py_netr_ServerAuthenticate_in_get_account_name,
   30188             :                 .set = py_netr_ServerAuthenticate_in_set_account_name,
   30189             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   30190             :         },
   30191             :         {
   30192             :                 .name = discard_const_p(char, "in_secure_channel_type"),
   30193             :                 .get = py_netr_ServerAuthenticate_in_get_secure_channel_type,
   30194             :                 .set = py_netr_ServerAuthenticate_in_set_secure_channel_type,
   30195             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
   30196             :         },
   30197             :         {
   30198             :                 .name = discard_const_p(char, "in_computer_name"),
   30199             :                 .get = py_netr_ServerAuthenticate_in_get_computer_name,
   30200             :                 .set = py_netr_ServerAuthenticate_in_set_computer_name,
   30201             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   30202             :         },
   30203             :         {
   30204             :                 .name = discard_const_p(char, "in_credentials"),
   30205             :                 .get = py_netr_ServerAuthenticate_in_get_credentials,
   30206             :                 .set = py_netr_ServerAuthenticate_in_set_credentials,
   30207             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
   30208             :         },
   30209             :         {
   30210             :                 .name = discard_const_p(char, "out_return_credentials"),
   30211             :                 .get = py_netr_ServerAuthenticate_out_get_return_credentials,
   30212             :                 .set = py_netr_ServerAuthenticate_out_set_return_credentials,
   30213             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
   30214             :         },
   30215             :         {
   30216             :                 .name = discard_const_p(char, "result"),
   30217             :                 .get = py_netr_ServerAuthenticate_get_result,
   30218             :                 .set = py_netr_ServerAuthenticate_set_result,
   30219             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   30220             :         },
   30221             :         { .name = NULL }
   30222             : };
   30223             : 
   30224           0 : static PyObject *py_netr_ServerAuthenticate_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   30225             : {
   30226           0 :         PyObject *self = pytalloc_new(struct netr_ServerAuthenticate, type);
   30227           0 :         struct netr_ServerAuthenticate *_self = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(self);
   30228           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   30229           0 :         _self->in.credentials = talloc_zero(mem_ctx, struct netr_Credential);
   30230           0 :         _self->out.return_credentials = talloc_zero(mem_ctx, struct netr_Credential);
   30231           0 :         return self;
   30232             : }
   30233             : 
   30234           0 : static PyObject *py_netr_ServerAuthenticate_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   30235             : {
   30236             : 
   30237             : 
   30238           0 :         return PyLong_FromLong(5);
   30239             : }
   30240             : 
   30241           0 : static PyObject *py_netr_ServerAuthenticate_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   30242             : {
   30243           0 :         const struct ndr_interface_call *call = NULL;
   30244           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(py_obj);
   30245           0 :         PyObject *ret = NULL;
   30246           0 :         struct ndr_push *push = NULL;
   30247             :         DATA_BLOB blob;
   30248             :         enum ndr_err_code err;
   30249             : 
   30250           0 :         if (ndr_table_netlogon.num_calls < 6) {
   30251           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate_ndr_pack");
   30252           0 :                 return NULL;
   30253             :         }
   30254           0 :         call = &ndr_table_netlogon.calls[5];
   30255             : 
   30256           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   30257           0 :         if (push == NULL) {
   30258           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   30259           0 :                 return NULL;
   30260             :         }
   30261             : 
   30262           0 :         push->flags |= ndr_push_flags;
   30263             : 
   30264           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   30265           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   30266           0 :                 TALLOC_FREE(push);
   30267           0 :                 PyErr_SetNdrError(err);
   30268           0 :                 return NULL;
   30269             :         }
   30270           0 :         blob = ndr_push_blob(push);
   30271           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   30272           0 :         TALLOC_FREE(push);
   30273           0 :         return ret;
   30274             : }
   30275             : 
   30276           0 : static PyObject *py_netr_ServerAuthenticate_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   30277             : {
   30278           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   30279           0 :         PyObject *bigendian_obj = NULL;
   30280           0 :         PyObject *ndr64_obj = NULL;
   30281           0 :         uint32_t ndr_push_flags = 0;
   30282             : 
   30283           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   30284             :                 discard_const_p(char *, kwnames),
   30285             :                 &bigendian_obj,
   30286             :                 &ndr64_obj)) {
   30287           0 :                 return NULL;
   30288             :         }
   30289             : 
   30290           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   30291           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   30292             :         }
   30293           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   30294           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   30295             :         }
   30296             : 
   30297           0 :         return py_netr_ServerAuthenticate_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   30298             : }
   30299             : 
   30300           0 : static PyObject *py_netr_ServerAuthenticate_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   30301             : {
   30302           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   30303           0 :         PyObject *bigendian_obj = NULL;
   30304           0 :         PyObject *ndr64_obj = NULL;
   30305           0 :         uint32_t ndr_push_flags = 0;
   30306             : 
   30307           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   30308             :                 discard_const_p(char *, kwnames),
   30309             :                 &bigendian_obj,
   30310             :                 &ndr64_obj)) {
   30311           0 :                 return NULL;
   30312             :         }
   30313             : 
   30314           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   30315           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   30316             :         }
   30317           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   30318           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   30319             :         }
   30320             : 
   30321           0 :         return py_netr_ServerAuthenticate_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   30322             : }
   30323             : 
   30324           0 : static PyObject *py_netr_ServerAuthenticate_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   30325             : {
   30326           0 :         const struct ndr_interface_call *call = NULL;
   30327           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(py_obj);
   30328           0 :         struct ndr_pull *pull = NULL;
   30329             :         enum ndr_err_code err;
   30330             : 
   30331           0 :         if (ndr_table_netlogon.num_calls < 6) {
   30332           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate_ndr_unpack");
   30333           0 :                 return NULL;
   30334             :         }
   30335           0 :         call = &ndr_table_netlogon.calls[5];
   30336             : 
   30337           0 :         pull = ndr_pull_init_blob(blob, object);
   30338           0 :         if (pull == NULL) {
   30339           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   30340           0 :                 return NULL;
   30341             :         }
   30342             : 
   30343           0 :         pull->flags |= ndr_pull_flags;
   30344             : 
   30345           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   30346           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   30347           0 :                 TALLOC_FREE(pull);
   30348           0 :                 PyErr_SetNdrError(err);
   30349           0 :                 return NULL;
   30350             :         }
   30351           0 :         if (!allow_remaining) {
   30352             :                 uint32_t highest_ofs;
   30353             : 
   30354           0 :                 if (pull->offset > pull->relative_highest_offset) {
   30355           0 :                         highest_ofs = pull->offset;
   30356             :                 } else {
   30357           0 :                         highest_ofs = pull->relative_highest_offset;
   30358             :                 }
   30359           0 :                 if (highest_ofs < pull->data_size) {
   30360           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   30361             :                                 "not all bytes consumed ofs[%u] size[%u]",
   30362             :                                 highest_ofs, pull->data_size);
   30363           0 :                         TALLOC_FREE(pull);
   30364           0 :                         PyErr_SetNdrError(err);
   30365           0 :                         return NULL;
   30366             :                 }
   30367             :         }
   30368             : 
   30369           0 :         TALLOC_FREE(pull);
   30370           0 :         Py_RETURN_NONE;
   30371             : }
   30372             : 
   30373           0 : static PyObject *py_netr_ServerAuthenticate_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   30374             : {
   30375             :         DATA_BLOB blob;
   30376           0 :         Py_ssize_t blob_length = 0;
   30377           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   30378           0 :         PyObject *bigendian_obj = NULL;
   30379           0 :         PyObject *ndr64_obj = NULL;
   30380           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   30381           0 :         PyObject *allow_remaining_obj = NULL;
   30382           0 :         bool allow_remaining = false;
   30383             : 
   30384           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   30385             :                 discard_const_p(char *, kwnames),
   30386             :                 &blob.data, &blob_length,
   30387             :                 &bigendian_obj,
   30388             :                 &ndr64_obj,
   30389             :                 &allow_remaining_obj)) {
   30390           0 :                 return NULL;
   30391             :         }
   30392           0 :         blob.length = blob_length;
   30393             : 
   30394           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   30395           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   30396             :         }
   30397           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   30398           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   30399             :         }
   30400             : 
   30401           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   30402           0 :                 allow_remaining = true;
   30403             :         }
   30404             : 
   30405           0 :         return py_netr_ServerAuthenticate_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   30406             : }
   30407             : 
   30408           0 : static PyObject *py_netr_ServerAuthenticate_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   30409             : {
   30410             :         DATA_BLOB blob;
   30411           0 :         Py_ssize_t blob_length = 0;
   30412           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   30413           0 :         PyObject *bigendian_obj = NULL;
   30414           0 :         PyObject *ndr64_obj = NULL;
   30415           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   30416           0 :         PyObject *allow_remaining_obj = NULL;
   30417           0 :         bool allow_remaining = false;
   30418             : 
   30419           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   30420             :                 discard_const_p(char *, kwnames),
   30421             :                 &blob.data, &blob_length,
   30422             :                 &bigendian_obj,
   30423             :                 &ndr64_obj,
   30424             :                 &allow_remaining_obj)) {
   30425           0 :                 return NULL;
   30426             :         }
   30427           0 :         blob.length = blob_length;
   30428             : 
   30429           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   30430           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   30431             :         }
   30432           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   30433           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   30434             :         }
   30435             : 
   30436           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   30437           0 :                 allow_remaining = true;
   30438             :         }
   30439             : 
   30440           0 :         return py_netr_ServerAuthenticate_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   30441             : }
   30442             : 
   30443           0 : static PyObject *py_netr_ServerAuthenticate_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   30444             : {
   30445           0 :         const struct ndr_interface_call *call = NULL;
   30446           0 :         struct netr_ServerAuthenticate *object = (struct netr_ServerAuthenticate *)pytalloc_get_ptr(py_obj);
   30447             :         PyObject *ret;
   30448             :         char *retstr;
   30449             : 
   30450           0 :         if (ndr_table_netlogon.num_calls < 6) {
   30451           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate_ndr_print");
   30452           0 :                 return NULL;
   30453             :         }
   30454           0 :         call = &ndr_table_netlogon.calls[5];
   30455             : 
   30456           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   30457           0 :         ret = PyUnicode_FromString(retstr);
   30458           0 :         TALLOC_FREE(retstr);
   30459             : 
   30460           0 :         return ret;
   30461             : }
   30462             : 
   30463           0 : static PyObject *py_netr_ServerAuthenticate_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   30464             : {
   30465           0 :         return py_netr_ServerAuthenticate_ndr_print(py_obj, "netr_ServerAuthenticate_in", NDR_IN);
   30466             : }
   30467             : 
   30468           0 : static PyObject *py_netr_ServerAuthenticate_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   30469             : {
   30470           0 :         return py_netr_ServerAuthenticate_ndr_print(py_obj, "netr_ServerAuthenticate_out", NDR_OUT);
   30471             : }
   30472             : 
   30473             : static PyMethodDef py_netr_ServerAuthenticate_methods[] = {
   30474             :         { "opnum", (PyCFunction)py_netr_ServerAuthenticate_ndr_opnum, METH_NOARGS|METH_CLASS,
   30475             :                 "netlogon.netr_ServerAuthenticate.opnum() -> 5 (0x05) " },
   30476             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   30477             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   30478             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   30479             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   30480             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   30481             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   30482             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   30483             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   30484             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerAuthenticate_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   30485             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerAuthenticate_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   30486             :         { NULL, NULL, 0, NULL }
   30487             : };
   30488             : 
   30489             : 
   30490             : static PyTypeObject netr_ServerAuthenticate_Type = {
   30491             :         PyVarObject_HEAD_INIT(NULL, 0)
   30492             :         .tp_name = "netlogon.netr_ServerAuthenticate",
   30493             :         .tp_getset = py_netr_ServerAuthenticate_getsetters,
   30494             :         .tp_methods = py_netr_ServerAuthenticate_methods,
   30495             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   30496             :         .tp_new = py_netr_ServerAuthenticate_new,
   30497             : };
   30498             : 
   30499           0 : static bool pack_py_netr_ServerAuthenticate_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerAuthenticate *r)
   30500             : {
   30501             :         PyObject *py_server_name;
   30502             :         PyObject *py_account_name;
   30503             :         PyObject *py_secure_channel_type;
   30504             :         PyObject *py_computer_name;
   30505             :         PyObject *py_credentials;
   30506           0 :         const char *kwnames[] = {
   30507             :                 "server_name", "account_name", "secure_channel_type", "computer_name", "credentials", NULL
   30508             :         };
   30509             : 
   30510           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)) {
   30511           0 :                 return false;
   30512             :         }
   30513             : 
   30514           0 :         if (py_server_name == NULL) {
   30515           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   30516           0 :                 return false;
   30517             :         }
   30518           0 :         if (py_server_name == Py_None) {
   30519           0 :                 r->in.server_name = NULL;
   30520             :         } else {
   30521           0 :                 r->in.server_name = NULL;
   30522             :                 {
   30523             :                         const char *test_str;
   30524             :                         const char *talloc_str;
   30525           0 :                         PyObject *unicode = NULL;
   30526           0 :                         if (PyUnicode_Check(py_server_name)) {
   30527           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   30528           0 :                                 if (unicode == NULL) {
   30529           0 :                                         PyErr_NoMemory();
   30530           0 :                                         return false;
   30531             :                                 }
   30532           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   30533           0 :                         } else if (PyBytes_Check(py_server_name)) {
   30534           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   30535             :                         } else {
   30536           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   30537           0 :                                 return false;
   30538             :                         }
   30539           0 :                         talloc_str = talloc_strdup(r, test_str);
   30540           0 :                         if (unicode != NULL) {
   30541           0 :                                 Py_DECREF(unicode);
   30542             :                         }
   30543           0 :                         if (talloc_str == NULL) {
   30544           0 :                                 PyErr_NoMemory();
   30545           0 :                                 return false;
   30546             :                         }
   30547           0 :                         r->in.server_name = talloc_str;
   30548             :                 }
   30549             :         }
   30550           0 :         if (py_account_name == NULL) {
   30551           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.account_name");
   30552           0 :                 return false;
   30553             :         }
   30554           0 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   30555           0 :         if (r->in.account_name == NULL) {
   30556           0 :                 PyErr_NoMemory();
   30557           0 :                 return false;
   30558             :         }
   30559             :         {
   30560             :                 const char *test_str;
   30561             :                 const char *talloc_str;
   30562           0 :                 PyObject *unicode = NULL;
   30563           0 :                 if (PyUnicode_Check(py_account_name)) {
   30564           0 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   30565           0 :                         if (unicode == NULL) {
   30566           0 :                                 PyErr_NoMemory();
   30567           0 :                                 return false;
   30568             :                         }
   30569           0 :                         test_str = PyBytes_AS_STRING(unicode);
   30570           0 :                 } else if (PyBytes_Check(py_account_name)) {
   30571           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   30572             :                 } else {
   30573           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   30574           0 :                         return false;
   30575             :                 }
   30576           0 :                 talloc_str = talloc_strdup(r, test_str);
   30577           0 :                 if (unicode != NULL) {
   30578           0 :                         Py_DECREF(unicode);
   30579             :                 }
   30580           0 :                 if (talloc_str == NULL) {
   30581           0 :                         PyErr_NoMemory();
   30582           0 :                         return false;
   30583             :                 }
   30584           0 :                 r->in.account_name = talloc_str;
   30585             :         }
   30586           0 :         if (py_secure_channel_type == NULL) {
   30587           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.secure_channel_type");
   30588           0 :                 return false;
   30589             :         }
   30590             :         {
   30591           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
   30592           0 :                 if (PyLong_Check(py_secure_channel_type)) {
   30593             :                         unsigned long long test_var;
   30594           0 :                         test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
   30595           0 :                         if (PyErr_Occurred() != NULL) {
   30596           0 :                                 return false;
   30597             :                         }
   30598           0 :                         if (test_var > uint_max) {
   30599           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   30600             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30601           0 :                                 return false;
   30602             :                         }
   30603           0 :                         r->in.secure_channel_type = test_var;
   30604             :                 } else {
   30605           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   30606             :                           PyLong_Type.tp_name);
   30607           0 :                         return false;
   30608             :                 }
   30609             :         }
   30610           0 :         if (py_computer_name == NULL) {
   30611           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   30612           0 :                 return false;
   30613             :         }
   30614           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   30615           0 :         if (r->in.computer_name == NULL) {
   30616           0 :                 PyErr_NoMemory();
   30617           0 :                 return false;
   30618             :         }
   30619             :         {
   30620             :                 const char *test_str;
   30621             :                 const char *talloc_str;
   30622           0 :                 PyObject *unicode = NULL;
   30623           0 :                 if (PyUnicode_Check(py_computer_name)) {
   30624           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   30625           0 :                         if (unicode == NULL) {
   30626           0 :                                 PyErr_NoMemory();
   30627           0 :                                 return false;
   30628             :                         }
   30629           0 :                         test_str = PyBytes_AS_STRING(unicode);
   30630           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   30631           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   30632             :                 } else {
   30633           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   30634           0 :                         return false;
   30635             :                 }
   30636           0 :                 talloc_str = talloc_strdup(r, test_str);
   30637           0 :                 if (unicode != NULL) {
   30638           0 :                         Py_DECREF(unicode);
   30639             :                 }
   30640           0 :                 if (talloc_str == NULL) {
   30641           0 :                         PyErr_NoMemory();
   30642           0 :                         return false;
   30643             :                 }
   30644           0 :                 r->in.computer_name = talloc_str;
   30645             :         }
   30646           0 :         if (py_credentials == NULL) {
   30647           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credentials");
   30648           0 :                 return false;
   30649             :         }
   30650           0 :         r->in.credentials = talloc_ptrtype(r, r->in.credentials);
   30651           0 :         if (r->in.credentials == NULL) {
   30652           0 :                 PyErr_NoMemory();
   30653           0 :                 return false;
   30654             :         }
   30655           0 :         PY_CHECK_TYPE(&netr_Credential_Type, py_credentials, return false;);
   30656           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credentials)) == NULL) {
   30657           0 :                 PyErr_NoMemory();
   30658           0 :                 return false;
   30659             :         }
   30660           0 :         r->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(py_credentials);
   30661           0 :         return true;
   30662             : }
   30663             : 
   30664           0 : static PyObject *unpack_py_netr_ServerAuthenticate_args_out(struct netr_ServerAuthenticate *r)
   30665             : {
   30666             :         PyObject *result;
   30667             :         PyObject *py_return_credentials;
   30668           0 :         py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, r->out.return_credentials, r->out.return_credentials);
   30669           0 :         result = py_return_credentials;
   30670           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   30671           0 :                 PyErr_SetNTSTATUS(r->out.result);
   30672           0 :                 return NULL;
   30673             :         }
   30674             : 
   30675           0 :         return result;
   30676             : }
   30677             : 
   30678             : 
   30679           0 : static PyObject *py_netr_ServerPasswordSet_in_get_server_name(PyObject *obj, void *closure)
   30680             : {
   30681           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(obj);
   30682             :         PyObject *py_server_name;
   30683           0 :         if (object->in.server_name == NULL) {
   30684           0 :                 Py_RETURN_NONE;
   30685             :         }
   30686           0 :         if (object->in.server_name == NULL) {
   30687           0 :                 py_server_name = Py_None;
   30688           0 :                 Py_INCREF(py_server_name);
   30689             :         } else {
   30690           0 :                 if (object->in.server_name == NULL) {
   30691           0 :                         py_server_name = Py_None;
   30692           0 :                         Py_INCREF(py_server_name);
   30693             :                 } else {
   30694           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   30695             :                 }
   30696             :         }
   30697           0 :         return py_server_name;
   30698             : }
   30699             : 
   30700           0 : static int py_netr_ServerPasswordSet_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   30701             : {
   30702           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(py_obj);
   30703           0 :         if (value == NULL) {
   30704           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   30705           0 :                 return -1;
   30706             :         }
   30707           0 :         if (value == Py_None) {
   30708           0 :                 object->in.server_name = NULL;
   30709             :         } else {
   30710           0 :                 object->in.server_name = NULL;
   30711             :                 {
   30712             :                         const char *test_str;
   30713             :                         const char *talloc_str;
   30714           0 :                         PyObject *unicode = NULL;
   30715           0 :                         if (PyUnicode_Check(value)) {
   30716           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   30717           0 :                                 if (unicode == NULL) {
   30718           0 :                                         PyErr_NoMemory();
   30719           0 :                                         return -1;
   30720             :                                 }
   30721           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   30722           0 :                         } else if (PyBytes_Check(value)) {
   30723           0 :                                 test_str = PyBytes_AS_STRING(value);
   30724             :                         } else {
   30725           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   30726           0 :                                 return -1;
   30727             :                         }
   30728           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   30729           0 :                         if (unicode != NULL) {
   30730           0 :                                 Py_DECREF(unicode);
   30731             :                         }
   30732           0 :                         if (talloc_str == NULL) {
   30733           0 :                                 PyErr_NoMemory();
   30734           0 :                                 return -1;
   30735             :                         }
   30736           0 :                         object->in.server_name = talloc_str;
   30737             :                 }
   30738             :         }
   30739           0 :         return 0;
   30740             : }
   30741             : 
   30742           0 : static PyObject *py_netr_ServerPasswordSet_in_get_account_name(PyObject *obj, void *closure)
   30743             : {
   30744           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(obj);
   30745             :         PyObject *py_account_name;
   30746           0 :         if (object->in.account_name == NULL) {
   30747           0 :                 Py_RETURN_NONE;
   30748             :         }
   30749           0 :         if (object->in.account_name == NULL) {
   30750           0 :                 py_account_name = Py_None;
   30751           0 :                 Py_INCREF(py_account_name);
   30752             :         } else {
   30753           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   30754             :         }
   30755           0 :         return py_account_name;
   30756             : }
   30757             : 
   30758           0 : static int py_netr_ServerPasswordSet_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   30759             : {
   30760           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(py_obj);
   30761           0 :         if (value == NULL) {
   30762           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.account_name");
   30763           0 :                 return -1;
   30764             :         }
   30765           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   30766           0 :         if (object->in.account_name == NULL) {
   30767           0 :                 PyErr_NoMemory();
   30768           0 :                 return -1;
   30769             :         }
   30770             :         {
   30771             :                 const char *test_str;
   30772             :                 const char *talloc_str;
   30773           0 :                 PyObject *unicode = NULL;
   30774           0 :                 if (PyUnicode_Check(value)) {
   30775           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   30776           0 :                         if (unicode == NULL) {
   30777           0 :                                 PyErr_NoMemory();
   30778           0 :                                 return -1;
   30779             :                         }
   30780           0 :                         test_str = PyBytes_AS_STRING(unicode);
   30781           0 :                 } else if (PyBytes_Check(value)) {
   30782           0 :                         test_str = PyBytes_AS_STRING(value);
   30783             :                 } else {
   30784           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   30785           0 :                         return -1;
   30786             :                 }
   30787           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   30788           0 :                 if (unicode != NULL) {
   30789           0 :                         Py_DECREF(unicode);
   30790             :                 }
   30791           0 :                 if (talloc_str == NULL) {
   30792           0 :                         PyErr_NoMemory();
   30793           0 :                         return -1;
   30794             :                 }
   30795           0 :                 object->in.account_name = talloc_str;
   30796             :         }
   30797           0 :         return 0;
   30798             : }
   30799             : 
   30800           0 : static PyObject *py_netr_ServerPasswordSet_in_get_secure_channel_type(PyObject *obj, void *closure)
   30801             : {
   30802           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(obj);
   30803             :         PyObject *py_secure_channel_type;
   30804           0 :         py_secure_channel_type = PyLong_FromLong((uint16_t)object->in.secure_channel_type);
   30805           0 :         return py_secure_channel_type;
   30806             : }
   30807             : 
   30808           0 : static int py_netr_ServerPasswordSet_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
   30809             : {
   30810           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(py_obj);
   30811           0 :         if (value == NULL) {
   30812           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.secure_channel_type");
   30813           0 :                 return -1;
   30814             :         }
   30815             :         {
   30816           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
   30817           0 :                 if (PyLong_Check(value)) {
   30818             :                         unsigned long long test_var;
   30819           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   30820           0 :                         if (PyErr_Occurred() != NULL) {
   30821           0 :                                 return -1;
   30822             :                         }
   30823           0 :                         if (test_var > uint_max) {
   30824           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   30825             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30826           0 :                                 return -1;
   30827             :                         }
   30828           0 :                         object->in.secure_channel_type = test_var;
   30829             :                 } else {
   30830           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   30831             :                           PyLong_Type.tp_name);
   30832           0 :                         return -1;
   30833             :                 }
   30834             :         }
   30835           0 :         return 0;
   30836             : }
   30837             : 
   30838           0 : static PyObject *py_netr_ServerPasswordSet_in_get_computer_name(PyObject *obj, void *closure)
   30839             : {
   30840           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(obj);
   30841             :         PyObject *py_computer_name;
   30842           0 :         if (object->in.computer_name == NULL) {
   30843           0 :                 Py_RETURN_NONE;
   30844             :         }
   30845           0 :         if (object->in.computer_name == NULL) {
   30846           0 :                 py_computer_name = Py_None;
   30847           0 :                 Py_INCREF(py_computer_name);
   30848             :         } else {
   30849           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   30850             :         }
   30851           0 :         return py_computer_name;
   30852             : }
   30853             : 
   30854           0 : static int py_netr_ServerPasswordSet_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   30855             : {
   30856           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(py_obj);
   30857           0 :         if (value == NULL) {
   30858           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   30859           0 :                 return -1;
   30860             :         }
   30861           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   30862           0 :         if (object->in.computer_name == NULL) {
   30863           0 :                 PyErr_NoMemory();
   30864           0 :                 return -1;
   30865             :         }
   30866             :         {
   30867             :                 const char *test_str;
   30868             :                 const char *talloc_str;
   30869           0 :                 PyObject *unicode = NULL;
   30870           0 :                 if (PyUnicode_Check(value)) {
   30871           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   30872           0 :                         if (unicode == NULL) {
   30873           0 :                                 PyErr_NoMemory();
   30874           0 :                                 return -1;
   30875             :                         }
   30876           0 :                         test_str = PyBytes_AS_STRING(unicode);
   30877           0 :                 } else if (PyBytes_Check(value)) {
   30878           0 :                         test_str = PyBytes_AS_STRING(value);
   30879             :                 } else {
   30880           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   30881           0 :                         return -1;
   30882             :                 }
   30883           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   30884           0 :                 if (unicode != NULL) {
   30885           0 :                         Py_DECREF(unicode);
   30886             :                 }
   30887           0 :                 if (talloc_str == NULL) {
   30888           0 :                         PyErr_NoMemory();
   30889           0 :                         return -1;
   30890             :                 }
   30891           0 :                 object->in.computer_name = talloc_str;
   30892             :         }
   30893           0 :         return 0;
   30894             : }
   30895             : 
   30896           0 : static PyObject *py_netr_ServerPasswordSet_in_get_credential(PyObject *obj, void *closure)
   30897             : {
   30898           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(obj);
   30899             :         PyObject *py_credential;
   30900           0 :         if (object->in.credential == NULL) {
   30901           0 :                 Py_RETURN_NONE;
   30902             :         }
   30903           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   30904           0 :         return py_credential;
   30905             : }
   30906             : 
   30907           0 : static int py_netr_ServerPasswordSet_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   30908             : {
   30909           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(py_obj);
   30910           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   30911           0 :         if (value == NULL) {
   30912           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   30913           0 :                 return -1;
   30914             :         }
   30915           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   30916           0 :         if (object->in.credential == NULL) {
   30917           0 :                 PyErr_NoMemory();
   30918           0 :                 return -1;
   30919             :         }
   30920           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   30921           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   30922           0 :                 PyErr_NoMemory();
   30923           0 :                 return -1;
   30924             :         }
   30925           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   30926           0 :         return 0;
   30927             : }
   30928             : 
   30929           0 : static PyObject *py_netr_ServerPasswordSet_out_get_return_authenticator(PyObject *obj, void *closure)
   30930             : {
   30931           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(obj);
   30932             :         PyObject *py_return_authenticator;
   30933           0 :         if (object->out.return_authenticator == NULL) {
   30934           0 :                 Py_RETURN_NONE;
   30935             :         }
   30936           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   30937           0 :         return py_return_authenticator;
   30938             : }
   30939             : 
   30940           0 : static int py_netr_ServerPasswordSet_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   30941             : {
   30942           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(py_obj);
   30943           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   30944           0 :         if (value == NULL) {
   30945           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   30946           0 :                 return -1;
   30947             :         }
   30948           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   30949           0 :         if (object->out.return_authenticator == NULL) {
   30950           0 :                 PyErr_NoMemory();
   30951           0 :                 return -1;
   30952             :         }
   30953           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   30954           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   30955           0 :                 PyErr_NoMemory();
   30956           0 :                 return -1;
   30957             :         }
   30958           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   30959           0 :         return 0;
   30960             : }
   30961             : 
   30962           0 : static PyObject *py_netr_ServerPasswordSet_in_get_new_password(PyObject *obj, void *closure)
   30963             : {
   30964           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(obj);
   30965             :         PyObject *py_new_password;
   30966           0 :         if (object->in.new_password == NULL) {
   30967           0 :                 Py_RETURN_NONE;
   30968             :         }
   30969           0 :         py_new_password = pytalloc_reference_ex(samr_Password_Type, object->in.new_password, object->in.new_password);
   30970           0 :         return py_new_password;
   30971             : }
   30972             : 
   30973           0 : static int py_netr_ServerPasswordSet_in_set_new_password(PyObject *py_obj, PyObject *value, void *closure)
   30974             : {
   30975           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(py_obj);
   30976           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.new_password));
   30977           0 :         if (value == NULL) {
   30978           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.new_password");
   30979           0 :                 return -1;
   30980             :         }
   30981           0 :         object->in.new_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.new_password);
   30982           0 :         if (object->in.new_password == NULL) {
   30983           0 :                 PyErr_NoMemory();
   30984           0 :                 return -1;
   30985             :         }
   30986           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
   30987           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   30988           0 :                 PyErr_NoMemory();
   30989           0 :                 return -1;
   30990             :         }
   30991           0 :         object->in.new_password = (struct samr_Password *)pytalloc_get_ptr(value);
   30992           0 :         return 0;
   30993             : }
   30994             : 
   30995           0 : static PyObject *py_netr_ServerPasswordSet_get_result(PyObject *obj, void *closure)
   30996             : {
   30997           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(obj);
   30998             :         PyObject *py_result;
   30999           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   31000           0 :         return py_result;
   31001             : }
   31002             : 
   31003           0 : static int py_netr_ServerPasswordSet_set_result(PyObject *py_obj, PyObject *value, void *closure)
   31004             : {
   31005           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(py_obj);
   31006           0 :         if (value == NULL) {
   31007           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   31008           0 :                 return -1;
   31009             :         }
   31010           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   31011           0 :         return 0;
   31012             : }
   31013             : 
   31014             : static PyGetSetDef py_netr_ServerPasswordSet_getsetters[] = {
   31015             :         {
   31016             :                 .name = discard_const_p(char, "in_server_name"),
   31017             :                 .get = py_netr_ServerPasswordSet_in_get_server_name,
   31018             :                 .set = py_netr_ServerPasswordSet_in_set_server_name,
   31019             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   31020             :         },
   31021             :         {
   31022             :                 .name = discard_const_p(char, "in_account_name"),
   31023             :                 .get = py_netr_ServerPasswordSet_in_get_account_name,
   31024             :                 .set = py_netr_ServerPasswordSet_in_set_account_name,
   31025             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   31026             :         },
   31027             :         {
   31028             :                 .name = discard_const_p(char, "in_secure_channel_type"),
   31029             :                 .get = py_netr_ServerPasswordSet_in_get_secure_channel_type,
   31030             :                 .set = py_netr_ServerPasswordSet_in_set_secure_channel_type,
   31031             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
   31032             :         },
   31033             :         {
   31034             :                 .name = discard_const_p(char, "in_computer_name"),
   31035             :                 .get = py_netr_ServerPasswordSet_in_get_computer_name,
   31036             :                 .set = py_netr_ServerPasswordSet_in_set_computer_name,
   31037             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   31038             :         },
   31039             :         {
   31040             :                 .name = discard_const_p(char, "in_credential"),
   31041             :                 .get = py_netr_ServerPasswordSet_in_get_credential,
   31042             :                 .set = py_netr_ServerPasswordSet_in_set_credential,
   31043             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   31044             :         },
   31045             :         {
   31046             :                 .name = discard_const_p(char, "out_return_authenticator"),
   31047             :                 .get = py_netr_ServerPasswordSet_out_get_return_authenticator,
   31048             :                 .set = py_netr_ServerPasswordSet_out_set_return_authenticator,
   31049             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   31050             :         },
   31051             :         {
   31052             :                 .name = discard_const_p(char, "in_new_password"),
   31053             :                 .get = py_netr_ServerPasswordSet_in_get_new_password,
   31054             :                 .set = py_netr_ServerPasswordSet_in_set_new_password,
   31055             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
   31056             :         },
   31057             :         {
   31058             :                 .name = discard_const_p(char, "result"),
   31059             :                 .get = py_netr_ServerPasswordSet_get_result,
   31060             :                 .set = py_netr_ServerPasswordSet_set_result,
   31061             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   31062             :         },
   31063             :         { .name = NULL }
   31064             : };
   31065             : 
   31066           0 : static PyObject *py_netr_ServerPasswordSet_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   31067             : {
   31068           0 :         PyObject *self = pytalloc_new(struct netr_ServerPasswordSet, type);
   31069           0 :         struct netr_ServerPasswordSet *_self = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(self);
   31070           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   31071           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   31072           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   31073           0 :         _self->in.new_password = talloc_zero(mem_ctx, struct samr_Password);
   31074           0 :         return self;
   31075             : }
   31076             : 
   31077           0 : static PyObject *py_netr_ServerPasswordSet_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   31078             : {
   31079             : 
   31080             : 
   31081           0 :         return PyLong_FromLong(6);
   31082             : }
   31083             : 
   31084           0 : static PyObject *py_netr_ServerPasswordSet_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   31085             : {
   31086           0 :         const struct ndr_interface_call *call = NULL;
   31087           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(py_obj);
   31088           0 :         PyObject *ret = NULL;
   31089           0 :         struct ndr_push *push = NULL;
   31090             :         DATA_BLOB blob;
   31091             :         enum ndr_err_code err;
   31092             : 
   31093           0 :         if (ndr_table_netlogon.num_calls < 7) {
   31094           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordSet_ndr_pack");
   31095           0 :                 return NULL;
   31096             :         }
   31097           0 :         call = &ndr_table_netlogon.calls[6];
   31098             : 
   31099           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   31100           0 :         if (push == NULL) {
   31101           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   31102           0 :                 return NULL;
   31103             :         }
   31104             : 
   31105           0 :         push->flags |= ndr_push_flags;
   31106             : 
   31107           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   31108           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   31109           0 :                 TALLOC_FREE(push);
   31110           0 :                 PyErr_SetNdrError(err);
   31111           0 :                 return NULL;
   31112             :         }
   31113           0 :         blob = ndr_push_blob(push);
   31114           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   31115           0 :         TALLOC_FREE(push);
   31116           0 :         return ret;
   31117             : }
   31118             : 
   31119           0 : static PyObject *py_netr_ServerPasswordSet_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31120             : {
   31121           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   31122           0 :         PyObject *bigendian_obj = NULL;
   31123           0 :         PyObject *ndr64_obj = NULL;
   31124           0 :         uint32_t ndr_push_flags = 0;
   31125             : 
   31126           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   31127             :                 discard_const_p(char *, kwnames),
   31128             :                 &bigendian_obj,
   31129             :                 &ndr64_obj)) {
   31130           0 :                 return NULL;
   31131             :         }
   31132             : 
   31133           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31134           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   31135             :         }
   31136           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31137           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   31138             :         }
   31139             : 
   31140           0 :         return py_netr_ServerPasswordSet_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   31141             : }
   31142             : 
   31143           0 : static PyObject *py_netr_ServerPasswordSet_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31144             : {
   31145           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   31146           0 :         PyObject *bigendian_obj = NULL;
   31147           0 :         PyObject *ndr64_obj = NULL;
   31148           0 :         uint32_t ndr_push_flags = 0;
   31149             : 
   31150           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   31151             :                 discard_const_p(char *, kwnames),
   31152             :                 &bigendian_obj,
   31153             :                 &ndr64_obj)) {
   31154           0 :                 return NULL;
   31155             :         }
   31156             : 
   31157           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31158           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   31159             :         }
   31160           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31161           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   31162             :         }
   31163             : 
   31164           0 :         return py_netr_ServerPasswordSet_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   31165             : }
   31166             : 
   31167           0 : static PyObject *py_netr_ServerPasswordSet_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   31168             : {
   31169           0 :         const struct ndr_interface_call *call = NULL;
   31170           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(py_obj);
   31171           0 :         struct ndr_pull *pull = NULL;
   31172             :         enum ndr_err_code err;
   31173             : 
   31174           0 :         if (ndr_table_netlogon.num_calls < 7) {
   31175           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordSet_ndr_unpack");
   31176           0 :                 return NULL;
   31177             :         }
   31178           0 :         call = &ndr_table_netlogon.calls[6];
   31179             : 
   31180           0 :         pull = ndr_pull_init_blob(blob, object);
   31181           0 :         if (pull == NULL) {
   31182           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   31183           0 :                 return NULL;
   31184             :         }
   31185             : 
   31186           0 :         pull->flags |= ndr_pull_flags;
   31187             : 
   31188           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   31189           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   31190           0 :                 TALLOC_FREE(pull);
   31191           0 :                 PyErr_SetNdrError(err);
   31192           0 :                 return NULL;
   31193             :         }
   31194           0 :         if (!allow_remaining) {
   31195             :                 uint32_t highest_ofs;
   31196             : 
   31197           0 :                 if (pull->offset > pull->relative_highest_offset) {
   31198           0 :                         highest_ofs = pull->offset;
   31199             :                 } else {
   31200           0 :                         highest_ofs = pull->relative_highest_offset;
   31201             :                 }
   31202           0 :                 if (highest_ofs < pull->data_size) {
   31203           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   31204             :                                 "not all bytes consumed ofs[%u] size[%u]",
   31205             :                                 highest_ofs, pull->data_size);
   31206           0 :                         TALLOC_FREE(pull);
   31207           0 :                         PyErr_SetNdrError(err);
   31208           0 :                         return NULL;
   31209             :                 }
   31210             :         }
   31211             : 
   31212           0 :         TALLOC_FREE(pull);
   31213           0 :         Py_RETURN_NONE;
   31214             : }
   31215             : 
   31216           0 : static PyObject *py_netr_ServerPasswordSet_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31217             : {
   31218             :         DATA_BLOB blob;
   31219           0 :         Py_ssize_t blob_length = 0;
   31220           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   31221           0 :         PyObject *bigendian_obj = NULL;
   31222           0 :         PyObject *ndr64_obj = NULL;
   31223           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   31224           0 :         PyObject *allow_remaining_obj = NULL;
   31225           0 :         bool allow_remaining = false;
   31226             : 
   31227           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   31228             :                 discard_const_p(char *, kwnames),
   31229             :                 &blob.data, &blob_length,
   31230             :                 &bigendian_obj,
   31231             :                 &ndr64_obj,
   31232             :                 &allow_remaining_obj)) {
   31233           0 :                 return NULL;
   31234             :         }
   31235           0 :         blob.length = blob_length;
   31236             : 
   31237           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31238           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   31239             :         }
   31240           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31241           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   31242             :         }
   31243             : 
   31244           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   31245           0 :                 allow_remaining = true;
   31246             :         }
   31247             : 
   31248           0 :         return py_netr_ServerPasswordSet_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   31249             : }
   31250             : 
   31251           0 : static PyObject *py_netr_ServerPasswordSet_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   31252             : {
   31253             :         DATA_BLOB blob;
   31254           0 :         Py_ssize_t blob_length = 0;
   31255           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   31256           0 :         PyObject *bigendian_obj = NULL;
   31257           0 :         PyObject *ndr64_obj = NULL;
   31258           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   31259           0 :         PyObject *allow_remaining_obj = NULL;
   31260           0 :         bool allow_remaining = false;
   31261             : 
   31262           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   31263             :                 discard_const_p(char *, kwnames),
   31264             :                 &blob.data, &blob_length,
   31265             :                 &bigendian_obj,
   31266             :                 &ndr64_obj,
   31267             :                 &allow_remaining_obj)) {
   31268           0 :                 return NULL;
   31269             :         }
   31270           0 :         blob.length = blob_length;
   31271             : 
   31272           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   31273           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   31274             :         }
   31275           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   31276           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   31277             :         }
   31278             : 
   31279           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   31280           0 :                 allow_remaining = true;
   31281             :         }
   31282             : 
   31283           0 :         return py_netr_ServerPasswordSet_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   31284             : }
   31285             : 
   31286           0 : static PyObject *py_netr_ServerPasswordSet_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   31287             : {
   31288           0 :         const struct ndr_interface_call *call = NULL;
   31289           0 :         struct netr_ServerPasswordSet *object = (struct netr_ServerPasswordSet *)pytalloc_get_ptr(py_obj);
   31290             :         PyObject *ret;
   31291             :         char *retstr;
   31292             : 
   31293           0 :         if (ndr_table_netlogon.num_calls < 7) {
   31294           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordSet_ndr_print");
   31295           0 :                 return NULL;
   31296             :         }
   31297           0 :         call = &ndr_table_netlogon.calls[6];
   31298             : 
   31299           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   31300           0 :         ret = PyUnicode_FromString(retstr);
   31301           0 :         TALLOC_FREE(retstr);
   31302             : 
   31303           0 :         return ret;
   31304             : }
   31305             : 
   31306           0 : static PyObject *py_netr_ServerPasswordSet_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   31307             : {
   31308           0 :         return py_netr_ServerPasswordSet_ndr_print(py_obj, "netr_ServerPasswordSet_in", NDR_IN);
   31309             : }
   31310             : 
   31311           0 : static PyObject *py_netr_ServerPasswordSet_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   31312             : {
   31313           0 :         return py_netr_ServerPasswordSet_ndr_print(py_obj, "netr_ServerPasswordSet_out", NDR_OUT);
   31314             : }
   31315             : 
   31316             : static PyMethodDef py_netr_ServerPasswordSet_methods[] = {
   31317             :         { "opnum", (PyCFunction)py_netr_ServerPasswordSet_ndr_opnum, METH_NOARGS|METH_CLASS,
   31318             :                 "netlogon.netr_ServerPasswordSet.opnum() -> 6 (0x06) " },
   31319             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   31320             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   31321             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   31322             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   31323             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   31324             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   31325             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   31326             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   31327             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerPasswordSet_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   31328             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerPasswordSet_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   31329             :         { NULL, NULL, 0, NULL }
   31330             : };
   31331             : 
   31332             : 
   31333             : static PyTypeObject netr_ServerPasswordSet_Type = {
   31334             :         PyVarObject_HEAD_INIT(NULL, 0)
   31335             :         .tp_name = "netlogon.netr_ServerPasswordSet",
   31336             :         .tp_getset = py_netr_ServerPasswordSet_getsetters,
   31337             :         .tp_methods = py_netr_ServerPasswordSet_methods,
   31338             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   31339             :         .tp_new = py_netr_ServerPasswordSet_new,
   31340             : };
   31341             : 
   31342           0 : static bool pack_py_netr_ServerPasswordSet_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerPasswordSet *r)
   31343             : {
   31344             :         PyObject *py_server_name;
   31345             :         PyObject *py_account_name;
   31346             :         PyObject *py_secure_channel_type;
   31347             :         PyObject *py_computer_name;
   31348             :         PyObject *py_credential;
   31349             :         PyObject *py_new_password;
   31350           0 :         const char *kwnames[] = {
   31351             :                 "server_name", "account_name", "secure_channel_type", "computer_name", "credential", "new_password", NULL
   31352             :         };
   31353             : 
   31354           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)) {
   31355           0 :                 return false;
   31356             :         }
   31357             : 
   31358           0 :         if (py_server_name == NULL) {
   31359           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   31360           0 :                 return false;
   31361             :         }
   31362           0 :         if (py_server_name == Py_None) {
   31363           0 :                 r->in.server_name = NULL;
   31364             :         } else {
   31365           0 :                 r->in.server_name = NULL;
   31366             :                 {
   31367             :                         const char *test_str;
   31368             :                         const char *talloc_str;
   31369           0 :                         PyObject *unicode = NULL;
   31370           0 :                         if (PyUnicode_Check(py_server_name)) {
   31371           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   31372           0 :                                 if (unicode == NULL) {
   31373           0 :                                         PyErr_NoMemory();
   31374           0 :                                         return false;
   31375             :                                 }
   31376           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   31377           0 :                         } else if (PyBytes_Check(py_server_name)) {
   31378           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   31379             :                         } else {
   31380           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   31381           0 :                                 return false;
   31382             :                         }
   31383           0 :                         talloc_str = talloc_strdup(r, test_str);
   31384           0 :                         if (unicode != NULL) {
   31385           0 :                                 Py_DECREF(unicode);
   31386             :                         }
   31387           0 :                         if (talloc_str == NULL) {
   31388           0 :                                 PyErr_NoMemory();
   31389           0 :                                 return false;
   31390             :                         }
   31391           0 :                         r->in.server_name = talloc_str;
   31392             :                 }
   31393             :         }
   31394           0 :         if (py_account_name == NULL) {
   31395           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.account_name");
   31396           0 :                 return false;
   31397             :         }
   31398           0 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   31399           0 :         if (r->in.account_name == NULL) {
   31400           0 :                 PyErr_NoMemory();
   31401           0 :                 return false;
   31402             :         }
   31403             :         {
   31404             :                 const char *test_str;
   31405             :                 const char *talloc_str;
   31406           0 :                 PyObject *unicode = NULL;
   31407           0 :                 if (PyUnicode_Check(py_account_name)) {
   31408           0 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   31409           0 :                         if (unicode == NULL) {
   31410           0 :                                 PyErr_NoMemory();
   31411           0 :                                 return false;
   31412             :                         }
   31413           0 :                         test_str = PyBytes_AS_STRING(unicode);
   31414           0 :                 } else if (PyBytes_Check(py_account_name)) {
   31415           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   31416             :                 } else {
   31417           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   31418           0 :                         return false;
   31419             :                 }
   31420           0 :                 talloc_str = talloc_strdup(r, test_str);
   31421           0 :                 if (unicode != NULL) {
   31422           0 :                         Py_DECREF(unicode);
   31423             :                 }
   31424           0 :                 if (talloc_str == NULL) {
   31425           0 :                         PyErr_NoMemory();
   31426           0 :                         return false;
   31427             :                 }
   31428           0 :                 r->in.account_name = talloc_str;
   31429             :         }
   31430           0 :         if (py_secure_channel_type == NULL) {
   31431           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.secure_channel_type");
   31432           0 :                 return false;
   31433             :         }
   31434             :         {
   31435           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
   31436           0 :                 if (PyLong_Check(py_secure_channel_type)) {
   31437             :                         unsigned long long test_var;
   31438           0 :                         test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
   31439           0 :                         if (PyErr_Occurred() != NULL) {
   31440           0 :                                 return false;
   31441             :                         }
   31442           0 :                         if (test_var > uint_max) {
   31443           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   31444             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31445           0 :                                 return false;
   31446             :                         }
   31447           0 :                         r->in.secure_channel_type = test_var;
   31448             :                 } else {
   31449           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   31450             :                           PyLong_Type.tp_name);
   31451           0 :                         return false;
   31452             :                 }
   31453             :         }
   31454           0 :         if (py_computer_name == NULL) {
   31455           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   31456           0 :                 return false;
   31457             :         }
   31458           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   31459           0 :         if (r->in.computer_name == NULL) {
   31460           0 :                 PyErr_NoMemory();
   31461           0 :                 return false;
   31462             :         }
   31463             :         {
   31464             :                 const char *test_str;
   31465             :                 const char *talloc_str;
   31466           0 :                 PyObject *unicode = NULL;
   31467           0 :                 if (PyUnicode_Check(py_computer_name)) {
   31468           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   31469           0 :                         if (unicode == NULL) {
   31470           0 :                                 PyErr_NoMemory();
   31471           0 :                                 return false;
   31472             :                         }
   31473           0 :                         test_str = PyBytes_AS_STRING(unicode);
   31474           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   31475           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   31476             :                 } else {
   31477           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   31478           0 :                         return false;
   31479             :                 }
   31480           0 :                 talloc_str = talloc_strdup(r, test_str);
   31481           0 :                 if (unicode != NULL) {
   31482           0 :                         Py_DECREF(unicode);
   31483             :                 }
   31484           0 :                 if (talloc_str == NULL) {
   31485           0 :                         PyErr_NoMemory();
   31486           0 :                         return false;
   31487             :                 }
   31488           0 :                 r->in.computer_name = talloc_str;
   31489             :         }
   31490           0 :         if (py_credential == NULL) {
   31491           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   31492           0 :                 return false;
   31493             :         }
   31494           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   31495           0 :         if (r->in.credential == NULL) {
   31496           0 :                 PyErr_NoMemory();
   31497           0 :                 return false;
   31498             :         }
   31499           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   31500           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   31501           0 :                 PyErr_NoMemory();
   31502           0 :                 return false;
   31503             :         }
   31504           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   31505           0 :         if (py_new_password == NULL) {
   31506           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.new_password");
   31507           0 :                 return false;
   31508             :         }
   31509           0 :         r->in.new_password = talloc_ptrtype(r, r->in.new_password);
   31510           0 :         if (r->in.new_password == NULL) {
   31511           0 :                 PyErr_NoMemory();
   31512           0 :                 return false;
   31513             :         }
   31514           0 :         PY_CHECK_TYPE(samr_Password_Type, py_new_password, return false;);
   31515           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_new_password)) == NULL) {
   31516           0 :                 PyErr_NoMemory();
   31517           0 :                 return false;
   31518             :         }
   31519           0 :         r->in.new_password = (struct samr_Password *)pytalloc_get_ptr(py_new_password);
   31520           0 :         return true;
   31521             : }
   31522             : 
   31523           0 : static PyObject *unpack_py_netr_ServerPasswordSet_args_out(struct netr_ServerPasswordSet *r)
   31524             : {
   31525             :         PyObject *result;
   31526             :         PyObject *py_return_authenticator;
   31527           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   31528           0 :         result = py_return_authenticator;
   31529           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   31530           0 :                 PyErr_SetNTSTATUS(r->out.result);
   31531           0 :                 return NULL;
   31532             :         }
   31533             : 
   31534           0 :         return result;
   31535             : }
   31536             : 
   31537             : 
   31538           0 : static PyObject *py_netr_DatabaseDeltas_in_get_logon_server(PyObject *obj, void *closure)
   31539             : {
   31540           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(obj);
   31541             :         PyObject *py_logon_server;
   31542           0 :         if (object->in.logon_server == NULL) {
   31543           0 :                 Py_RETURN_NONE;
   31544             :         }
   31545           0 :         if (object->in.logon_server == NULL) {
   31546           0 :                 py_logon_server = Py_None;
   31547           0 :                 Py_INCREF(py_logon_server);
   31548             :         } else {
   31549           0 :                 py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   31550             :         }
   31551           0 :         return py_logon_server;
   31552             : }
   31553             : 
   31554           0 : static int py_netr_DatabaseDeltas_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   31555             : {
   31556           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   31557           0 :         if (value == NULL) {
   31558           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_server");
   31559           0 :                 return -1;
   31560             :         }
   31561           0 :         object->in.logon_server = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon_server);
   31562           0 :         if (object->in.logon_server == NULL) {
   31563           0 :                 PyErr_NoMemory();
   31564           0 :                 return -1;
   31565             :         }
   31566             :         {
   31567             :                 const char *test_str;
   31568             :                 const char *talloc_str;
   31569           0 :                 PyObject *unicode = NULL;
   31570           0 :                 if (PyUnicode_Check(value)) {
   31571           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   31572           0 :                         if (unicode == NULL) {
   31573           0 :                                 PyErr_NoMemory();
   31574           0 :                                 return -1;
   31575             :                         }
   31576           0 :                         test_str = PyBytes_AS_STRING(unicode);
   31577           0 :                 } else if (PyBytes_Check(value)) {
   31578           0 :                         test_str = PyBytes_AS_STRING(value);
   31579             :                 } else {
   31580           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   31581           0 :                         return -1;
   31582             :                 }
   31583           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   31584           0 :                 if (unicode != NULL) {
   31585           0 :                         Py_DECREF(unicode);
   31586             :                 }
   31587           0 :                 if (talloc_str == NULL) {
   31588           0 :                         PyErr_NoMemory();
   31589           0 :                         return -1;
   31590             :                 }
   31591           0 :                 object->in.logon_server = talloc_str;
   31592             :         }
   31593           0 :         return 0;
   31594             : }
   31595             : 
   31596           0 : static PyObject *py_netr_DatabaseDeltas_in_get_computername(PyObject *obj, void *closure)
   31597             : {
   31598           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(obj);
   31599             :         PyObject *py_computername;
   31600           0 :         if (object->in.computername == NULL) {
   31601           0 :                 Py_RETURN_NONE;
   31602             :         }
   31603           0 :         if (object->in.computername == NULL) {
   31604           0 :                 py_computername = Py_None;
   31605           0 :                 Py_INCREF(py_computername);
   31606             :         } else {
   31607           0 :                 py_computername = PyUnicode_Decode(object->in.computername, strlen(object->in.computername), "utf-8", "ignore");
   31608             :         }
   31609           0 :         return py_computername;
   31610             : }
   31611             : 
   31612           0 : static int py_netr_DatabaseDeltas_in_set_computername(PyObject *py_obj, PyObject *value, void *closure)
   31613             : {
   31614           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   31615           0 :         if (value == NULL) {
   31616           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computername");
   31617           0 :                 return -1;
   31618             :         }
   31619           0 :         object->in.computername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computername);
   31620           0 :         if (object->in.computername == NULL) {
   31621           0 :                 PyErr_NoMemory();
   31622           0 :                 return -1;
   31623             :         }
   31624             :         {
   31625             :                 const char *test_str;
   31626             :                 const char *talloc_str;
   31627           0 :                 PyObject *unicode = NULL;
   31628           0 :                 if (PyUnicode_Check(value)) {
   31629           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   31630           0 :                         if (unicode == NULL) {
   31631           0 :                                 PyErr_NoMemory();
   31632           0 :                                 return -1;
   31633             :                         }
   31634           0 :                         test_str = PyBytes_AS_STRING(unicode);
   31635           0 :                 } else if (PyBytes_Check(value)) {
   31636           0 :                         test_str = PyBytes_AS_STRING(value);
   31637             :                 } else {
   31638           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   31639           0 :                         return -1;
   31640             :                 }
   31641           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   31642           0 :                 if (unicode != NULL) {
   31643           0 :                         Py_DECREF(unicode);
   31644             :                 }
   31645           0 :                 if (talloc_str == NULL) {
   31646           0 :                         PyErr_NoMemory();
   31647           0 :                         return -1;
   31648             :                 }
   31649           0 :                 object->in.computername = talloc_str;
   31650             :         }
   31651           0 :         return 0;
   31652             : }
   31653             : 
   31654           0 : static PyObject *py_netr_DatabaseDeltas_in_get_credential(PyObject *obj, void *closure)
   31655             : {
   31656           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(obj);
   31657             :         PyObject *py_credential;
   31658           0 :         if (object->in.credential == NULL) {
   31659           0 :                 Py_RETURN_NONE;
   31660             :         }
   31661           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   31662           0 :         return py_credential;
   31663             : }
   31664             : 
   31665           0 : static int py_netr_DatabaseDeltas_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   31666             : {
   31667           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   31668           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   31669           0 :         if (value == NULL) {
   31670           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   31671           0 :                 return -1;
   31672             :         }
   31673           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   31674           0 :         if (object->in.credential == NULL) {
   31675           0 :                 PyErr_NoMemory();
   31676           0 :                 return -1;
   31677             :         }
   31678           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   31679           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   31680           0 :                 PyErr_NoMemory();
   31681           0 :                 return -1;
   31682             :         }
   31683           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   31684           0 :         return 0;
   31685             : }
   31686             : 
   31687           0 : static PyObject *py_netr_DatabaseDeltas_in_get_return_authenticator(PyObject *obj, void *closure)
   31688             : {
   31689           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(obj);
   31690             :         PyObject *py_return_authenticator;
   31691           0 :         if (object->in.return_authenticator == NULL) {
   31692           0 :                 Py_RETURN_NONE;
   31693             :         }
   31694           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   31695           0 :         return py_return_authenticator;
   31696             : }
   31697             : 
   31698           0 : static int py_netr_DatabaseDeltas_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   31699             : {
   31700           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   31701           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   31702           0 :         if (value == NULL) {
   31703           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.return_authenticator");
   31704           0 :                 return -1;
   31705             :         }
   31706           0 :         object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
   31707           0 :         if (object->in.return_authenticator == NULL) {
   31708           0 :                 PyErr_NoMemory();
   31709           0 :                 return -1;
   31710             :         }
   31711           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   31712           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   31713           0 :                 PyErr_NoMemory();
   31714           0 :                 return -1;
   31715             :         }
   31716           0 :         object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   31717           0 :         return 0;
   31718             : }
   31719             : 
   31720           0 : static PyObject *py_netr_DatabaseDeltas_out_get_return_authenticator(PyObject *obj, void *closure)
   31721             : {
   31722           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(obj);
   31723             :         PyObject *py_return_authenticator;
   31724           0 :         if (object->out.return_authenticator == NULL) {
   31725           0 :                 Py_RETURN_NONE;
   31726             :         }
   31727           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   31728           0 :         return py_return_authenticator;
   31729             : }
   31730             : 
   31731           0 : static int py_netr_DatabaseDeltas_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   31732             : {
   31733           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   31734           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   31735           0 :         if (value == NULL) {
   31736           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   31737           0 :                 return -1;
   31738             :         }
   31739           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   31740           0 :         if (object->out.return_authenticator == NULL) {
   31741           0 :                 PyErr_NoMemory();
   31742           0 :                 return -1;
   31743             :         }
   31744           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   31745           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   31746           0 :                 PyErr_NoMemory();
   31747           0 :                 return -1;
   31748             :         }
   31749           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   31750           0 :         return 0;
   31751             : }
   31752             : 
   31753           0 : static PyObject *py_netr_DatabaseDeltas_in_get_database_id(PyObject *obj, void *closure)
   31754             : {
   31755           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(obj);
   31756             :         PyObject *py_database_id;
   31757           0 :         py_database_id = PyLong_FromUnsignedLongLong((uint32_t)object->in.database_id);
   31758           0 :         return py_database_id;
   31759             : }
   31760             : 
   31761           0 : static int py_netr_DatabaseDeltas_in_set_database_id(PyObject *py_obj, PyObject *value, void *closure)
   31762             : {
   31763           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   31764           0 :         if (value == NULL) {
   31765           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.database_id");
   31766           0 :                 return -1;
   31767             :         }
   31768             :         {
   31769           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.database_id));
   31770           0 :                 if (PyLong_Check(value)) {
   31771             :                         unsigned long long test_var;
   31772           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   31773           0 :                         if (PyErr_Occurred() != NULL) {
   31774           0 :                                 return -1;
   31775             :                         }
   31776           0 :                         if (test_var > uint_max) {
   31777           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   31778             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31779           0 :                                 return -1;
   31780             :                         }
   31781           0 :                         object->in.database_id = test_var;
   31782             :                 } else {
   31783           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   31784             :                           PyLong_Type.tp_name);
   31785           0 :                         return -1;
   31786             :                 }
   31787             :         }
   31788           0 :         return 0;
   31789             : }
   31790             : 
   31791           0 : static PyObject *py_netr_DatabaseDeltas_in_get_sequence_num(PyObject *obj, void *closure)
   31792             : {
   31793           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(obj);
   31794             :         PyObject *py_sequence_num;
   31795           0 :         if (object->in.sequence_num == NULL) {
   31796           0 :                 Py_RETURN_NONE;
   31797             :         }
   31798           0 :         py_sequence_num = PyLong_FromUnsignedLongLong(*object->in.sequence_num);
   31799           0 :         return py_sequence_num;
   31800             : }
   31801             : 
   31802           0 : static int py_netr_DatabaseDeltas_in_set_sequence_num(PyObject *py_obj, PyObject *value, void *closure)
   31803             : {
   31804           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   31805           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sequence_num));
   31806           0 :         if (value == NULL) {
   31807           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.sequence_num");
   31808           0 :                 return -1;
   31809             :         }
   31810           0 :         object->in.sequence_num = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sequence_num);
   31811           0 :         if (object->in.sequence_num == NULL) {
   31812           0 :                 PyErr_NoMemory();
   31813           0 :                 return -1;
   31814             :         }
   31815             :         {
   31816           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.sequence_num));
   31817           0 :                 if (PyLong_Check(value)) {
   31818             :                         unsigned long long test_var;
   31819           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   31820           0 :                         if (PyErr_Occurred() != NULL) {
   31821           0 :                                 return -1;
   31822             :                         }
   31823           0 :                         if (test_var > uint_max) {
   31824           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   31825             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31826           0 :                                 return -1;
   31827             :                         }
   31828           0 :                         *object->in.sequence_num = test_var;
   31829             :                 } else {
   31830           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   31831             :                           PyLong_Type.tp_name);
   31832           0 :                         return -1;
   31833             :                 }
   31834             :         }
   31835           0 :         return 0;
   31836             : }
   31837             : 
   31838           0 : static PyObject *py_netr_DatabaseDeltas_out_get_sequence_num(PyObject *obj, void *closure)
   31839             : {
   31840           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(obj);
   31841             :         PyObject *py_sequence_num;
   31842           0 :         if (object->out.sequence_num == NULL) {
   31843           0 :                 Py_RETURN_NONE;
   31844             :         }
   31845           0 :         py_sequence_num = PyLong_FromUnsignedLongLong(*object->out.sequence_num);
   31846           0 :         return py_sequence_num;
   31847             : }
   31848             : 
   31849           0 : static int py_netr_DatabaseDeltas_out_set_sequence_num(PyObject *py_obj, PyObject *value, void *closure)
   31850             : {
   31851           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   31852           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.sequence_num));
   31853           0 :         if (value == NULL) {
   31854           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.sequence_num");
   31855           0 :                 return -1;
   31856             :         }
   31857           0 :         object->out.sequence_num = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sequence_num);
   31858           0 :         if (object->out.sequence_num == NULL) {
   31859           0 :                 PyErr_NoMemory();
   31860           0 :                 return -1;
   31861             :         }
   31862             :         {
   31863           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.sequence_num));
   31864           0 :                 if (PyLong_Check(value)) {
   31865             :                         unsigned long long test_var;
   31866           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   31867           0 :                         if (PyErr_Occurred() != NULL) {
   31868           0 :                                 return -1;
   31869             :                         }
   31870           0 :                         if (test_var > uint_max) {
   31871           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   31872             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31873           0 :                                 return -1;
   31874             :                         }
   31875           0 :                         *object->out.sequence_num = test_var;
   31876             :                 } else {
   31877           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   31878             :                           PyLong_Type.tp_name);
   31879           0 :                         return -1;
   31880             :                 }
   31881             :         }
   31882           0 :         return 0;
   31883             : }
   31884             : 
   31885           0 : static PyObject *py_netr_DatabaseDeltas_out_get_delta_enum_array(PyObject *obj, void *closure)
   31886             : {
   31887           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(obj);
   31888             :         PyObject *py_delta_enum_array;
   31889           0 :         if (object->out.delta_enum_array == NULL) {
   31890           0 :                 Py_RETURN_NONE;
   31891             :         }
   31892           0 :         if (*object->out.delta_enum_array == NULL) {
   31893           0 :                 py_delta_enum_array = Py_None;
   31894           0 :                 Py_INCREF(py_delta_enum_array);
   31895             :         } else {
   31896           0 :                 py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *object->out.delta_enum_array, *object->out.delta_enum_array);
   31897             :         }
   31898           0 :         return py_delta_enum_array;
   31899             : }
   31900             : 
   31901           0 : static int py_netr_DatabaseDeltas_out_set_delta_enum_array(PyObject *py_obj, PyObject *value, void *closure)
   31902             : {
   31903           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   31904           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.delta_enum_array));
   31905           0 :         if (value == NULL) {
   31906           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.delta_enum_array");
   31907           0 :                 return -1;
   31908             :         }
   31909           0 :         object->out.delta_enum_array = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.delta_enum_array);
   31910           0 :         if (object->out.delta_enum_array == NULL) {
   31911           0 :                 PyErr_NoMemory();
   31912           0 :                 return -1;
   31913             :         }
   31914           0 :         if (value == Py_None) {
   31915           0 :                 *object->out.delta_enum_array = NULL;
   31916             :         } else {
   31917           0 :                 *object->out.delta_enum_array = NULL;
   31918           0 :                 PY_CHECK_TYPE(&netr_DELTA_ENUM_ARRAY_Type, value, return -1;);
   31919           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   31920           0 :                         PyErr_NoMemory();
   31921           0 :                         return -1;
   31922             :                 }
   31923           0 :                 *object->out.delta_enum_array = (struct netr_DELTA_ENUM_ARRAY *)pytalloc_get_ptr(value);
   31924             :         }
   31925           0 :         return 0;
   31926             : }
   31927             : 
   31928           0 : static PyObject *py_netr_DatabaseDeltas_in_get_preferredmaximumlength(PyObject *obj, void *closure)
   31929             : {
   31930           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(obj);
   31931             :         PyObject *py_preferredmaximumlength;
   31932           0 :         py_preferredmaximumlength = PyLong_FromUnsignedLongLong((uint32_t)object->in.preferredmaximumlength);
   31933           0 :         return py_preferredmaximumlength;
   31934             : }
   31935             : 
   31936           0 : static int py_netr_DatabaseDeltas_in_set_preferredmaximumlength(PyObject *py_obj, PyObject *value, void *closure)
   31937             : {
   31938           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   31939           0 :         if (value == NULL) {
   31940           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.preferredmaximumlength");
   31941           0 :                 return -1;
   31942             :         }
   31943             :         {
   31944           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.preferredmaximumlength));
   31945           0 :                 if (PyLong_Check(value)) {
   31946             :                         unsigned long long test_var;
   31947           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   31948           0 :                         if (PyErr_Occurred() != NULL) {
   31949           0 :                                 return -1;
   31950             :                         }
   31951           0 :                         if (test_var > uint_max) {
   31952           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   31953             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31954           0 :                                 return -1;
   31955             :                         }
   31956           0 :                         object->in.preferredmaximumlength = test_var;
   31957             :                 } else {
   31958           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   31959             :                           PyLong_Type.tp_name);
   31960           0 :                         return -1;
   31961             :                 }
   31962             :         }
   31963           0 :         return 0;
   31964             : }
   31965             : 
   31966           0 : static PyObject *py_netr_DatabaseDeltas_get_result(PyObject *obj, void *closure)
   31967             : {
   31968           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(obj);
   31969             :         PyObject *py_result;
   31970           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   31971           0 :         return py_result;
   31972             : }
   31973             : 
   31974           0 : static int py_netr_DatabaseDeltas_set_result(PyObject *py_obj, PyObject *value, void *closure)
   31975             : {
   31976           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   31977           0 :         if (value == NULL) {
   31978           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   31979           0 :                 return -1;
   31980             :         }
   31981           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   31982           0 :         return 0;
   31983             : }
   31984             : 
   31985             : static PyGetSetDef py_netr_DatabaseDeltas_getsetters[] = {
   31986             :         {
   31987             :                 .name = discard_const_p(char, "in_logon_server"),
   31988             :                 .get = py_netr_DatabaseDeltas_in_get_logon_server,
   31989             :                 .set = py_netr_DatabaseDeltas_in_set_logon_server,
   31990             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   31991             :         },
   31992             :         {
   31993             :                 .name = discard_const_p(char, "in_computername"),
   31994             :                 .get = py_netr_DatabaseDeltas_in_get_computername,
   31995             :                 .set = py_netr_DatabaseDeltas_in_set_computername,
   31996             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   31997             :         },
   31998             :         {
   31999             :                 .name = discard_const_p(char, "in_credential"),
   32000             :                 .get = py_netr_DatabaseDeltas_in_get_credential,
   32001             :                 .set = py_netr_DatabaseDeltas_in_set_credential,
   32002             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   32003             :         },
   32004             :         {
   32005             :                 .name = discard_const_p(char, "in_return_authenticator"),
   32006             :                 .get = py_netr_DatabaseDeltas_in_get_return_authenticator,
   32007             :                 .set = py_netr_DatabaseDeltas_in_set_return_authenticator,
   32008             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   32009             :         },
   32010             :         {
   32011             :                 .name = discard_const_p(char, "out_return_authenticator"),
   32012             :                 .get = py_netr_DatabaseDeltas_out_get_return_authenticator,
   32013             :                 .set = py_netr_DatabaseDeltas_out_set_return_authenticator,
   32014             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   32015             :         },
   32016             :         {
   32017             :                 .name = discard_const_p(char, "in_database_id"),
   32018             :                 .get = py_netr_DatabaseDeltas_in_get_database_id,
   32019             :                 .set = py_netr_DatabaseDeltas_in_set_database_id,
   32020             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SamDatabaseID")
   32021             :         },
   32022             :         {
   32023             :                 .name = discard_const_p(char, "in_sequence_num"),
   32024             :                 .get = py_netr_DatabaseDeltas_in_get_sequence_num,
   32025             :                 .set = py_netr_DatabaseDeltas_in_set_sequence_num,
   32026             :                 .doc = discard_const_p(char, "PIDL-generated element of base type udlong")
   32027             :         },
   32028             :         {
   32029             :                 .name = discard_const_p(char, "out_sequence_num"),
   32030             :                 .get = py_netr_DatabaseDeltas_out_get_sequence_num,
   32031             :                 .set = py_netr_DatabaseDeltas_out_set_sequence_num,
   32032             :                 .doc = discard_const_p(char, "PIDL-generated element of base type udlong")
   32033             :         },
   32034             :         {
   32035             :                 .name = discard_const_p(char, "out_delta_enum_array"),
   32036             :                 .get = py_netr_DatabaseDeltas_out_get_delta_enum_array,
   32037             :                 .set = py_netr_DatabaseDeltas_out_set_delta_enum_array,
   32038             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_ENUM_ARRAY")
   32039             :         },
   32040             :         {
   32041             :                 .name = discard_const_p(char, "in_preferredmaximumlength"),
   32042             :                 .get = py_netr_DatabaseDeltas_in_get_preferredmaximumlength,
   32043             :                 .set = py_netr_DatabaseDeltas_in_set_preferredmaximumlength,
   32044             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   32045             :         },
   32046             :         {
   32047             :                 .name = discard_const_p(char, "result"),
   32048             :                 .get = py_netr_DatabaseDeltas_get_result,
   32049             :                 .set = py_netr_DatabaseDeltas_set_result,
   32050             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   32051             :         },
   32052             :         { .name = NULL }
   32053             : };
   32054             : 
   32055           0 : static PyObject *py_netr_DatabaseDeltas_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   32056             : {
   32057           0 :         PyObject *self = pytalloc_new(struct netr_DatabaseDeltas, type);
   32058           0 :         struct netr_DatabaseDeltas *_self = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(self);
   32059           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   32060           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   32061           0 :         _self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   32062           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   32063           0 :         _self->in.sequence_num = talloc_zero(mem_ctx, uint64_t);
   32064           0 :         _self->out.sequence_num = talloc_zero(mem_ctx, uint64_t);
   32065             :         /* a pointer to a NULL pointer */
   32066           0 :         _self->out.delta_enum_array = talloc_zero(mem_ctx, struct netr_DELTA_ENUM_ARRAY *);
   32067           0 :         return self;
   32068             : }
   32069             : 
   32070           0 : static PyObject *py_netr_DatabaseDeltas_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   32071             : {
   32072             : 
   32073             : 
   32074           0 :         return PyLong_FromLong(7);
   32075             : }
   32076             : 
   32077           0 : static PyObject *py_netr_DatabaseDeltas_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   32078             : {
   32079           0 :         const struct ndr_interface_call *call = NULL;
   32080           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   32081           0 :         PyObject *ret = NULL;
   32082           0 :         struct ndr_push *push = NULL;
   32083             :         DATA_BLOB blob;
   32084             :         enum ndr_err_code err;
   32085             : 
   32086           0 :         if (ndr_table_netlogon.num_calls < 8) {
   32087           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseDeltas_ndr_pack");
   32088           0 :                 return NULL;
   32089             :         }
   32090           0 :         call = &ndr_table_netlogon.calls[7];
   32091             : 
   32092           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   32093           0 :         if (push == NULL) {
   32094           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   32095           0 :                 return NULL;
   32096             :         }
   32097             : 
   32098           0 :         push->flags |= ndr_push_flags;
   32099             : 
   32100           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   32101           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   32102           0 :                 TALLOC_FREE(push);
   32103           0 :                 PyErr_SetNdrError(err);
   32104           0 :                 return NULL;
   32105             :         }
   32106           0 :         blob = ndr_push_blob(push);
   32107           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   32108           0 :         TALLOC_FREE(push);
   32109           0 :         return ret;
   32110             : }
   32111             : 
   32112           0 : static PyObject *py_netr_DatabaseDeltas_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   32113             : {
   32114           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   32115           0 :         PyObject *bigendian_obj = NULL;
   32116           0 :         PyObject *ndr64_obj = NULL;
   32117           0 :         uint32_t ndr_push_flags = 0;
   32118             : 
   32119           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   32120             :                 discard_const_p(char *, kwnames),
   32121             :                 &bigendian_obj,
   32122             :                 &ndr64_obj)) {
   32123           0 :                 return NULL;
   32124             :         }
   32125             : 
   32126           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   32127           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   32128             :         }
   32129           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   32130           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   32131             :         }
   32132             : 
   32133           0 :         return py_netr_DatabaseDeltas_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   32134             : }
   32135             : 
   32136           0 : static PyObject *py_netr_DatabaseDeltas_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   32137             : {
   32138           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   32139           0 :         PyObject *bigendian_obj = NULL;
   32140           0 :         PyObject *ndr64_obj = NULL;
   32141           0 :         uint32_t ndr_push_flags = 0;
   32142             : 
   32143           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   32144             :                 discard_const_p(char *, kwnames),
   32145             :                 &bigendian_obj,
   32146             :                 &ndr64_obj)) {
   32147           0 :                 return NULL;
   32148             :         }
   32149             : 
   32150           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   32151           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   32152             :         }
   32153           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   32154           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   32155             :         }
   32156             : 
   32157           0 :         return py_netr_DatabaseDeltas_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   32158             : }
   32159             : 
   32160           0 : static PyObject *py_netr_DatabaseDeltas_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   32161             : {
   32162           0 :         const struct ndr_interface_call *call = NULL;
   32163           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   32164           0 :         struct ndr_pull *pull = NULL;
   32165             :         enum ndr_err_code err;
   32166             : 
   32167           0 :         if (ndr_table_netlogon.num_calls < 8) {
   32168           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseDeltas_ndr_unpack");
   32169           0 :                 return NULL;
   32170             :         }
   32171           0 :         call = &ndr_table_netlogon.calls[7];
   32172             : 
   32173           0 :         pull = ndr_pull_init_blob(blob, object);
   32174           0 :         if (pull == NULL) {
   32175           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   32176           0 :                 return NULL;
   32177             :         }
   32178             : 
   32179           0 :         pull->flags |= ndr_pull_flags;
   32180             : 
   32181           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   32182           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   32183           0 :                 TALLOC_FREE(pull);
   32184           0 :                 PyErr_SetNdrError(err);
   32185           0 :                 return NULL;
   32186             :         }
   32187           0 :         if (!allow_remaining) {
   32188             :                 uint32_t highest_ofs;
   32189             : 
   32190           0 :                 if (pull->offset > pull->relative_highest_offset) {
   32191           0 :                         highest_ofs = pull->offset;
   32192             :                 } else {
   32193           0 :                         highest_ofs = pull->relative_highest_offset;
   32194             :                 }
   32195           0 :                 if (highest_ofs < pull->data_size) {
   32196           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   32197             :                                 "not all bytes consumed ofs[%u] size[%u]",
   32198             :                                 highest_ofs, pull->data_size);
   32199           0 :                         TALLOC_FREE(pull);
   32200           0 :                         PyErr_SetNdrError(err);
   32201           0 :                         return NULL;
   32202             :                 }
   32203             :         }
   32204             : 
   32205           0 :         TALLOC_FREE(pull);
   32206           0 :         Py_RETURN_NONE;
   32207             : }
   32208             : 
   32209           0 : static PyObject *py_netr_DatabaseDeltas_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   32210             : {
   32211             :         DATA_BLOB blob;
   32212           0 :         Py_ssize_t blob_length = 0;
   32213           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   32214           0 :         PyObject *bigendian_obj = NULL;
   32215           0 :         PyObject *ndr64_obj = NULL;
   32216           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   32217           0 :         PyObject *allow_remaining_obj = NULL;
   32218           0 :         bool allow_remaining = false;
   32219             : 
   32220           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   32221             :                 discard_const_p(char *, kwnames),
   32222             :                 &blob.data, &blob_length,
   32223             :                 &bigendian_obj,
   32224             :                 &ndr64_obj,
   32225             :                 &allow_remaining_obj)) {
   32226           0 :                 return NULL;
   32227             :         }
   32228           0 :         blob.length = blob_length;
   32229             : 
   32230           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   32231           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   32232             :         }
   32233           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   32234           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   32235             :         }
   32236             : 
   32237           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   32238           0 :                 allow_remaining = true;
   32239             :         }
   32240             : 
   32241           0 :         return py_netr_DatabaseDeltas_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   32242             : }
   32243             : 
   32244           0 : static PyObject *py_netr_DatabaseDeltas_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   32245             : {
   32246             :         DATA_BLOB blob;
   32247           0 :         Py_ssize_t blob_length = 0;
   32248           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   32249           0 :         PyObject *bigendian_obj = NULL;
   32250           0 :         PyObject *ndr64_obj = NULL;
   32251           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   32252           0 :         PyObject *allow_remaining_obj = NULL;
   32253           0 :         bool allow_remaining = false;
   32254             : 
   32255           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   32256             :                 discard_const_p(char *, kwnames),
   32257             :                 &blob.data, &blob_length,
   32258             :                 &bigendian_obj,
   32259             :                 &ndr64_obj,
   32260             :                 &allow_remaining_obj)) {
   32261           0 :                 return NULL;
   32262             :         }
   32263           0 :         blob.length = blob_length;
   32264             : 
   32265           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   32266           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   32267             :         }
   32268           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   32269           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   32270             :         }
   32271             : 
   32272           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   32273           0 :                 allow_remaining = true;
   32274             :         }
   32275             : 
   32276           0 :         return py_netr_DatabaseDeltas_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   32277             : }
   32278             : 
   32279           0 : static PyObject *py_netr_DatabaseDeltas_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   32280             : {
   32281           0 :         const struct ndr_interface_call *call = NULL;
   32282           0 :         struct netr_DatabaseDeltas *object = (struct netr_DatabaseDeltas *)pytalloc_get_ptr(py_obj);
   32283             :         PyObject *ret;
   32284             :         char *retstr;
   32285             : 
   32286           0 :         if (ndr_table_netlogon.num_calls < 8) {
   32287           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseDeltas_ndr_print");
   32288           0 :                 return NULL;
   32289             :         }
   32290           0 :         call = &ndr_table_netlogon.calls[7];
   32291             : 
   32292           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   32293           0 :         ret = PyUnicode_FromString(retstr);
   32294           0 :         TALLOC_FREE(retstr);
   32295             : 
   32296           0 :         return ret;
   32297             : }
   32298             : 
   32299           0 : static PyObject *py_netr_DatabaseDeltas_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   32300             : {
   32301           0 :         return py_netr_DatabaseDeltas_ndr_print(py_obj, "netr_DatabaseDeltas_in", NDR_IN);
   32302             : }
   32303             : 
   32304           0 : static PyObject *py_netr_DatabaseDeltas_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   32305             : {
   32306           0 :         return py_netr_DatabaseDeltas_ndr_print(py_obj, "netr_DatabaseDeltas_out", NDR_OUT);
   32307             : }
   32308             : 
   32309             : static PyMethodDef py_netr_DatabaseDeltas_methods[] = {
   32310             :         { "opnum", (PyCFunction)py_netr_DatabaseDeltas_ndr_opnum, METH_NOARGS|METH_CLASS,
   32311             :                 "netlogon.netr_DatabaseDeltas.opnum() -> 7 (0x07) " },
   32312             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseDeltas_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   32313             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   32314             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseDeltas_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   32315             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   32316             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseDeltas_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   32317             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   32318             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseDeltas_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   32319             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   32320             :         { "__ndr_print_in__", (PyCFunction)py_netr_DatabaseDeltas_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   32321             :         { "__ndr_print_out__", (PyCFunction)py_netr_DatabaseDeltas_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   32322             :         { NULL, NULL, 0, NULL }
   32323             : };
   32324             : 
   32325             : 
   32326             : static PyTypeObject netr_DatabaseDeltas_Type = {
   32327             :         PyVarObject_HEAD_INIT(NULL, 0)
   32328             :         .tp_name = "netlogon.netr_DatabaseDeltas",
   32329             :         .tp_getset = py_netr_DatabaseDeltas_getsetters,
   32330             :         .tp_methods = py_netr_DatabaseDeltas_methods,
   32331             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   32332             :         .tp_new = py_netr_DatabaseDeltas_new,
   32333             : };
   32334             : 
   32335           0 : static bool pack_py_netr_DatabaseDeltas_args_in(PyObject *args, PyObject *kwargs, struct netr_DatabaseDeltas *r)
   32336             : {
   32337             :         PyObject *py_logon_server;
   32338             :         PyObject *py_computername;
   32339             :         PyObject *py_credential;
   32340             :         PyObject *py_return_authenticator;
   32341             :         PyObject *py_database_id;
   32342             :         PyObject *py_sequence_num;
   32343             :         PyObject *py_preferredmaximumlength;
   32344           0 :         const char *kwnames[] = {
   32345             :                 "logon_server", "computername", "credential", "return_authenticator", "database_id", "sequence_num", "preferredmaximumlength", NULL
   32346             :         };
   32347             : 
   32348           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)) {
   32349           0 :                 return false;
   32350             :         }
   32351             : 
   32352           0 :         if (py_logon_server == NULL) {
   32353           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_server");
   32354           0 :                 return false;
   32355             :         }
   32356           0 :         r->in.logon_server = talloc_ptrtype(r, r->in.logon_server);
   32357           0 :         if (r->in.logon_server == NULL) {
   32358           0 :                 PyErr_NoMemory();
   32359           0 :                 return false;
   32360             :         }
   32361             :         {
   32362             :                 const char *test_str;
   32363             :                 const char *talloc_str;
   32364           0 :                 PyObject *unicode = NULL;
   32365           0 :                 if (PyUnicode_Check(py_logon_server)) {
   32366           0 :                         unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   32367           0 :                         if (unicode == NULL) {
   32368           0 :                                 PyErr_NoMemory();
   32369           0 :                                 return false;
   32370             :                         }
   32371           0 :                         test_str = PyBytes_AS_STRING(unicode);
   32372           0 :                 } else if (PyBytes_Check(py_logon_server)) {
   32373           0 :                         test_str = PyBytes_AS_STRING(py_logon_server);
   32374             :                 } else {
   32375           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   32376           0 :                         return false;
   32377             :                 }
   32378           0 :                 talloc_str = talloc_strdup(r, test_str);
   32379           0 :                 if (unicode != NULL) {
   32380           0 :                         Py_DECREF(unicode);
   32381             :                 }
   32382           0 :                 if (talloc_str == NULL) {
   32383           0 :                         PyErr_NoMemory();
   32384           0 :                         return false;
   32385             :                 }
   32386           0 :                 r->in.logon_server = talloc_str;
   32387             :         }
   32388           0 :         if (py_computername == NULL) {
   32389           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computername");
   32390           0 :                 return false;
   32391             :         }
   32392           0 :         r->in.computername = talloc_ptrtype(r, r->in.computername);
   32393           0 :         if (r->in.computername == NULL) {
   32394           0 :                 PyErr_NoMemory();
   32395           0 :                 return false;
   32396             :         }
   32397             :         {
   32398             :                 const char *test_str;
   32399             :                 const char *talloc_str;
   32400           0 :                 PyObject *unicode = NULL;
   32401           0 :                 if (PyUnicode_Check(py_computername)) {
   32402           0 :                         unicode = PyUnicode_AsEncodedString(py_computername, "utf-8", "ignore");
   32403           0 :                         if (unicode == NULL) {
   32404           0 :                                 PyErr_NoMemory();
   32405           0 :                                 return false;
   32406             :                         }
   32407           0 :                         test_str = PyBytes_AS_STRING(unicode);
   32408           0 :                 } else if (PyBytes_Check(py_computername)) {
   32409           0 :                         test_str = PyBytes_AS_STRING(py_computername);
   32410             :                 } else {
   32411           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computername)->tp_name);
   32412           0 :                         return false;
   32413             :                 }
   32414           0 :                 talloc_str = talloc_strdup(r, test_str);
   32415           0 :                 if (unicode != NULL) {
   32416           0 :                         Py_DECREF(unicode);
   32417             :                 }
   32418           0 :                 if (talloc_str == NULL) {
   32419           0 :                         PyErr_NoMemory();
   32420           0 :                         return false;
   32421             :                 }
   32422           0 :                 r->in.computername = talloc_str;
   32423             :         }
   32424           0 :         if (py_credential == NULL) {
   32425           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   32426           0 :                 return false;
   32427             :         }
   32428           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   32429           0 :         if (r->in.credential == NULL) {
   32430           0 :                 PyErr_NoMemory();
   32431           0 :                 return false;
   32432             :         }
   32433           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   32434           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   32435           0 :                 PyErr_NoMemory();
   32436           0 :                 return false;
   32437             :         }
   32438           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   32439           0 :         if (py_return_authenticator == NULL) {
   32440           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.return_authenticator");
   32441           0 :                 return false;
   32442             :         }
   32443           0 :         r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
   32444           0 :         if (r->in.return_authenticator == NULL) {
   32445           0 :                 PyErr_NoMemory();
   32446           0 :                 return false;
   32447             :         }
   32448           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   32449           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   32450           0 :                 PyErr_NoMemory();
   32451           0 :                 return false;
   32452             :         }
   32453           0 :         r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   32454           0 :         if (py_database_id == NULL) {
   32455           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.database_id");
   32456           0 :                 return false;
   32457             :         }
   32458             :         {
   32459           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.database_id));
   32460           0 :                 if (PyLong_Check(py_database_id)) {
   32461             :                         unsigned long long test_var;
   32462           0 :                         test_var = PyLong_AsUnsignedLongLong(py_database_id);
   32463           0 :                         if (PyErr_Occurred() != NULL) {
   32464           0 :                                 return false;
   32465             :                         }
   32466           0 :                         if (test_var > uint_max) {
   32467           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   32468             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32469           0 :                                 return false;
   32470             :                         }
   32471           0 :                         r->in.database_id = test_var;
   32472             :                 } else {
   32473           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   32474             :                           PyLong_Type.tp_name);
   32475           0 :                         return false;
   32476             :                 }
   32477             :         }
   32478           0 :         if (py_sequence_num == NULL) {
   32479           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.sequence_num");
   32480           0 :                 return false;
   32481             :         }
   32482           0 :         r->in.sequence_num = talloc_ptrtype(r, r->in.sequence_num);
   32483           0 :         if (r->in.sequence_num == NULL) {
   32484           0 :                 PyErr_NoMemory();
   32485           0 :                 return false;
   32486             :         }
   32487             :         {
   32488           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.sequence_num));
   32489           0 :                 if (PyLong_Check(py_sequence_num)) {
   32490             :                         unsigned long long test_var;
   32491           0 :                         test_var = PyLong_AsUnsignedLongLong(py_sequence_num);
   32492           0 :                         if (PyErr_Occurred() != NULL) {
   32493           0 :                                 return false;
   32494             :                         }
   32495           0 :                         if (test_var > uint_max) {
   32496           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   32497             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32498           0 :                                 return false;
   32499             :                         }
   32500           0 :                         *r->in.sequence_num = test_var;
   32501             :                 } else {
   32502           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   32503             :                           PyLong_Type.tp_name);
   32504           0 :                         return false;
   32505             :                 }
   32506             :         }
   32507           0 :         if (py_preferredmaximumlength == NULL) {
   32508           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.preferredmaximumlength");
   32509           0 :                 return false;
   32510             :         }
   32511             :         {
   32512           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.preferredmaximumlength));
   32513           0 :                 if (PyLong_Check(py_preferredmaximumlength)) {
   32514             :                         unsigned long long test_var;
   32515           0 :                         test_var = PyLong_AsUnsignedLongLong(py_preferredmaximumlength);
   32516           0 :                         if (PyErr_Occurred() != NULL) {
   32517           0 :                                 return false;
   32518             :                         }
   32519           0 :                         if (test_var > uint_max) {
   32520           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   32521             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32522           0 :                                 return false;
   32523             :                         }
   32524           0 :                         r->in.preferredmaximumlength = test_var;
   32525             :                 } else {
   32526           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   32527             :                           PyLong_Type.tp_name);
   32528           0 :                         return false;
   32529             :                 }
   32530             :         }
   32531           0 :         return true;
   32532             : }
   32533             : 
   32534           0 : static PyObject *unpack_py_netr_DatabaseDeltas_args_out(struct netr_DatabaseDeltas *r)
   32535             : {
   32536             :         PyObject *result;
   32537             :         PyObject *py_return_authenticator;
   32538             :         PyObject *py_sequence_num;
   32539             :         PyObject *py_delta_enum_array;
   32540           0 :         result = PyTuple_New(3);
   32541           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   32542           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   32543           0 :         py_sequence_num = PyLong_FromUnsignedLongLong(*r->out.sequence_num);
   32544           0 :         PyTuple_SetItem(result, 1, py_sequence_num);
   32545           0 :         if (*r->out.delta_enum_array == NULL) {
   32546           0 :                 py_delta_enum_array = Py_None;
   32547           0 :                 Py_INCREF(py_delta_enum_array);
   32548             :         } else {
   32549           0 :                 py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *r->out.delta_enum_array, *r->out.delta_enum_array);
   32550             :         }
   32551           0 :         PyTuple_SetItem(result, 2, py_delta_enum_array);
   32552           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   32553           0 :                 PyErr_SetNTSTATUS(r->out.result);
   32554           0 :                 return NULL;
   32555             :         }
   32556             : 
   32557           0 :         return result;
   32558             : }
   32559             : 
   32560             : 
   32561           0 : static PyObject *py_netr_DatabaseSync_in_get_logon_server(PyObject *obj, void *closure)
   32562             : {
   32563           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(obj);
   32564             :         PyObject *py_logon_server;
   32565           0 :         if (object->in.logon_server == NULL) {
   32566           0 :                 Py_RETURN_NONE;
   32567             :         }
   32568           0 :         if (object->in.logon_server == NULL) {
   32569           0 :                 py_logon_server = Py_None;
   32570           0 :                 Py_INCREF(py_logon_server);
   32571             :         } else {
   32572           0 :                 py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   32573             :         }
   32574           0 :         return py_logon_server;
   32575             : }
   32576             : 
   32577           0 : static int py_netr_DatabaseSync_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   32578             : {
   32579           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   32580           0 :         if (value == NULL) {
   32581           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_server");
   32582           0 :                 return -1;
   32583             :         }
   32584           0 :         object->in.logon_server = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon_server);
   32585           0 :         if (object->in.logon_server == NULL) {
   32586           0 :                 PyErr_NoMemory();
   32587           0 :                 return -1;
   32588             :         }
   32589             :         {
   32590             :                 const char *test_str;
   32591             :                 const char *talloc_str;
   32592           0 :                 PyObject *unicode = NULL;
   32593           0 :                 if (PyUnicode_Check(value)) {
   32594           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   32595           0 :                         if (unicode == NULL) {
   32596           0 :                                 PyErr_NoMemory();
   32597           0 :                                 return -1;
   32598             :                         }
   32599           0 :                         test_str = PyBytes_AS_STRING(unicode);
   32600           0 :                 } else if (PyBytes_Check(value)) {
   32601           0 :                         test_str = PyBytes_AS_STRING(value);
   32602             :                 } else {
   32603           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   32604           0 :                         return -1;
   32605             :                 }
   32606           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   32607           0 :                 if (unicode != NULL) {
   32608           0 :                         Py_DECREF(unicode);
   32609             :                 }
   32610           0 :                 if (talloc_str == NULL) {
   32611           0 :                         PyErr_NoMemory();
   32612           0 :                         return -1;
   32613             :                 }
   32614           0 :                 object->in.logon_server = talloc_str;
   32615             :         }
   32616           0 :         return 0;
   32617             : }
   32618             : 
   32619           0 : static PyObject *py_netr_DatabaseSync_in_get_computername(PyObject *obj, void *closure)
   32620             : {
   32621           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(obj);
   32622             :         PyObject *py_computername;
   32623           0 :         if (object->in.computername == NULL) {
   32624           0 :                 Py_RETURN_NONE;
   32625             :         }
   32626           0 :         if (object->in.computername == NULL) {
   32627           0 :                 py_computername = Py_None;
   32628           0 :                 Py_INCREF(py_computername);
   32629             :         } else {
   32630           0 :                 py_computername = PyUnicode_Decode(object->in.computername, strlen(object->in.computername), "utf-8", "ignore");
   32631             :         }
   32632           0 :         return py_computername;
   32633             : }
   32634             : 
   32635           0 : static int py_netr_DatabaseSync_in_set_computername(PyObject *py_obj, PyObject *value, void *closure)
   32636             : {
   32637           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   32638           0 :         if (value == NULL) {
   32639           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computername");
   32640           0 :                 return -1;
   32641             :         }
   32642           0 :         object->in.computername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computername);
   32643           0 :         if (object->in.computername == NULL) {
   32644           0 :                 PyErr_NoMemory();
   32645           0 :                 return -1;
   32646             :         }
   32647             :         {
   32648             :                 const char *test_str;
   32649             :                 const char *talloc_str;
   32650           0 :                 PyObject *unicode = NULL;
   32651           0 :                 if (PyUnicode_Check(value)) {
   32652           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   32653           0 :                         if (unicode == NULL) {
   32654           0 :                                 PyErr_NoMemory();
   32655           0 :                                 return -1;
   32656             :                         }
   32657           0 :                         test_str = PyBytes_AS_STRING(unicode);
   32658           0 :                 } else if (PyBytes_Check(value)) {
   32659           0 :                         test_str = PyBytes_AS_STRING(value);
   32660             :                 } else {
   32661           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   32662           0 :                         return -1;
   32663             :                 }
   32664           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   32665           0 :                 if (unicode != NULL) {
   32666           0 :                         Py_DECREF(unicode);
   32667             :                 }
   32668           0 :                 if (talloc_str == NULL) {
   32669           0 :                         PyErr_NoMemory();
   32670           0 :                         return -1;
   32671             :                 }
   32672           0 :                 object->in.computername = talloc_str;
   32673             :         }
   32674           0 :         return 0;
   32675             : }
   32676             : 
   32677           0 : static PyObject *py_netr_DatabaseSync_in_get_credential(PyObject *obj, void *closure)
   32678             : {
   32679           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(obj);
   32680             :         PyObject *py_credential;
   32681           0 :         if (object->in.credential == NULL) {
   32682           0 :                 Py_RETURN_NONE;
   32683             :         }
   32684           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   32685           0 :         return py_credential;
   32686             : }
   32687             : 
   32688           0 : static int py_netr_DatabaseSync_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   32689             : {
   32690           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   32691           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   32692           0 :         if (value == NULL) {
   32693           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   32694           0 :                 return -1;
   32695             :         }
   32696           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   32697           0 :         if (object->in.credential == NULL) {
   32698           0 :                 PyErr_NoMemory();
   32699           0 :                 return -1;
   32700             :         }
   32701           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   32702           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   32703           0 :                 PyErr_NoMemory();
   32704           0 :                 return -1;
   32705             :         }
   32706           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   32707           0 :         return 0;
   32708             : }
   32709             : 
   32710           0 : static PyObject *py_netr_DatabaseSync_in_get_return_authenticator(PyObject *obj, void *closure)
   32711             : {
   32712           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(obj);
   32713             :         PyObject *py_return_authenticator;
   32714           0 :         if (object->in.return_authenticator == NULL) {
   32715           0 :                 Py_RETURN_NONE;
   32716             :         }
   32717           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   32718           0 :         return py_return_authenticator;
   32719             : }
   32720             : 
   32721           0 : static int py_netr_DatabaseSync_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   32722             : {
   32723           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   32724           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   32725           0 :         if (value == NULL) {
   32726           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.return_authenticator");
   32727           0 :                 return -1;
   32728             :         }
   32729           0 :         object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
   32730           0 :         if (object->in.return_authenticator == NULL) {
   32731           0 :                 PyErr_NoMemory();
   32732           0 :                 return -1;
   32733             :         }
   32734           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   32735           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   32736           0 :                 PyErr_NoMemory();
   32737           0 :                 return -1;
   32738             :         }
   32739           0 :         object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   32740           0 :         return 0;
   32741             : }
   32742             : 
   32743           0 : static PyObject *py_netr_DatabaseSync_out_get_return_authenticator(PyObject *obj, void *closure)
   32744             : {
   32745           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(obj);
   32746             :         PyObject *py_return_authenticator;
   32747           0 :         if (object->out.return_authenticator == NULL) {
   32748           0 :                 Py_RETURN_NONE;
   32749             :         }
   32750           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   32751           0 :         return py_return_authenticator;
   32752             : }
   32753             : 
   32754           0 : static int py_netr_DatabaseSync_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   32755             : {
   32756           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   32757           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   32758           0 :         if (value == NULL) {
   32759           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   32760           0 :                 return -1;
   32761             :         }
   32762           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   32763           0 :         if (object->out.return_authenticator == NULL) {
   32764           0 :                 PyErr_NoMemory();
   32765           0 :                 return -1;
   32766             :         }
   32767           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   32768           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   32769           0 :                 PyErr_NoMemory();
   32770           0 :                 return -1;
   32771             :         }
   32772           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   32773           0 :         return 0;
   32774             : }
   32775             : 
   32776           0 : static PyObject *py_netr_DatabaseSync_in_get_database_id(PyObject *obj, void *closure)
   32777             : {
   32778           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(obj);
   32779             :         PyObject *py_database_id;
   32780           0 :         py_database_id = PyLong_FromUnsignedLongLong((uint32_t)object->in.database_id);
   32781           0 :         return py_database_id;
   32782             : }
   32783             : 
   32784           0 : static int py_netr_DatabaseSync_in_set_database_id(PyObject *py_obj, PyObject *value, void *closure)
   32785             : {
   32786           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   32787           0 :         if (value == NULL) {
   32788           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.database_id");
   32789           0 :                 return -1;
   32790             :         }
   32791             :         {
   32792           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.database_id));
   32793           0 :                 if (PyLong_Check(value)) {
   32794             :                         unsigned long long test_var;
   32795           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   32796           0 :                         if (PyErr_Occurred() != NULL) {
   32797           0 :                                 return -1;
   32798             :                         }
   32799           0 :                         if (test_var > uint_max) {
   32800           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   32801             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32802           0 :                                 return -1;
   32803             :                         }
   32804           0 :                         object->in.database_id = test_var;
   32805             :                 } else {
   32806           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   32807             :                           PyLong_Type.tp_name);
   32808           0 :                         return -1;
   32809             :                 }
   32810             :         }
   32811           0 :         return 0;
   32812             : }
   32813             : 
   32814           0 : static PyObject *py_netr_DatabaseSync_in_get_sync_context(PyObject *obj, void *closure)
   32815             : {
   32816           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(obj);
   32817             :         PyObject *py_sync_context;
   32818           0 :         if (object->in.sync_context == NULL) {
   32819           0 :                 Py_RETURN_NONE;
   32820             :         }
   32821           0 :         py_sync_context = PyLong_FromUnsignedLongLong((uint32_t)*object->in.sync_context);
   32822           0 :         return py_sync_context;
   32823             : }
   32824             : 
   32825           0 : static int py_netr_DatabaseSync_in_set_sync_context(PyObject *py_obj, PyObject *value, void *closure)
   32826             : {
   32827           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   32828           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sync_context));
   32829           0 :         if (value == NULL) {
   32830           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.sync_context");
   32831           0 :                 return -1;
   32832             :         }
   32833           0 :         object->in.sync_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sync_context);
   32834           0 :         if (object->in.sync_context == NULL) {
   32835           0 :                 PyErr_NoMemory();
   32836           0 :                 return -1;
   32837             :         }
   32838             :         {
   32839           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.sync_context));
   32840           0 :                 if (PyLong_Check(value)) {
   32841             :                         unsigned long long test_var;
   32842           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   32843           0 :                         if (PyErr_Occurred() != NULL) {
   32844           0 :                                 return -1;
   32845             :                         }
   32846           0 :                         if (test_var > uint_max) {
   32847           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   32848             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32849           0 :                                 return -1;
   32850             :                         }
   32851           0 :                         *object->in.sync_context = test_var;
   32852             :                 } else {
   32853           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   32854             :                           PyLong_Type.tp_name);
   32855           0 :                         return -1;
   32856             :                 }
   32857             :         }
   32858           0 :         return 0;
   32859             : }
   32860             : 
   32861           0 : static PyObject *py_netr_DatabaseSync_out_get_sync_context(PyObject *obj, void *closure)
   32862             : {
   32863           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(obj);
   32864             :         PyObject *py_sync_context;
   32865           0 :         if (object->out.sync_context == NULL) {
   32866           0 :                 Py_RETURN_NONE;
   32867             :         }
   32868           0 :         py_sync_context = PyLong_FromUnsignedLongLong((uint32_t)*object->out.sync_context);
   32869           0 :         return py_sync_context;
   32870             : }
   32871             : 
   32872           0 : static int py_netr_DatabaseSync_out_set_sync_context(PyObject *py_obj, PyObject *value, void *closure)
   32873             : {
   32874           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   32875           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.sync_context));
   32876           0 :         if (value == NULL) {
   32877           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.sync_context");
   32878           0 :                 return -1;
   32879             :         }
   32880           0 :         object->out.sync_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sync_context);
   32881           0 :         if (object->out.sync_context == NULL) {
   32882           0 :                 PyErr_NoMemory();
   32883           0 :                 return -1;
   32884             :         }
   32885             :         {
   32886           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.sync_context));
   32887           0 :                 if (PyLong_Check(value)) {
   32888             :                         unsigned long long test_var;
   32889           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   32890           0 :                         if (PyErr_Occurred() != NULL) {
   32891           0 :                                 return -1;
   32892             :                         }
   32893           0 :                         if (test_var > uint_max) {
   32894           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   32895             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32896           0 :                                 return -1;
   32897             :                         }
   32898           0 :                         *object->out.sync_context = test_var;
   32899             :                 } else {
   32900           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   32901             :                           PyLong_Type.tp_name);
   32902           0 :                         return -1;
   32903             :                 }
   32904             :         }
   32905           0 :         return 0;
   32906             : }
   32907             : 
   32908           0 : static PyObject *py_netr_DatabaseSync_out_get_delta_enum_array(PyObject *obj, void *closure)
   32909             : {
   32910           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(obj);
   32911             :         PyObject *py_delta_enum_array;
   32912           0 :         if (object->out.delta_enum_array == NULL) {
   32913           0 :                 Py_RETURN_NONE;
   32914             :         }
   32915           0 :         if (*object->out.delta_enum_array == NULL) {
   32916           0 :                 py_delta_enum_array = Py_None;
   32917           0 :                 Py_INCREF(py_delta_enum_array);
   32918             :         } else {
   32919           0 :                 py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *object->out.delta_enum_array, *object->out.delta_enum_array);
   32920             :         }
   32921           0 :         return py_delta_enum_array;
   32922             : }
   32923             : 
   32924           0 : static int py_netr_DatabaseSync_out_set_delta_enum_array(PyObject *py_obj, PyObject *value, void *closure)
   32925             : {
   32926           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   32927           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.delta_enum_array));
   32928           0 :         if (value == NULL) {
   32929           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.delta_enum_array");
   32930           0 :                 return -1;
   32931             :         }
   32932           0 :         object->out.delta_enum_array = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.delta_enum_array);
   32933           0 :         if (object->out.delta_enum_array == NULL) {
   32934           0 :                 PyErr_NoMemory();
   32935           0 :                 return -1;
   32936             :         }
   32937           0 :         if (value == Py_None) {
   32938           0 :                 *object->out.delta_enum_array = NULL;
   32939             :         } else {
   32940           0 :                 *object->out.delta_enum_array = NULL;
   32941           0 :                 PY_CHECK_TYPE(&netr_DELTA_ENUM_ARRAY_Type, value, return -1;);
   32942           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   32943           0 :                         PyErr_NoMemory();
   32944           0 :                         return -1;
   32945             :                 }
   32946           0 :                 *object->out.delta_enum_array = (struct netr_DELTA_ENUM_ARRAY *)pytalloc_get_ptr(value);
   32947             :         }
   32948           0 :         return 0;
   32949             : }
   32950             : 
   32951           0 : static PyObject *py_netr_DatabaseSync_in_get_preferredmaximumlength(PyObject *obj, void *closure)
   32952             : {
   32953           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(obj);
   32954             :         PyObject *py_preferredmaximumlength;
   32955           0 :         py_preferredmaximumlength = PyLong_FromUnsignedLongLong((uint32_t)object->in.preferredmaximumlength);
   32956           0 :         return py_preferredmaximumlength;
   32957             : }
   32958             : 
   32959           0 : static int py_netr_DatabaseSync_in_set_preferredmaximumlength(PyObject *py_obj, PyObject *value, void *closure)
   32960             : {
   32961           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   32962           0 :         if (value == NULL) {
   32963           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.preferredmaximumlength");
   32964           0 :                 return -1;
   32965             :         }
   32966             :         {
   32967           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.preferredmaximumlength));
   32968           0 :                 if (PyLong_Check(value)) {
   32969             :                         unsigned long long test_var;
   32970           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   32971           0 :                         if (PyErr_Occurred() != NULL) {
   32972           0 :                                 return -1;
   32973             :                         }
   32974           0 :                         if (test_var > uint_max) {
   32975           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   32976             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32977           0 :                                 return -1;
   32978             :                         }
   32979           0 :                         object->in.preferredmaximumlength = test_var;
   32980             :                 } else {
   32981           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   32982             :                           PyLong_Type.tp_name);
   32983           0 :                         return -1;
   32984             :                 }
   32985             :         }
   32986           0 :         return 0;
   32987             : }
   32988             : 
   32989           0 : static PyObject *py_netr_DatabaseSync_get_result(PyObject *obj, void *closure)
   32990             : {
   32991           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(obj);
   32992             :         PyObject *py_result;
   32993           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   32994           0 :         return py_result;
   32995             : }
   32996             : 
   32997           0 : static int py_netr_DatabaseSync_set_result(PyObject *py_obj, PyObject *value, void *closure)
   32998             : {
   32999           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   33000           0 :         if (value == NULL) {
   33001           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   33002           0 :                 return -1;
   33003             :         }
   33004           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   33005           0 :         return 0;
   33006             : }
   33007             : 
   33008             : static PyGetSetDef py_netr_DatabaseSync_getsetters[] = {
   33009             :         {
   33010             :                 .name = discard_const_p(char, "in_logon_server"),
   33011             :                 .get = py_netr_DatabaseSync_in_get_logon_server,
   33012             :                 .set = py_netr_DatabaseSync_in_set_logon_server,
   33013             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   33014             :         },
   33015             :         {
   33016             :                 .name = discard_const_p(char, "in_computername"),
   33017             :                 .get = py_netr_DatabaseSync_in_get_computername,
   33018             :                 .set = py_netr_DatabaseSync_in_set_computername,
   33019             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   33020             :         },
   33021             :         {
   33022             :                 .name = discard_const_p(char, "in_credential"),
   33023             :                 .get = py_netr_DatabaseSync_in_get_credential,
   33024             :                 .set = py_netr_DatabaseSync_in_set_credential,
   33025             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   33026             :         },
   33027             :         {
   33028             :                 .name = discard_const_p(char, "in_return_authenticator"),
   33029             :                 .get = py_netr_DatabaseSync_in_get_return_authenticator,
   33030             :                 .set = py_netr_DatabaseSync_in_set_return_authenticator,
   33031             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   33032             :         },
   33033             :         {
   33034             :                 .name = discard_const_p(char, "out_return_authenticator"),
   33035             :                 .get = py_netr_DatabaseSync_out_get_return_authenticator,
   33036             :                 .set = py_netr_DatabaseSync_out_set_return_authenticator,
   33037             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   33038             :         },
   33039             :         {
   33040             :                 .name = discard_const_p(char, "in_database_id"),
   33041             :                 .get = py_netr_DatabaseSync_in_get_database_id,
   33042             :                 .set = py_netr_DatabaseSync_in_set_database_id,
   33043             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SamDatabaseID")
   33044             :         },
   33045             :         {
   33046             :                 .name = discard_const_p(char, "in_sync_context"),
   33047             :                 .get = py_netr_DatabaseSync_in_get_sync_context,
   33048             :                 .set = py_netr_DatabaseSync_in_set_sync_context,
   33049             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   33050             :         },
   33051             :         {
   33052             :                 .name = discard_const_p(char, "out_sync_context"),
   33053             :                 .get = py_netr_DatabaseSync_out_get_sync_context,
   33054             :                 .set = py_netr_DatabaseSync_out_set_sync_context,
   33055             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   33056             :         },
   33057             :         {
   33058             :                 .name = discard_const_p(char, "out_delta_enum_array"),
   33059             :                 .get = py_netr_DatabaseSync_out_get_delta_enum_array,
   33060             :                 .set = py_netr_DatabaseSync_out_set_delta_enum_array,
   33061             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_ENUM_ARRAY")
   33062             :         },
   33063             :         {
   33064             :                 .name = discard_const_p(char, "in_preferredmaximumlength"),
   33065             :                 .get = py_netr_DatabaseSync_in_get_preferredmaximumlength,
   33066             :                 .set = py_netr_DatabaseSync_in_set_preferredmaximumlength,
   33067             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   33068             :         },
   33069             :         {
   33070             :                 .name = discard_const_p(char, "result"),
   33071             :                 .get = py_netr_DatabaseSync_get_result,
   33072             :                 .set = py_netr_DatabaseSync_set_result,
   33073             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   33074             :         },
   33075             :         { .name = NULL }
   33076             : };
   33077             : 
   33078           0 : static PyObject *py_netr_DatabaseSync_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   33079             : {
   33080           0 :         PyObject *self = pytalloc_new(struct netr_DatabaseSync, type);
   33081           0 :         struct netr_DatabaseSync *_self = (struct netr_DatabaseSync *)pytalloc_get_ptr(self);
   33082           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   33083           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   33084           0 :         _self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   33085           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   33086           0 :         _self->in.sync_context = talloc_zero(mem_ctx, uint32_t);
   33087           0 :         _self->out.sync_context = talloc_zero(mem_ctx, uint32_t);
   33088             :         /* a pointer to a NULL pointer */
   33089           0 :         _self->out.delta_enum_array = talloc_zero(mem_ctx, struct netr_DELTA_ENUM_ARRAY *);
   33090           0 :         return self;
   33091             : }
   33092             : 
   33093           0 : static PyObject *py_netr_DatabaseSync_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   33094             : {
   33095             : 
   33096             : 
   33097           0 :         return PyLong_FromLong(8);
   33098             : }
   33099             : 
   33100           0 : static PyObject *py_netr_DatabaseSync_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   33101             : {
   33102           0 :         const struct ndr_interface_call *call = NULL;
   33103           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   33104           0 :         PyObject *ret = NULL;
   33105           0 :         struct ndr_push *push = NULL;
   33106             :         DATA_BLOB blob;
   33107             :         enum ndr_err_code err;
   33108             : 
   33109           0 :         if (ndr_table_netlogon.num_calls < 9) {
   33110           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseSync_ndr_pack");
   33111           0 :                 return NULL;
   33112             :         }
   33113           0 :         call = &ndr_table_netlogon.calls[8];
   33114             : 
   33115           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   33116           0 :         if (push == NULL) {
   33117           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   33118           0 :                 return NULL;
   33119             :         }
   33120             : 
   33121           0 :         push->flags |= ndr_push_flags;
   33122             : 
   33123           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   33124           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   33125           0 :                 TALLOC_FREE(push);
   33126           0 :                 PyErr_SetNdrError(err);
   33127           0 :                 return NULL;
   33128             :         }
   33129           0 :         blob = ndr_push_blob(push);
   33130           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   33131           0 :         TALLOC_FREE(push);
   33132           0 :         return ret;
   33133             : }
   33134             : 
   33135           0 : static PyObject *py_netr_DatabaseSync_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   33136             : {
   33137           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   33138           0 :         PyObject *bigendian_obj = NULL;
   33139           0 :         PyObject *ndr64_obj = NULL;
   33140           0 :         uint32_t ndr_push_flags = 0;
   33141             : 
   33142           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   33143             :                 discard_const_p(char *, kwnames),
   33144             :                 &bigendian_obj,
   33145             :                 &ndr64_obj)) {
   33146           0 :                 return NULL;
   33147             :         }
   33148             : 
   33149           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   33150           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   33151             :         }
   33152           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   33153           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   33154             :         }
   33155             : 
   33156           0 :         return py_netr_DatabaseSync_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   33157             : }
   33158             : 
   33159           0 : static PyObject *py_netr_DatabaseSync_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   33160             : {
   33161           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   33162           0 :         PyObject *bigendian_obj = NULL;
   33163           0 :         PyObject *ndr64_obj = NULL;
   33164           0 :         uint32_t ndr_push_flags = 0;
   33165             : 
   33166           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   33167             :                 discard_const_p(char *, kwnames),
   33168             :                 &bigendian_obj,
   33169             :                 &ndr64_obj)) {
   33170           0 :                 return NULL;
   33171             :         }
   33172             : 
   33173           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   33174           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   33175             :         }
   33176           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   33177           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   33178             :         }
   33179             : 
   33180           0 :         return py_netr_DatabaseSync_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   33181             : }
   33182             : 
   33183           0 : static PyObject *py_netr_DatabaseSync_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   33184             : {
   33185           0 :         const struct ndr_interface_call *call = NULL;
   33186           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   33187           0 :         struct ndr_pull *pull = NULL;
   33188             :         enum ndr_err_code err;
   33189             : 
   33190           0 :         if (ndr_table_netlogon.num_calls < 9) {
   33191           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseSync_ndr_unpack");
   33192           0 :                 return NULL;
   33193             :         }
   33194           0 :         call = &ndr_table_netlogon.calls[8];
   33195             : 
   33196           0 :         pull = ndr_pull_init_blob(blob, object);
   33197           0 :         if (pull == NULL) {
   33198           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   33199           0 :                 return NULL;
   33200             :         }
   33201             : 
   33202           0 :         pull->flags |= ndr_pull_flags;
   33203             : 
   33204           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   33205           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   33206           0 :                 TALLOC_FREE(pull);
   33207           0 :                 PyErr_SetNdrError(err);
   33208           0 :                 return NULL;
   33209             :         }
   33210           0 :         if (!allow_remaining) {
   33211             :                 uint32_t highest_ofs;
   33212             : 
   33213           0 :                 if (pull->offset > pull->relative_highest_offset) {
   33214           0 :                         highest_ofs = pull->offset;
   33215             :                 } else {
   33216           0 :                         highest_ofs = pull->relative_highest_offset;
   33217             :                 }
   33218           0 :                 if (highest_ofs < pull->data_size) {
   33219           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   33220             :                                 "not all bytes consumed ofs[%u] size[%u]",
   33221             :                                 highest_ofs, pull->data_size);
   33222           0 :                         TALLOC_FREE(pull);
   33223           0 :                         PyErr_SetNdrError(err);
   33224           0 :                         return NULL;
   33225             :                 }
   33226             :         }
   33227             : 
   33228           0 :         TALLOC_FREE(pull);
   33229           0 :         Py_RETURN_NONE;
   33230             : }
   33231             : 
   33232           0 : static PyObject *py_netr_DatabaseSync_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   33233             : {
   33234             :         DATA_BLOB blob;
   33235           0 :         Py_ssize_t blob_length = 0;
   33236           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   33237           0 :         PyObject *bigendian_obj = NULL;
   33238           0 :         PyObject *ndr64_obj = NULL;
   33239           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   33240           0 :         PyObject *allow_remaining_obj = NULL;
   33241           0 :         bool allow_remaining = false;
   33242             : 
   33243           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   33244             :                 discard_const_p(char *, kwnames),
   33245             :                 &blob.data, &blob_length,
   33246             :                 &bigendian_obj,
   33247             :                 &ndr64_obj,
   33248             :                 &allow_remaining_obj)) {
   33249           0 :                 return NULL;
   33250             :         }
   33251           0 :         blob.length = blob_length;
   33252             : 
   33253           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   33254           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   33255             :         }
   33256           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   33257           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   33258             :         }
   33259             : 
   33260           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   33261           0 :                 allow_remaining = true;
   33262             :         }
   33263             : 
   33264           0 :         return py_netr_DatabaseSync_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   33265             : }
   33266             : 
   33267           0 : static PyObject *py_netr_DatabaseSync_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   33268             : {
   33269             :         DATA_BLOB blob;
   33270           0 :         Py_ssize_t blob_length = 0;
   33271           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   33272           0 :         PyObject *bigendian_obj = NULL;
   33273           0 :         PyObject *ndr64_obj = NULL;
   33274           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   33275           0 :         PyObject *allow_remaining_obj = NULL;
   33276           0 :         bool allow_remaining = false;
   33277             : 
   33278           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   33279             :                 discard_const_p(char *, kwnames),
   33280             :                 &blob.data, &blob_length,
   33281             :                 &bigendian_obj,
   33282             :                 &ndr64_obj,
   33283             :                 &allow_remaining_obj)) {
   33284           0 :                 return NULL;
   33285             :         }
   33286           0 :         blob.length = blob_length;
   33287             : 
   33288           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   33289           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   33290             :         }
   33291           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   33292           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   33293             :         }
   33294             : 
   33295           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   33296           0 :                 allow_remaining = true;
   33297             :         }
   33298             : 
   33299           0 :         return py_netr_DatabaseSync_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   33300             : }
   33301             : 
   33302           0 : static PyObject *py_netr_DatabaseSync_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   33303             : {
   33304           0 :         const struct ndr_interface_call *call = NULL;
   33305           0 :         struct netr_DatabaseSync *object = (struct netr_DatabaseSync *)pytalloc_get_ptr(py_obj);
   33306             :         PyObject *ret;
   33307             :         char *retstr;
   33308             : 
   33309           0 :         if (ndr_table_netlogon.num_calls < 9) {
   33310           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseSync_ndr_print");
   33311           0 :                 return NULL;
   33312             :         }
   33313           0 :         call = &ndr_table_netlogon.calls[8];
   33314             : 
   33315           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   33316           0 :         ret = PyUnicode_FromString(retstr);
   33317           0 :         TALLOC_FREE(retstr);
   33318             : 
   33319           0 :         return ret;
   33320             : }
   33321             : 
   33322           0 : static PyObject *py_netr_DatabaseSync_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   33323             : {
   33324           0 :         return py_netr_DatabaseSync_ndr_print(py_obj, "netr_DatabaseSync_in", NDR_IN);
   33325             : }
   33326             : 
   33327           0 : static PyObject *py_netr_DatabaseSync_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   33328             : {
   33329           0 :         return py_netr_DatabaseSync_ndr_print(py_obj, "netr_DatabaseSync_out", NDR_OUT);
   33330             : }
   33331             : 
   33332             : static PyMethodDef py_netr_DatabaseSync_methods[] = {
   33333             :         { "opnum", (PyCFunction)py_netr_DatabaseSync_ndr_opnum, METH_NOARGS|METH_CLASS,
   33334             :                 "netlogon.netr_DatabaseSync.opnum() -> 8 (0x08) " },
   33335             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   33336             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   33337             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   33338             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   33339             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   33340             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   33341             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   33342             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   33343             :         { "__ndr_print_in__", (PyCFunction)py_netr_DatabaseSync_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   33344             :         { "__ndr_print_out__", (PyCFunction)py_netr_DatabaseSync_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   33345             :         { NULL, NULL, 0, NULL }
   33346             : };
   33347             : 
   33348             : 
   33349             : static PyTypeObject netr_DatabaseSync_Type = {
   33350             :         PyVarObject_HEAD_INIT(NULL, 0)
   33351             :         .tp_name = "netlogon.netr_DatabaseSync",
   33352             :         .tp_getset = py_netr_DatabaseSync_getsetters,
   33353             :         .tp_methods = py_netr_DatabaseSync_methods,
   33354             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   33355             :         .tp_new = py_netr_DatabaseSync_new,
   33356             : };
   33357             : 
   33358           0 : static bool pack_py_netr_DatabaseSync_args_in(PyObject *args, PyObject *kwargs, struct netr_DatabaseSync *r)
   33359             : {
   33360             :         PyObject *py_logon_server;
   33361             :         PyObject *py_computername;
   33362             :         PyObject *py_credential;
   33363             :         PyObject *py_return_authenticator;
   33364             :         PyObject *py_database_id;
   33365             :         PyObject *py_sync_context;
   33366             :         PyObject *py_preferredmaximumlength;
   33367           0 :         const char *kwnames[] = {
   33368             :                 "logon_server", "computername", "credential", "return_authenticator", "database_id", "sync_context", "preferredmaximumlength", NULL
   33369             :         };
   33370             : 
   33371           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)) {
   33372           0 :                 return false;
   33373             :         }
   33374             : 
   33375           0 :         if (py_logon_server == NULL) {
   33376           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_server");
   33377           0 :                 return false;
   33378             :         }
   33379           0 :         r->in.logon_server = talloc_ptrtype(r, r->in.logon_server);
   33380           0 :         if (r->in.logon_server == NULL) {
   33381           0 :                 PyErr_NoMemory();
   33382           0 :                 return false;
   33383             :         }
   33384             :         {
   33385             :                 const char *test_str;
   33386             :                 const char *talloc_str;
   33387           0 :                 PyObject *unicode = NULL;
   33388           0 :                 if (PyUnicode_Check(py_logon_server)) {
   33389           0 :                         unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   33390           0 :                         if (unicode == NULL) {
   33391           0 :                                 PyErr_NoMemory();
   33392           0 :                                 return false;
   33393             :                         }
   33394           0 :                         test_str = PyBytes_AS_STRING(unicode);
   33395           0 :                 } else if (PyBytes_Check(py_logon_server)) {
   33396           0 :                         test_str = PyBytes_AS_STRING(py_logon_server);
   33397             :                 } else {
   33398           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   33399           0 :                         return false;
   33400             :                 }
   33401           0 :                 talloc_str = talloc_strdup(r, test_str);
   33402           0 :                 if (unicode != NULL) {
   33403           0 :                         Py_DECREF(unicode);
   33404             :                 }
   33405           0 :                 if (talloc_str == NULL) {
   33406           0 :                         PyErr_NoMemory();
   33407           0 :                         return false;
   33408             :                 }
   33409           0 :                 r->in.logon_server = talloc_str;
   33410             :         }
   33411           0 :         if (py_computername == NULL) {
   33412           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computername");
   33413           0 :                 return false;
   33414             :         }
   33415           0 :         r->in.computername = talloc_ptrtype(r, r->in.computername);
   33416           0 :         if (r->in.computername == NULL) {
   33417           0 :                 PyErr_NoMemory();
   33418           0 :                 return false;
   33419             :         }
   33420             :         {
   33421             :                 const char *test_str;
   33422             :                 const char *talloc_str;
   33423           0 :                 PyObject *unicode = NULL;
   33424           0 :                 if (PyUnicode_Check(py_computername)) {
   33425           0 :                         unicode = PyUnicode_AsEncodedString(py_computername, "utf-8", "ignore");
   33426           0 :                         if (unicode == NULL) {
   33427           0 :                                 PyErr_NoMemory();
   33428           0 :                                 return false;
   33429             :                         }
   33430           0 :                         test_str = PyBytes_AS_STRING(unicode);
   33431           0 :                 } else if (PyBytes_Check(py_computername)) {
   33432           0 :                         test_str = PyBytes_AS_STRING(py_computername);
   33433             :                 } else {
   33434           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computername)->tp_name);
   33435           0 :                         return false;
   33436             :                 }
   33437           0 :                 talloc_str = talloc_strdup(r, test_str);
   33438           0 :                 if (unicode != NULL) {
   33439           0 :                         Py_DECREF(unicode);
   33440             :                 }
   33441           0 :                 if (talloc_str == NULL) {
   33442           0 :                         PyErr_NoMemory();
   33443           0 :                         return false;
   33444             :                 }
   33445           0 :                 r->in.computername = talloc_str;
   33446             :         }
   33447           0 :         if (py_credential == NULL) {
   33448           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   33449           0 :                 return false;
   33450             :         }
   33451           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   33452           0 :         if (r->in.credential == NULL) {
   33453           0 :                 PyErr_NoMemory();
   33454           0 :                 return false;
   33455             :         }
   33456           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   33457           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   33458           0 :                 PyErr_NoMemory();
   33459           0 :                 return false;
   33460             :         }
   33461           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   33462           0 :         if (py_return_authenticator == NULL) {
   33463           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.return_authenticator");
   33464           0 :                 return false;
   33465             :         }
   33466           0 :         r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
   33467           0 :         if (r->in.return_authenticator == NULL) {
   33468           0 :                 PyErr_NoMemory();
   33469           0 :                 return false;
   33470             :         }
   33471           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   33472           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   33473           0 :                 PyErr_NoMemory();
   33474           0 :                 return false;
   33475             :         }
   33476           0 :         r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   33477           0 :         if (py_database_id == NULL) {
   33478           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.database_id");
   33479           0 :                 return false;
   33480             :         }
   33481             :         {
   33482           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.database_id));
   33483           0 :                 if (PyLong_Check(py_database_id)) {
   33484             :                         unsigned long long test_var;
   33485           0 :                         test_var = PyLong_AsUnsignedLongLong(py_database_id);
   33486           0 :                         if (PyErr_Occurred() != NULL) {
   33487           0 :                                 return false;
   33488             :                         }
   33489           0 :                         if (test_var > uint_max) {
   33490           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   33491             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33492           0 :                                 return false;
   33493             :                         }
   33494           0 :                         r->in.database_id = test_var;
   33495             :                 } else {
   33496           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   33497             :                           PyLong_Type.tp_name);
   33498           0 :                         return false;
   33499             :                 }
   33500             :         }
   33501           0 :         if (py_sync_context == NULL) {
   33502           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.sync_context");
   33503           0 :                 return false;
   33504             :         }
   33505           0 :         r->in.sync_context = talloc_ptrtype(r, r->in.sync_context);
   33506           0 :         if (r->in.sync_context == NULL) {
   33507           0 :                 PyErr_NoMemory();
   33508           0 :                 return false;
   33509             :         }
   33510             :         {
   33511           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.sync_context));
   33512           0 :                 if (PyLong_Check(py_sync_context)) {
   33513             :                         unsigned long long test_var;
   33514           0 :                         test_var = PyLong_AsUnsignedLongLong(py_sync_context);
   33515           0 :                         if (PyErr_Occurred() != NULL) {
   33516           0 :                                 return false;
   33517             :                         }
   33518           0 :                         if (test_var > uint_max) {
   33519           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   33520             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33521           0 :                                 return false;
   33522             :                         }
   33523           0 :                         *r->in.sync_context = test_var;
   33524             :                 } else {
   33525           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   33526             :                           PyLong_Type.tp_name);
   33527           0 :                         return false;
   33528             :                 }
   33529             :         }
   33530           0 :         if (py_preferredmaximumlength == NULL) {
   33531           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.preferredmaximumlength");
   33532           0 :                 return false;
   33533             :         }
   33534             :         {
   33535           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.preferredmaximumlength));
   33536           0 :                 if (PyLong_Check(py_preferredmaximumlength)) {
   33537             :                         unsigned long long test_var;
   33538           0 :                         test_var = PyLong_AsUnsignedLongLong(py_preferredmaximumlength);
   33539           0 :                         if (PyErr_Occurred() != NULL) {
   33540           0 :                                 return false;
   33541             :                         }
   33542           0 :                         if (test_var > uint_max) {
   33543           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   33544             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33545           0 :                                 return false;
   33546             :                         }
   33547           0 :                         r->in.preferredmaximumlength = test_var;
   33548             :                 } else {
   33549           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   33550             :                           PyLong_Type.tp_name);
   33551           0 :                         return false;
   33552             :                 }
   33553             :         }
   33554           0 :         return true;
   33555             : }
   33556             : 
   33557           0 : static PyObject *unpack_py_netr_DatabaseSync_args_out(struct netr_DatabaseSync *r)
   33558             : {
   33559             :         PyObject *result;
   33560             :         PyObject *py_return_authenticator;
   33561             :         PyObject *py_sync_context;
   33562             :         PyObject *py_delta_enum_array;
   33563           0 :         result = PyTuple_New(3);
   33564           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   33565           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   33566           0 :         py_sync_context = PyLong_FromUnsignedLongLong((uint32_t)*r->out.sync_context);
   33567           0 :         PyTuple_SetItem(result, 1, py_sync_context);
   33568           0 :         if (*r->out.delta_enum_array == NULL) {
   33569           0 :                 py_delta_enum_array = Py_None;
   33570           0 :                 Py_INCREF(py_delta_enum_array);
   33571             :         } else {
   33572           0 :                 py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *r->out.delta_enum_array, *r->out.delta_enum_array);
   33573             :         }
   33574           0 :         PyTuple_SetItem(result, 2, py_delta_enum_array);
   33575           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   33576           0 :                 PyErr_SetNTSTATUS(r->out.result);
   33577           0 :                 return NULL;
   33578             :         }
   33579             : 
   33580           0 :         return result;
   33581             : }
   33582             : 
   33583             : 
   33584           0 : static PyObject *py_netr_AccountDeltas_in_get_logon_server(PyObject *obj, void *closure)
   33585             : {
   33586           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   33587             :         PyObject *py_logon_server;
   33588           0 :         if (object->in.logon_server == NULL) {
   33589           0 :                 Py_RETURN_NONE;
   33590             :         }
   33591           0 :         if (object->in.logon_server == NULL) {
   33592           0 :                 py_logon_server = Py_None;
   33593           0 :                 Py_INCREF(py_logon_server);
   33594             :         } else {
   33595           0 :                 if (object->in.logon_server == NULL) {
   33596           0 :                         py_logon_server = Py_None;
   33597           0 :                         Py_INCREF(py_logon_server);
   33598             :                 } else {
   33599           0 :                         py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   33600             :                 }
   33601             :         }
   33602           0 :         return py_logon_server;
   33603             : }
   33604             : 
   33605           0 : static int py_netr_AccountDeltas_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   33606             : {
   33607           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   33608           0 :         if (value == NULL) {
   33609           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_server");
   33610           0 :                 return -1;
   33611             :         }
   33612           0 :         if (value == Py_None) {
   33613           0 :                 object->in.logon_server = NULL;
   33614             :         } else {
   33615           0 :                 object->in.logon_server = NULL;
   33616             :                 {
   33617             :                         const char *test_str;
   33618             :                         const char *talloc_str;
   33619           0 :                         PyObject *unicode = NULL;
   33620           0 :                         if (PyUnicode_Check(value)) {
   33621           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   33622           0 :                                 if (unicode == NULL) {
   33623           0 :                                         PyErr_NoMemory();
   33624           0 :                                         return -1;
   33625             :                                 }
   33626           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   33627           0 :                         } else if (PyBytes_Check(value)) {
   33628           0 :                                 test_str = PyBytes_AS_STRING(value);
   33629             :                         } else {
   33630           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   33631           0 :                                 return -1;
   33632             :                         }
   33633           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   33634           0 :                         if (unicode != NULL) {
   33635           0 :                                 Py_DECREF(unicode);
   33636             :                         }
   33637           0 :                         if (talloc_str == NULL) {
   33638           0 :                                 PyErr_NoMemory();
   33639           0 :                                 return -1;
   33640             :                         }
   33641           0 :                         object->in.logon_server = talloc_str;
   33642             :                 }
   33643             :         }
   33644           0 :         return 0;
   33645             : }
   33646             : 
   33647           0 : static PyObject *py_netr_AccountDeltas_in_get_computername(PyObject *obj, void *closure)
   33648             : {
   33649           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   33650             :         PyObject *py_computername;
   33651           0 :         if (object->in.computername == NULL) {
   33652           0 :                 Py_RETURN_NONE;
   33653             :         }
   33654           0 :         if (object->in.computername == NULL) {
   33655           0 :                 py_computername = Py_None;
   33656           0 :                 Py_INCREF(py_computername);
   33657             :         } else {
   33658           0 :                 py_computername = PyUnicode_Decode(object->in.computername, strlen(object->in.computername), "utf-8", "ignore");
   33659             :         }
   33660           0 :         return py_computername;
   33661             : }
   33662             : 
   33663           0 : static int py_netr_AccountDeltas_in_set_computername(PyObject *py_obj, PyObject *value, void *closure)
   33664             : {
   33665           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   33666           0 :         if (value == NULL) {
   33667           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computername");
   33668           0 :                 return -1;
   33669             :         }
   33670           0 :         object->in.computername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computername);
   33671           0 :         if (object->in.computername == NULL) {
   33672           0 :                 PyErr_NoMemory();
   33673           0 :                 return -1;
   33674             :         }
   33675             :         {
   33676             :                 const char *test_str;
   33677             :                 const char *talloc_str;
   33678           0 :                 PyObject *unicode = NULL;
   33679           0 :                 if (PyUnicode_Check(value)) {
   33680           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   33681           0 :                         if (unicode == NULL) {
   33682           0 :                                 PyErr_NoMemory();
   33683           0 :                                 return -1;
   33684             :                         }
   33685           0 :                         test_str = PyBytes_AS_STRING(unicode);
   33686           0 :                 } else if (PyBytes_Check(value)) {
   33687           0 :                         test_str = PyBytes_AS_STRING(value);
   33688             :                 } else {
   33689           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   33690           0 :                         return -1;
   33691             :                 }
   33692           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   33693           0 :                 if (unicode != NULL) {
   33694           0 :                         Py_DECREF(unicode);
   33695             :                 }
   33696           0 :                 if (talloc_str == NULL) {
   33697           0 :                         PyErr_NoMemory();
   33698           0 :                         return -1;
   33699             :                 }
   33700           0 :                 object->in.computername = talloc_str;
   33701             :         }
   33702           0 :         return 0;
   33703             : }
   33704             : 
   33705           0 : static PyObject *py_netr_AccountDeltas_in_get_credential(PyObject *obj, void *closure)
   33706             : {
   33707           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   33708             :         PyObject *py_credential;
   33709           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, pytalloc_get_mem_ctx(obj), &object->in.credential);
   33710           0 :         return py_credential;
   33711             : }
   33712             : 
   33713           0 : static int py_netr_AccountDeltas_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   33714             : {
   33715           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   33716           0 :         if (value == NULL) {
   33717           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   33718           0 :                 return -1;
   33719             :         }
   33720           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   33721           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   33722           0 :                 PyErr_NoMemory();
   33723           0 :                 return -1;
   33724             :         }
   33725           0 :         object->in.credential = *(struct netr_Authenticator *)pytalloc_get_ptr(value);
   33726           0 :         return 0;
   33727             : }
   33728             : 
   33729           0 : static PyObject *py_netr_AccountDeltas_in_get_return_authenticator(PyObject *obj, void *closure)
   33730             : {
   33731           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   33732             :         PyObject *py_return_authenticator;
   33733           0 :         if (object->in.return_authenticator == NULL) {
   33734           0 :                 Py_RETURN_NONE;
   33735             :         }
   33736           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   33737           0 :         return py_return_authenticator;
   33738             : }
   33739             : 
   33740           0 : static int py_netr_AccountDeltas_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   33741             : {
   33742           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   33743           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   33744           0 :         if (value == NULL) {
   33745           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.return_authenticator");
   33746           0 :                 return -1;
   33747             :         }
   33748           0 :         object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
   33749           0 :         if (object->in.return_authenticator == NULL) {
   33750           0 :                 PyErr_NoMemory();
   33751           0 :                 return -1;
   33752             :         }
   33753           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   33754           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   33755           0 :                 PyErr_NoMemory();
   33756           0 :                 return -1;
   33757             :         }
   33758           0 :         object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   33759           0 :         return 0;
   33760             : }
   33761             : 
   33762           0 : static PyObject *py_netr_AccountDeltas_out_get_return_authenticator(PyObject *obj, void *closure)
   33763             : {
   33764           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   33765             :         PyObject *py_return_authenticator;
   33766           0 :         if (object->out.return_authenticator == NULL) {
   33767           0 :                 Py_RETURN_NONE;
   33768             :         }
   33769           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   33770           0 :         return py_return_authenticator;
   33771             : }
   33772             : 
   33773           0 : static int py_netr_AccountDeltas_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   33774             : {
   33775           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   33776           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   33777           0 :         if (value == NULL) {
   33778           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   33779           0 :                 return -1;
   33780             :         }
   33781           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   33782           0 :         if (object->out.return_authenticator == NULL) {
   33783           0 :                 PyErr_NoMemory();
   33784           0 :                 return -1;
   33785             :         }
   33786           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   33787           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   33788           0 :                 PyErr_NoMemory();
   33789           0 :                 return -1;
   33790             :         }
   33791           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   33792           0 :         return 0;
   33793             : }
   33794             : 
   33795           0 : static PyObject *py_netr_AccountDeltas_in_get_uas(PyObject *obj, void *closure)
   33796             : {
   33797           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   33798             :         PyObject *py_uas;
   33799           0 :         py_uas = pytalloc_reference_ex(&netr_UAS_INFO_0_Type, pytalloc_get_mem_ctx(obj), &object->in.uas);
   33800           0 :         return py_uas;
   33801             : }
   33802             : 
   33803           0 : static int py_netr_AccountDeltas_in_set_uas(PyObject *py_obj, PyObject *value, void *closure)
   33804             : {
   33805           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   33806           0 :         if (value == NULL) {
   33807           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.uas");
   33808           0 :                 return -1;
   33809             :         }
   33810           0 :         PY_CHECK_TYPE(&netr_UAS_INFO_0_Type, value, return -1;);
   33811           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   33812           0 :                 PyErr_NoMemory();
   33813           0 :                 return -1;
   33814             :         }
   33815           0 :         object->in.uas = *(struct netr_UAS_INFO_0 *)pytalloc_get_ptr(value);
   33816           0 :         return 0;
   33817             : }
   33818             : 
   33819           0 : static PyObject *py_netr_AccountDeltas_in_get_count(PyObject *obj, void *closure)
   33820             : {
   33821           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   33822             :         PyObject *py_count;
   33823           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->in.count);
   33824           0 :         return py_count;
   33825             : }
   33826             : 
   33827           0 : static int py_netr_AccountDeltas_in_set_count(PyObject *py_obj, PyObject *value, void *closure)
   33828             : {
   33829           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   33830           0 :         if (value == NULL) {
   33831           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.count");
   33832           0 :                 return -1;
   33833             :         }
   33834             :         {
   33835           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.count));
   33836           0 :                 if (PyLong_Check(value)) {
   33837             :                         unsigned long long test_var;
   33838           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   33839           0 :                         if (PyErr_Occurred() != NULL) {
   33840           0 :                                 return -1;
   33841             :                         }
   33842           0 :                         if (test_var > uint_max) {
   33843           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   33844             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33845           0 :                                 return -1;
   33846             :                         }
   33847           0 :                         object->in.count = test_var;
   33848             :                 } else {
   33849           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   33850             :                           PyLong_Type.tp_name);
   33851           0 :                         return -1;
   33852             :                 }
   33853             :         }
   33854           0 :         return 0;
   33855             : }
   33856             : 
   33857           0 : static PyObject *py_netr_AccountDeltas_in_get_level(PyObject *obj, void *closure)
   33858             : {
   33859           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   33860             :         PyObject *py_level;
   33861           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   33862           0 :         return py_level;
   33863             : }
   33864             : 
   33865           0 : static int py_netr_AccountDeltas_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   33866             : {
   33867           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   33868           0 :         if (value == NULL) {
   33869           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   33870           0 :                 return -1;
   33871             :         }
   33872             :         {
   33873           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   33874           0 :                 if (PyLong_Check(value)) {
   33875             :                         unsigned long long test_var;
   33876           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   33877           0 :                         if (PyErr_Occurred() != NULL) {
   33878           0 :                                 return -1;
   33879             :                         }
   33880           0 :                         if (test_var > uint_max) {
   33881           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   33882             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33883           0 :                                 return -1;
   33884             :                         }
   33885           0 :                         object->in.level = test_var;
   33886             :                 } else {
   33887           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   33888             :                           PyLong_Type.tp_name);
   33889           0 :                         return -1;
   33890             :                 }
   33891             :         }
   33892           0 :         return 0;
   33893             : }
   33894             : 
   33895           0 : static PyObject *py_netr_AccountDeltas_in_get_buffersize(PyObject *obj, void *closure)
   33896             : {
   33897           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   33898             :         PyObject *py_buffersize;
   33899           0 :         py_buffersize = PyLong_FromUnsignedLongLong((uint32_t)object->in.buffersize);
   33900           0 :         return py_buffersize;
   33901             : }
   33902             : 
   33903           0 : static int py_netr_AccountDeltas_in_set_buffersize(PyObject *py_obj, PyObject *value, void *closure)
   33904             : {
   33905           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   33906           0 :         if (value == NULL) {
   33907           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.buffersize");
   33908           0 :                 return -1;
   33909             :         }
   33910             :         {
   33911           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.buffersize));
   33912           0 :                 if (PyLong_Check(value)) {
   33913             :                         unsigned long long test_var;
   33914           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   33915           0 :                         if (PyErr_Occurred() != NULL) {
   33916           0 :                                 return -1;
   33917             :                         }
   33918           0 :                         if (test_var > uint_max) {
   33919           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   33920             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33921           0 :                                 return -1;
   33922             :                         }
   33923           0 :                         object->in.buffersize = test_var;
   33924             :                 } else {
   33925           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   33926             :                           PyLong_Type.tp_name);
   33927           0 :                         return -1;
   33928             :                 }
   33929             :         }
   33930           0 :         return 0;
   33931             : }
   33932             : 
   33933           0 : static PyObject *py_netr_AccountDeltas_out_get_buffer(PyObject *obj, void *closure)
   33934             : {
   33935           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   33936             :         PyObject *py_buffer;
   33937           0 :         if (object->out.buffer == NULL) {
   33938           0 :                 Py_RETURN_NONE;
   33939             :         }
   33940           0 :         py_buffer = pytalloc_reference_ex(&netr_AccountBuffer_Type, object->out.buffer, object->out.buffer);
   33941           0 :         return py_buffer;
   33942             : }
   33943             : 
   33944           0 : static int py_netr_AccountDeltas_out_set_buffer(PyObject *py_obj, PyObject *value, void *closure)
   33945             : {
   33946           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   33947           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.buffer));
   33948           0 :         if (value == NULL) {
   33949           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.buffer");
   33950           0 :                 return -1;
   33951             :         }
   33952           0 :         object->out.buffer = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.buffer);
   33953           0 :         if (object->out.buffer == NULL) {
   33954           0 :                 PyErr_NoMemory();
   33955           0 :                 return -1;
   33956             :         }
   33957           0 :         PY_CHECK_TYPE(&netr_AccountBuffer_Type, value, return -1;);
   33958           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   33959           0 :                 PyErr_NoMemory();
   33960           0 :                 return -1;
   33961             :         }
   33962           0 :         object->out.buffer = (struct netr_AccountBuffer *)pytalloc_get_ptr(value);
   33963           0 :         return 0;
   33964             : }
   33965             : 
   33966           0 : static PyObject *py_netr_AccountDeltas_out_get_count_returned(PyObject *obj, void *closure)
   33967             : {
   33968           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   33969             :         PyObject *py_count_returned;
   33970           0 :         if (object->out.count_returned == NULL) {
   33971           0 :                 Py_RETURN_NONE;
   33972             :         }
   33973           0 :         py_count_returned = PyLong_FromUnsignedLongLong((uint32_t)*object->out.count_returned);
   33974           0 :         return py_count_returned;
   33975             : }
   33976             : 
   33977           0 : static int py_netr_AccountDeltas_out_set_count_returned(PyObject *py_obj, PyObject *value, void *closure)
   33978             : {
   33979           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   33980           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.count_returned));
   33981           0 :         if (value == NULL) {
   33982           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.count_returned");
   33983           0 :                 return -1;
   33984             :         }
   33985           0 :         object->out.count_returned = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.count_returned);
   33986           0 :         if (object->out.count_returned == NULL) {
   33987           0 :                 PyErr_NoMemory();
   33988           0 :                 return -1;
   33989             :         }
   33990             :         {
   33991           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.count_returned));
   33992           0 :                 if (PyLong_Check(value)) {
   33993             :                         unsigned long long test_var;
   33994           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   33995           0 :                         if (PyErr_Occurred() != NULL) {
   33996           0 :                                 return -1;
   33997             :                         }
   33998           0 :                         if (test_var > uint_max) {
   33999           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   34000             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34001           0 :                                 return -1;
   34002             :                         }
   34003           0 :                         *object->out.count_returned = test_var;
   34004             :                 } else {
   34005           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   34006             :                           PyLong_Type.tp_name);
   34007           0 :                         return -1;
   34008             :                 }
   34009             :         }
   34010           0 :         return 0;
   34011             : }
   34012             : 
   34013           0 : static PyObject *py_netr_AccountDeltas_out_get_total_entries(PyObject *obj, void *closure)
   34014             : {
   34015           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   34016             :         PyObject *py_total_entries;
   34017           0 :         if (object->out.total_entries == NULL) {
   34018           0 :                 Py_RETURN_NONE;
   34019             :         }
   34020           0 :         py_total_entries = PyLong_FromUnsignedLongLong((uint32_t)*object->out.total_entries);
   34021           0 :         return py_total_entries;
   34022             : }
   34023             : 
   34024           0 : static int py_netr_AccountDeltas_out_set_total_entries(PyObject *py_obj, PyObject *value, void *closure)
   34025             : {
   34026           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   34027           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.total_entries));
   34028           0 :         if (value == NULL) {
   34029           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.total_entries");
   34030           0 :                 return -1;
   34031             :         }
   34032           0 :         object->out.total_entries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.total_entries);
   34033           0 :         if (object->out.total_entries == NULL) {
   34034           0 :                 PyErr_NoMemory();
   34035           0 :                 return -1;
   34036             :         }
   34037             :         {
   34038           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.total_entries));
   34039           0 :                 if (PyLong_Check(value)) {
   34040             :                         unsigned long long test_var;
   34041           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   34042           0 :                         if (PyErr_Occurred() != NULL) {
   34043           0 :                                 return -1;
   34044             :                         }
   34045           0 :                         if (test_var > uint_max) {
   34046           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   34047             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34048           0 :                                 return -1;
   34049             :                         }
   34050           0 :                         *object->out.total_entries = test_var;
   34051             :                 } else {
   34052           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   34053             :                           PyLong_Type.tp_name);
   34054           0 :                         return -1;
   34055             :                 }
   34056             :         }
   34057           0 :         return 0;
   34058             : }
   34059             : 
   34060           0 : static PyObject *py_netr_AccountDeltas_out_get_recordid(PyObject *obj, void *closure)
   34061             : {
   34062           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   34063             :         PyObject *py_recordid;
   34064           0 :         if (object->out.recordid == NULL) {
   34065           0 :                 Py_RETURN_NONE;
   34066             :         }
   34067           0 :         py_recordid = pytalloc_reference_ex(&netr_UAS_INFO_0_Type, object->out.recordid, object->out.recordid);
   34068           0 :         return py_recordid;
   34069             : }
   34070             : 
   34071           0 : static int py_netr_AccountDeltas_out_set_recordid(PyObject *py_obj, PyObject *value, void *closure)
   34072             : {
   34073           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   34074           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.recordid));
   34075           0 :         if (value == NULL) {
   34076           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.recordid");
   34077           0 :                 return -1;
   34078             :         }
   34079           0 :         object->out.recordid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.recordid);
   34080           0 :         if (object->out.recordid == NULL) {
   34081           0 :                 PyErr_NoMemory();
   34082           0 :                 return -1;
   34083             :         }
   34084           0 :         PY_CHECK_TYPE(&netr_UAS_INFO_0_Type, value, return -1;);
   34085           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   34086           0 :                 PyErr_NoMemory();
   34087           0 :                 return -1;
   34088             :         }
   34089           0 :         object->out.recordid = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(value);
   34090           0 :         return 0;
   34091             : }
   34092             : 
   34093           0 : static PyObject *py_netr_AccountDeltas_get_result(PyObject *obj, void *closure)
   34094             : {
   34095           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(obj);
   34096             :         PyObject *py_result;
   34097           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   34098           0 :         return py_result;
   34099             : }
   34100             : 
   34101           0 : static int py_netr_AccountDeltas_set_result(PyObject *py_obj, PyObject *value, void *closure)
   34102             : {
   34103           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   34104           0 :         if (value == NULL) {
   34105           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   34106           0 :                 return -1;
   34107             :         }
   34108           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   34109           0 :         return 0;
   34110             : }
   34111             : 
   34112             : static PyGetSetDef py_netr_AccountDeltas_getsetters[] = {
   34113             :         {
   34114             :                 .name = discard_const_p(char, "in_logon_server"),
   34115             :                 .get = py_netr_AccountDeltas_in_get_logon_server,
   34116             :                 .set = py_netr_AccountDeltas_in_set_logon_server,
   34117             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   34118             :         },
   34119             :         {
   34120             :                 .name = discard_const_p(char, "in_computername"),
   34121             :                 .get = py_netr_AccountDeltas_in_get_computername,
   34122             :                 .set = py_netr_AccountDeltas_in_set_computername,
   34123             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   34124             :         },
   34125             :         {
   34126             :                 .name = discard_const_p(char, "in_credential"),
   34127             :                 .get = py_netr_AccountDeltas_in_get_credential,
   34128             :                 .set = py_netr_AccountDeltas_in_set_credential,
   34129             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   34130             :         },
   34131             :         {
   34132             :                 .name = discard_const_p(char, "in_return_authenticator"),
   34133             :                 .get = py_netr_AccountDeltas_in_get_return_authenticator,
   34134             :                 .set = py_netr_AccountDeltas_in_set_return_authenticator,
   34135             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   34136             :         },
   34137             :         {
   34138             :                 .name = discard_const_p(char, "out_return_authenticator"),
   34139             :                 .get = py_netr_AccountDeltas_out_get_return_authenticator,
   34140             :                 .set = py_netr_AccountDeltas_out_set_return_authenticator,
   34141             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   34142             :         },
   34143             :         {
   34144             :                 .name = discard_const_p(char, "in_uas"),
   34145             :                 .get = py_netr_AccountDeltas_in_get_uas,
   34146             :                 .set = py_netr_AccountDeltas_in_set_uas,
   34147             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UAS_INFO_0")
   34148             :         },
   34149             :         {
   34150             :                 .name = discard_const_p(char, "in_count"),
   34151             :                 .get = py_netr_AccountDeltas_in_get_count,
   34152             :                 .set = py_netr_AccountDeltas_in_set_count,
   34153             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   34154             :         },
   34155             :         {
   34156             :                 .name = discard_const_p(char, "in_level"),
   34157             :                 .get = py_netr_AccountDeltas_in_get_level,
   34158             :                 .set = py_netr_AccountDeltas_in_set_level,
   34159             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   34160             :         },
   34161             :         {
   34162             :                 .name = discard_const_p(char, "in_buffersize"),
   34163             :                 .get = py_netr_AccountDeltas_in_get_buffersize,
   34164             :                 .set = py_netr_AccountDeltas_in_set_buffersize,
   34165             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   34166             :         },
   34167             :         {
   34168             :                 .name = discard_const_p(char, "out_buffer"),
   34169             :                 .get = py_netr_AccountDeltas_out_get_buffer,
   34170             :                 .set = py_netr_AccountDeltas_out_set_buffer,
   34171             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_AccountBuffer")
   34172             :         },
   34173             :         {
   34174             :                 .name = discard_const_p(char, "out_count_returned"),
   34175             :                 .get = py_netr_AccountDeltas_out_get_count_returned,
   34176             :                 .set = py_netr_AccountDeltas_out_set_count_returned,
   34177             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   34178             :         },
   34179             :         {
   34180             :                 .name = discard_const_p(char, "out_total_entries"),
   34181             :                 .get = py_netr_AccountDeltas_out_get_total_entries,
   34182             :                 .set = py_netr_AccountDeltas_out_set_total_entries,
   34183             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   34184             :         },
   34185             :         {
   34186             :                 .name = discard_const_p(char, "out_recordid"),
   34187             :                 .get = py_netr_AccountDeltas_out_get_recordid,
   34188             :                 .set = py_netr_AccountDeltas_out_set_recordid,
   34189             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UAS_INFO_0")
   34190             :         },
   34191             :         {
   34192             :                 .name = discard_const_p(char, "result"),
   34193             :                 .get = py_netr_AccountDeltas_get_result,
   34194             :                 .set = py_netr_AccountDeltas_set_result,
   34195             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   34196             :         },
   34197             :         { .name = NULL }
   34198             : };
   34199             : 
   34200           0 : static PyObject *py_netr_AccountDeltas_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   34201             : {
   34202           0 :         PyObject *self = pytalloc_new(struct netr_AccountDeltas, type);
   34203           0 :         struct netr_AccountDeltas *_self = (struct netr_AccountDeltas *)pytalloc_get_ptr(self);
   34204           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   34205           0 :         _self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   34206           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   34207           0 :         _self->out.buffer = talloc_zero(mem_ctx, struct netr_AccountBuffer);
   34208           0 :         _self->out.count_returned = talloc_zero(mem_ctx, uint32_t);
   34209           0 :         _self->out.total_entries = talloc_zero(mem_ctx, uint32_t);
   34210           0 :         _self->out.recordid = talloc_zero(mem_ctx, struct netr_UAS_INFO_0);
   34211           0 :         return self;
   34212             : }
   34213             : 
   34214           0 : static PyObject *py_netr_AccountDeltas_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   34215             : {
   34216             : 
   34217             : 
   34218           0 :         return PyLong_FromLong(9);
   34219             : }
   34220             : 
   34221           0 : static PyObject *py_netr_AccountDeltas_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   34222             : {
   34223           0 :         const struct ndr_interface_call *call = NULL;
   34224           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   34225           0 :         PyObject *ret = NULL;
   34226           0 :         struct ndr_push *push = NULL;
   34227             :         DATA_BLOB blob;
   34228             :         enum ndr_err_code err;
   34229             : 
   34230           0 :         if (ndr_table_netlogon.num_calls < 10) {
   34231           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_AccountDeltas_ndr_pack");
   34232           0 :                 return NULL;
   34233             :         }
   34234           0 :         call = &ndr_table_netlogon.calls[9];
   34235             : 
   34236           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   34237           0 :         if (push == NULL) {
   34238           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   34239           0 :                 return NULL;
   34240             :         }
   34241             : 
   34242           0 :         push->flags |= ndr_push_flags;
   34243             : 
   34244           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   34245           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   34246           0 :                 TALLOC_FREE(push);
   34247           0 :                 PyErr_SetNdrError(err);
   34248           0 :                 return NULL;
   34249             :         }
   34250           0 :         blob = ndr_push_blob(push);
   34251           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   34252           0 :         TALLOC_FREE(push);
   34253           0 :         return ret;
   34254             : }
   34255             : 
   34256           0 : static PyObject *py_netr_AccountDeltas_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34257             : {
   34258           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   34259           0 :         PyObject *bigendian_obj = NULL;
   34260           0 :         PyObject *ndr64_obj = NULL;
   34261           0 :         uint32_t ndr_push_flags = 0;
   34262             : 
   34263           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   34264             :                 discard_const_p(char *, kwnames),
   34265             :                 &bigendian_obj,
   34266             :                 &ndr64_obj)) {
   34267           0 :                 return NULL;
   34268             :         }
   34269             : 
   34270           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34271           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   34272             :         }
   34273           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34274           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   34275             :         }
   34276             : 
   34277           0 :         return py_netr_AccountDeltas_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   34278             : }
   34279             : 
   34280           0 : static PyObject *py_netr_AccountDeltas_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34281             : {
   34282           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   34283           0 :         PyObject *bigendian_obj = NULL;
   34284           0 :         PyObject *ndr64_obj = NULL;
   34285           0 :         uint32_t ndr_push_flags = 0;
   34286             : 
   34287           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   34288             :                 discard_const_p(char *, kwnames),
   34289             :                 &bigendian_obj,
   34290             :                 &ndr64_obj)) {
   34291           0 :                 return NULL;
   34292             :         }
   34293             : 
   34294           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34295           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   34296             :         }
   34297           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34298           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   34299             :         }
   34300             : 
   34301           0 :         return py_netr_AccountDeltas_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   34302             : }
   34303             : 
   34304           0 : static PyObject *py_netr_AccountDeltas_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   34305             : {
   34306           0 :         const struct ndr_interface_call *call = NULL;
   34307           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   34308           0 :         struct ndr_pull *pull = NULL;
   34309             :         enum ndr_err_code err;
   34310             : 
   34311           0 :         if (ndr_table_netlogon.num_calls < 10) {
   34312           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_AccountDeltas_ndr_unpack");
   34313           0 :                 return NULL;
   34314             :         }
   34315           0 :         call = &ndr_table_netlogon.calls[9];
   34316             : 
   34317           0 :         pull = ndr_pull_init_blob(blob, object);
   34318           0 :         if (pull == NULL) {
   34319           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   34320           0 :                 return NULL;
   34321             :         }
   34322             : 
   34323           0 :         pull->flags |= ndr_pull_flags;
   34324             : 
   34325           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   34326           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   34327           0 :                 TALLOC_FREE(pull);
   34328           0 :                 PyErr_SetNdrError(err);
   34329           0 :                 return NULL;
   34330             :         }
   34331           0 :         if (!allow_remaining) {
   34332             :                 uint32_t highest_ofs;
   34333             : 
   34334           0 :                 if (pull->offset > pull->relative_highest_offset) {
   34335           0 :                         highest_ofs = pull->offset;
   34336             :                 } else {
   34337           0 :                         highest_ofs = pull->relative_highest_offset;
   34338             :                 }
   34339           0 :                 if (highest_ofs < pull->data_size) {
   34340           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   34341             :                                 "not all bytes consumed ofs[%u] size[%u]",
   34342             :                                 highest_ofs, pull->data_size);
   34343           0 :                         TALLOC_FREE(pull);
   34344           0 :                         PyErr_SetNdrError(err);
   34345           0 :                         return NULL;
   34346             :                 }
   34347             :         }
   34348             : 
   34349           0 :         TALLOC_FREE(pull);
   34350           0 :         Py_RETURN_NONE;
   34351             : }
   34352             : 
   34353           0 : static PyObject *py_netr_AccountDeltas_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34354             : {
   34355             :         DATA_BLOB blob;
   34356           0 :         Py_ssize_t blob_length = 0;
   34357           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   34358           0 :         PyObject *bigendian_obj = NULL;
   34359           0 :         PyObject *ndr64_obj = NULL;
   34360           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   34361           0 :         PyObject *allow_remaining_obj = NULL;
   34362           0 :         bool allow_remaining = false;
   34363             : 
   34364           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   34365             :                 discard_const_p(char *, kwnames),
   34366             :                 &blob.data, &blob_length,
   34367             :                 &bigendian_obj,
   34368             :                 &ndr64_obj,
   34369             :                 &allow_remaining_obj)) {
   34370           0 :                 return NULL;
   34371             :         }
   34372           0 :         blob.length = blob_length;
   34373             : 
   34374           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34375           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   34376             :         }
   34377           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34378           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   34379             :         }
   34380             : 
   34381           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   34382           0 :                 allow_remaining = true;
   34383             :         }
   34384             : 
   34385           0 :         return py_netr_AccountDeltas_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   34386             : }
   34387             : 
   34388           0 : static PyObject *py_netr_AccountDeltas_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34389             : {
   34390             :         DATA_BLOB blob;
   34391           0 :         Py_ssize_t blob_length = 0;
   34392           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   34393           0 :         PyObject *bigendian_obj = NULL;
   34394           0 :         PyObject *ndr64_obj = NULL;
   34395           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   34396           0 :         PyObject *allow_remaining_obj = NULL;
   34397           0 :         bool allow_remaining = false;
   34398             : 
   34399           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   34400             :                 discard_const_p(char *, kwnames),
   34401             :                 &blob.data, &blob_length,
   34402             :                 &bigendian_obj,
   34403             :                 &ndr64_obj,
   34404             :                 &allow_remaining_obj)) {
   34405           0 :                 return NULL;
   34406             :         }
   34407           0 :         blob.length = blob_length;
   34408             : 
   34409           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34410           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   34411             :         }
   34412           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34413           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   34414             :         }
   34415             : 
   34416           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   34417           0 :                 allow_remaining = true;
   34418             :         }
   34419             : 
   34420           0 :         return py_netr_AccountDeltas_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   34421             : }
   34422             : 
   34423           0 : static PyObject *py_netr_AccountDeltas_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   34424             : {
   34425           0 :         const struct ndr_interface_call *call = NULL;
   34426           0 :         struct netr_AccountDeltas *object = (struct netr_AccountDeltas *)pytalloc_get_ptr(py_obj);
   34427             :         PyObject *ret;
   34428             :         char *retstr;
   34429             : 
   34430           0 :         if (ndr_table_netlogon.num_calls < 10) {
   34431           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_AccountDeltas_ndr_print");
   34432           0 :                 return NULL;
   34433             :         }
   34434           0 :         call = &ndr_table_netlogon.calls[9];
   34435             : 
   34436           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   34437           0 :         ret = PyUnicode_FromString(retstr);
   34438           0 :         TALLOC_FREE(retstr);
   34439             : 
   34440           0 :         return ret;
   34441             : }
   34442             : 
   34443           0 : static PyObject *py_netr_AccountDeltas_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   34444             : {
   34445           0 :         return py_netr_AccountDeltas_ndr_print(py_obj, "netr_AccountDeltas_in", NDR_IN);
   34446             : }
   34447             : 
   34448           0 : static PyObject *py_netr_AccountDeltas_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   34449             : {
   34450           0 :         return py_netr_AccountDeltas_ndr_print(py_obj, "netr_AccountDeltas_out", NDR_OUT);
   34451             : }
   34452             : 
   34453             : static PyMethodDef py_netr_AccountDeltas_methods[] = {
   34454             :         { "opnum", (PyCFunction)py_netr_AccountDeltas_ndr_opnum, METH_NOARGS|METH_CLASS,
   34455             :                 "netlogon.netr_AccountDeltas.opnum() -> 9 (0x09) " },
   34456             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountDeltas_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   34457             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   34458             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountDeltas_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   34459             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   34460             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountDeltas_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   34461             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   34462             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountDeltas_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   34463             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   34464             :         { "__ndr_print_in__", (PyCFunction)py_netr_AccountDeltas_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   34465             :         { "__ndr_print_out__", (PyCFunction)py_netr_AccountDeltas_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   34466             :         { NULL, NULL, 0, NULL }
   34467             : };
   34468             : 
   34469             : 
   34470             : static PyTypeObject netr_AccountDeltas_Type = {
   34471             :         PyVarObject_HEAD_INIT(NULL, 0)
   34472             :         .tp_name = "netlogon.netr_AccountDeltas",
   34473             :         .tp_getset = py_netr_AccountDeltas_getsetters,
   34474             :         .tp_methods = py_netr_AccountDeltas_methods,
   34475             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   34476             :         .tp_new = py_netr_AccountDeltas_new,
   34477             : };
   34478             : 
   34479           0 : static bool pack_py_netr_AccountDeltas_args_in(PyObject *args, PyObject *kwargs, struct netr_AccountDeltas *r)
   34480             : {
   34481             :         PyObject *py_logon_server;
   34482             :         PyObject *py_computername;
   34483             :         PyObject *py_credential;
   34484             :         PyObject *py_return_authenticator;
   34485             :         PyObject *py_uas;
   34486             :         PyObject *py_count;
   34487             :         PyObject *py_level;
   34488             :         PyObject *py_buffersize;
   34489           0 :         const char *kwnames[] = {
   34490             :                 "logon_server", "computername", "credential", "return_authenticator", "uas", "count", "level", "buffersize", NULL
   34491             :         };
   34492             : 
   34493           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)) {
   34494           0 :                 return false;
   34495             :         }
   34496             : 
   34497           0 :         if (py_logon_server == NULL) {
   34498           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_server");
   34499           0 :                 return false;
   34500             :         }
   34501           0 :         if (py_logon_server == Py_None) {
   34502           0 :                 r->in.logon_server = NULL;
   34503             :         } else {
   34504           0 :                 r->in.logon_server = NULL;
   34505             :                 {
   34506             :                         const char *test_str;
   34507             :                         const char *talloc_str;
   34508           0 :                         PyObject *unicode = NULL;
   34509           0 :                         if (PyUnicode_Check(py_logon_server)) {
   34510           0 :                                 unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   34511           0 :                                 if (unicode == NULL) {
   34512           0 :                                         PyErr_NoMemory();
   34513           0 :                                         return false;
   34514             :                                 }
   34515           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   34516           0 :                         } else if (PyBytes_Check(py_logon_server)) {
   34517           0 :                                 test_str = PyBytes_AS_STRING(py_logon_server);
   34518             :                         } else {
   34519           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   34520           0 :                                 return false;
   34521             :                         }
   34522           0 :                         talloc_str = talloc_strdup(r, test_str);
   34523           0 :                         if (unicode != NULL) {
   34524           0 :                                 Py_DECREF(unicode);
   34525             :                         }
   34526           0 :                         if (talloc_str == NULL) {
   34527           0 :                                 PyErr_NoMemory();
   34528           0 :                                 return false;
   34529             :                         }
   34530           0 :                         r->in.logon_server = talloc_str;
   34531             :                 }
   34532             :         }
   34533           0 :         if (py_computername == NULL) {
   34534           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computername");
   34535           0 :                 return false;
   34536             :         }
   34537           0 :         r->in.computername = talloc_ptrtype(r, r->in.computername);
   34538           0 :         if (r->in.computername == NULL) {
   34539           0 :                 PyErr_NoMemory();
   34540           0 :                 return false;
   34541             :         }
   34542             :         {
   34543             :                 const char *test_str;
   34544             :                 const char *talloc_str;
   34545           0 :                 PyObject *unicode = NULL;
   34546           0 :                 if (PyUnicode_Check(py_computername)) {
   34547           0 :                         unicode = PyUnicode_AsEncodedString(py_computername, "utf-8", "ignore");
   34548           0 :                         if (unicode == NULL) {
   34549           0 :                                 PyErr_NoMemory();
   34550           0 :                                 return false;
   34551             :                         }
   34552           0 :                         test_str = PyBytes_AS_STRING(unicode);
   34553           0 :                 } else if (PyBytes_Check(py_computername)) {
   34554           0 :                         test_str = PyBytes_AS_STRING(py_computername);
   34555             :                 } else {
   34556           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computername)->tp_name);
   34557           0 :                         return false;
   34558             :                 }
   34559           0 :                 talloc_str = talloc_strdup(r, test_str);
   34560           0 :                 if (unicode != NULL) {
   34561           0 :                         Py_DECREF(unicode);
   34562             :                 }
   34563           0 :                 if (talloc_str == NULL) {
   34564           0 :                         PyErr_NoMemory();
   34565           0 :                         return false;
   34566             :                 }
   34567           0 :                 r->in.computername = talloc_str;
   34568             :         }
   34569           0 :         if (py_credential == NULL) {
   34570           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   34571           0 :                 return false;
   34572             :         }
   34573           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   34574           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   34575           0 :                 PyErr_NoMemory();
   34576           0 :                 return false;
   34577             :         }
   34578           0 :         r->in.credential = *(struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   34579           0 :         if (py_return_authenticator == NULL) {
   34580           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.return_authenticator");
   34581           0 :                 return false;
   34582             :         }
   34583           0 :         r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
   34584           0 :         if (r->in.return_authenticator == NULL) {
   34585           0 :                 PyErr_NoMemory();
   34586           0 :                 return false;
   34587             :         }
   34588           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   34589           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   34590           0 :                 PyErr_NoMemory();
   34591           0 :                 return false;
   34592             :         }
   34593           0 :         r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   34594           0 :         if (py_uas == NULL) {
   34595           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.uas");
   34596           0 :                 return false;
   34597             :         }
   34598           0 :         PY_CHECK_TYPE(&netr_UAS_INFO_0_Type, py_uas, return false;);
   34599           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_uas)) == NULL) {
   34600           0 :                 PyErr_NoMemory();
   34601           0 :                 return false;
   34602             :         }
   34603           0 :         r->in.uas = *(struct netr_UAS_INFO_0 *)pytalloc_get_ptr(py_uas);
   34604           0 :         if (py_count == NULL) {
   34605           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.count");
   34606           0 :                 return false;
   34607             :         }
   34608             :         {
   34609           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.count));
   34610           0 :                 if (PyLong_Check(py_count)) {
   34611             :                         unsigned long long test_var;
   34612           0 :                         test_var = PyLong_AsUnsignedLongLong(py_count);
   34613           0 :                         if (PyErr_Occurred() != NULL) {
   34614           0 :                                 return false;
   34615             :                         }
   34616           0 :                         if (test_var > uint_max) {
   34617           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   34618             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34619           0 :                                 return false;
   34620             :                         }
   34621           0 :                         r->in.count = test_var;
   34622             :                 } else {
   34623           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   34624             :                           PyLong_Type.tp_name);
   34625           0 :                         return false;
   34626             :                 }
   34627             :         }
   34628           0 :         if (py_level == NULL) {
   34629           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   34630           0 :                 return false;
   34631             :         }
   34632             :         {
   34633           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   34634           0 :                 if (PyLong_Check(py_level)) {
   34635             :                         unsigned long long test_var;
   34636           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   34637           0 :                         if (PyErr_Occurred() != NULL) {
   34638           0 :                                 return false;
   34639             :                         }
   34640           0 :                         if (test_var > uint_max) {
   34641           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   34642             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34643           0 :                                 return false;
   34644             :                         }
   34645           0 :                         r->in.level = test_var;
   34646             :                 } else {
   34647           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   34648             :                           PyLong_Type.tp_name);
   34649           0 :                         return false;
   34650             :                 }
   34651             :         }
   34652           0 :         if (py_buffersize == NULL) {
   34653           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.buffersize");
   34654           0 :                 return false;
   34655             :         }
   34656             :         {
   34657           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.buffersize));
   34658           0 :                 if (PyLong_Check(py_buffersize)) {
   34659             :                         unsigned long long test_var;
   34660           0 :                         test_var = PyLong_AsUnsignedLongLong(py_buffersize);
   34661           0 :                         if (PyErr_Occurred() != NULL) {
   34662           0 :                                 return false;
   34663             :                         }
   34664           0 :                         if (test_var > uint_max) {
   34665           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   34666             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34667           0 :                                 return false;
   34668             :                         }
   34669           0 :                         r->in.buffersize = test_var;
   34670             :                 } else {
   34671           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   34672             :                           PyLong_Type.tp_name);
   34673           0 :                         return false;
   34674             :                 }
   34675             :         }
   34676           0 :         return true;
   34677             : }
   34678             : 
   34679           0 : static PyObject *unpack_py_netr_AccountDeltas_args_out(struct netr_AccountDeltas *r)
   34680             : {
   34681             :         PyObject *result;
   34682             :         PyObject *py_return_authenticator;
   34683             :         PyObject *py_buffer;
   34684             :         PyObject *py_count_returned;
   34685             :         PyObject *py_total_entries;
   34686             :         PyObject *py_recordid;
   34687           0 :         result = PyTuple_New(5);
   34688           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   34689           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   34690           0 :         py_buffer = pytalloc_reference_ex(&netr_AccountBuffer_Type, r->out.buffer, r->out.buffer);
   34691           0 :         PyTuple_SetItem(result, 1, py_buffer);
   34692           0 :         py_count_returned = PyLong_FromUnsignedLongLong((uint32_t)*r->out.count_returned);
   34693           0 :         PyTuple_SetItem(result, 2, py_count_returned);
   34694           0 :         py_total_entries = PyLong_FromUnsignedLongLong((uint32_t)*r->out.total_entries);
   34695           0 :         PyTuple_SetItem(result, 3, py_total_entries);
   34696           0 :         py_recordid = pytalloc_reference_ex(&netr_UAS_INFO_0_Type, r->out.recordid, r->out.recordid);
   34697           0 :         PyTuple_SetItem(result, 4, py_recordid);
   34698           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   34699           0 :                 PyErr_SetNTSTATUS(r->out.result);
   34700           0 :                 return NULL;
   34701             :         }
   34702             : 
   34703           0 :         return result;
   34704             : }
   34705             : 
   34706             : 
   34707           0 : static PyObject *py_netr_AccountSync_in_get_logon_server(PyObject *obj, void *closure)
   34708             : {
   34709           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   34710             :         PyObject *py_logon_server;
   34711           0 :         if (object->in.logon_server == NULL) {
   34712           0 :                 Py_RETURN_NONE;
   34713             :         }
   34714           0 :         if (object->in.logon_server == NULL) {
   34715           0 :                 py_logon_server = Py_None;
   34716           0 :                 Py_INCREF(py_logon_server);
   34717             :         } else {
   34718           0 :                 if (object->in.logon_server == NULL) {
   34719           0 :                         py_logon_server = Py_None;
   34720           0 :                         Py_INCREF(py_logon_server);
   34721             :                 } else {
   34722           0 :                         py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   34723             :                 }
   34724             :         }
   34725           0 :         return py_logon_server;
   34726             : }
   34727             : 
   34728           0 : static int py_netr_AccountSync_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   34729             : {
   34730           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   34731           0 :         if (value == NULL) {
   34732           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_server");
   34733           0 :                 return -1;
   34734             :         }
   34735           0 :         if (value == Py_None) {
   34736           0 :                 object->in.logon_server = NULL;
   34737             :         } else {
   34738           0 :                 object->in.logon_server = NULL;
   34739             :                 {
   34740             :                         const char *test_str;
   34741             :                         const char *talloc_str;
   34742           0 :                         PyObject *unicode = NULL;
   34743           0 :                         if (PyUnicode_Check(value)) {
   34744           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   34745           0 :                                 if (unicode == NULL) {
   34746           0 :                                         PyErr_NoMemory();
   34747           0 :                                         return -1;
   34748             :                                 }
   34749           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   34750           0 :                         } else if (PyBytes_Check(value)) {
   34751           0 :                                 test_str = PyBytes_AS_STRING(value);
   34752             :                         } else {
   34753           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   34754           0 :                                 return -1;
   34755             :                         }
   34756           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   34757           0 :                         if (unicode != NULL) {
   34758           0 :                                 Py_DECREF(unicode);
   34759             :                         }
   34760           0 :                         if (talloc_str == NULL) {
   34761           0 :                                 PyErr_NoMemory();
   34762           0 :                                 return -1;
   34763             :                         }
   34764           0 :                         object->in.logon_server = talloc_str;
   34765             :                 }
   34766             :         }
   34767           0 :         return 0;
   34768             : }
   34769             : 
   34770           0 : static PyObject *py_netr_AccountSync_in_get_computername(PyObject *obj, void *closure)
   34771             : {
   34772           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   34773             :         PyObject *py_computername;
   34774           0 :         if (object->in.computername == NULL) {
   34775           0 :                 Py_RETURN_NONE;
   34776             :         }
   34777           0 :         if (object->in.computername == NULL) {
   34778           0 :                 py_computername = Py_None;
   34779           0 :                 Py_INCREF(py_computername);
   34780             :         } else {
   34781           0 :                 py_computername = PyUnicode_Decode(object->in.computername, strlen(object->in.computername), "utf-8", "ignore");
   34782             :         }
   34783           0 :         return py_computername;
   34784             : }
   34785             : 
   34786           0 : static int py_netr_AccountSync_in_set_computername(PyObject *py_obj, PyObject *value, void *closure)
   34787             : {
   34788           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   34789           0 :         if (value == NULL) {
   34790           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computername");
   34791           0 :                 return -1;
   34792             :         }
   34793           0 :         object->in.computername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computername);
   34794           0 :         if (object->in.computername == NULL) {
   34795           0 :                 PyErr_NoMemory();
   34796           0 :                 return -1;
   34797             :         }
   34798             :         {
   34799             :                 const char *test_str;
   34800             :                 const char *talloc_str;
   34801           0 :                 PyObject *unicode = NULL;
   34802           0 :                 if (PyUnicode_Check(value)) {
   34803           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   34804           0 :                         if (unicode == NULL) {
   34805           0 :                                 PyErr_NoMemory();
   34806           0 :                                 return -1;
   34807             :                         }
   34808           0 :                         test_str = PyBytes_AS_STRING(unicode);
   34809           0 :                 } else if (PyBytes_Check(value)) {
   34810           0 :                         test_str = PyBytes_AS_STRING(value);
   34811             :                 } else {
   34812           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   34813           0 :                         return -1;
   34814             :                 }
   34815           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   34816           0 :                 if (unicode != NULL) {
   34817           0 :                         Py_DECREF(unicode);
   34818             :                 }
   34819           0 :                 if (talloc_str == NULL) {
   34820           0 :                         PyErr_NoMemory();
   34821           0 :                         return -1;
   34822             :                 }
   34823           0 :                 object->in.computername = talloc_str;
   34824             :         }
   34825           0 :         return 0;
   34826             : }
   34827             : 
   34828           0 : static PyObject *py_netr_AccountSync_in_get_credential(PyObject *obj, void *closure)
   34829             : {
   34830           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   34831             :         PyObject *py_credential;
   34832           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, pytalloc_get_mem_ctx(obj), &object->in.credential);
   34833           0 :         return py_credential;
   34834             : }
   34835             : 
   34836           0 : static int py_netr_AccountSync_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   34837             : {
   34838           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   34839           0 :         if (value == NULL) {
   34840           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   34841           0 :                 return -1;
   34842             :         }
   34843           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   34844           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   34845           0 :                 PyErr_NoMemory();
   34846           0 :                 return -1;
   34847             :         }
   34848           0 :         object->in.credential = *(struct netr_Authenticator *)pytalloc_get_ptr(value);
   34849           0 :         return 0;
   34850             : }
   34851             : 
   34852           0 : static PyObject *py_netr_AccountSync_in_get_return_authenticator(PyObject *obj, void *closure)
   34853             : {
   34854           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   34855             :         PyObject *py_return_authenticator;
   34856           0 :         if (object->in.return_authenticator == NULL) {
   34857           0 :                 Py_RETURN_NONE;
   34858             :         }
   34859           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   34860           0 :         return py_return_authenticator;
   34861             : }
   34862             : 
   34863           0 : static int py_netr_AccountSync_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   34864             : {
   34865           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   34866           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   34867           0 :         if (value == NULL) {
   34868           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.return_authenticator");
   34869           0 :                 return -1;
   34870             :         }
   34871           0 :         object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
   34872           0 :         if (object->in.return_authenticator == NULL) {
   34873           0 :                 PyErr_NoMemory();
   34874           0 :                 return -1;
   34875             :         }
   34876           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   34877           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   34878           0 :                 PyErr_NoMemory();
   34879           0 :                 return -1;
   34880             :         }
   34881           0 :         object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   34882           0 :         return 0;
   34883             : }
   34884             : 
   34885           0 : static PyObject *py_netr_AccountSync_out_get_return_authenticator(PyObject *obj, void *closure)
   34886             : {
   34887           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   34888             :         PyObject *py_return_authenticator;
   34889           0 :         if (object->out.return_authenticator == NULL) {
   34890           0 :                 Py_RETURN_NONE;
   34891             :         }
   34892           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   34893           0 :         return py_return_authenticator;
   34894             : }
   34895             : 
   34896           0 : static int py_netr_AccountSync_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   34897             : {
   34898           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   34899           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   34900           0 :         if (value == NULL) {
   34901           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   34902           0 :                 return -1;
   34903             :         }
   34904           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   34905           0 :         if (object->out.return_authenticator == NULL) {
   34906           0 :                 PyErr_NoMemory();
   34907           0 :                 return -1;
   34908             :         }
   34909           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   34910           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   34911           0 :                 PyErr_NoMemory();
   34912           0 :                 return -1;
   34913             :         }
   34914           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   34915           0 :         return 0;
   34916             : }
   34917             : 
   34918           0 : static PyObject *py_netr_AccountSync_in_get_reference(PyObject *obj, void *closure)
   34919             : {
   34920           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   34921             :         PyObject *py_reference;
   34922           0 :         py_reference = PyLong_FromUnsignedLongLong((uint32_t)object->in.reference);
   34923           0 :         return py_reference;
   34924             : }
   34925             : 
   34926           0 : static int py_netr_AccountSync_in_set_reference(PyObject *py_obj, PyObject *value, void *closure)
   34927             : {
   34928           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   34929           0 :         if (value == NULL) {
   34930           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.reference");
   34931           0 :                 return -1;
   34932             :         }
   34933             :         {
   34934           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.reference));
   34935           0 :                 if (PyLong_Check(value)) {
   34936             :                         unsigned long long test_var;
   34937           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   34938           0 :                         if (PyErr_Occurred() != NULL) {
   34939           0 :                                 return -1;
   34940             :                         }
   34941           0 :                         if (test_var > uint_max) {
   34942           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   34943             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34944           0 :                                 return -1;
   34945             :                         }
   34946           0 :                         object->in.reference = test_var;
   34947             :                 } else {
   34948           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   34949             :                           PyLong_Type.tp_name);
   34950           0 :                         return -1;
   34951             :                 }
   34952             :         }
   34953           0 :         return 0;
   34954             : }
   34955             : 
   34956           0 : static PyObject *py_netr_AccountSync_in_get_level(PyObject *obj, void *closure)
   34957             : {
   34958           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   34959             :         PyObject *py_level;
   34960           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   34961           0 :         return py_level;
   34962             : }
   34963             : 
   34964           0 : static int py_netr_AccountSync_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   34965             : {
   34966           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   34967           0 :         if (value == NULL) {
   34968           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   34969           0 :                 return -1;
   34970             :         }
   34971             :         {
   34972           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   34973           0 :                 if (PyLong_Check(value)) {
   34974             :                         unsigned long long test_var;
   34975           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   34976           0 :                         if (PyErr_Occurred() != NULL) {
   34977           0 :                                 return -1;
   34978             :                         }
   34979           0 :                         if (test_var > uint_max) {
   34980           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   34981             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34982           0 :                                 return -1;
   34983             :                         }
   34984           0 :                         object->in.level = test_var;
   34985             :                 } else {
   34986           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   34987             :                           PyLong_Type.tp_name);
   34988           0 :                         return -1;
   34989             :                 }
   34990             :         }
   34991           0 :         return 0;
   34992             : }
   34993             : 
   34994           0 : static PyObject *py_netr_AccountSync_in_get_buffersize(PyObject *obj, void *closure)
   34995             : {
   34996           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   34997             :         PyObject *py_buffersize;
   34998           0 :         py_buffersize = PyLong_FromUnsignedLongLong((uint32_t)object->in.buffersize);
   34999           0 :         return py_buffersize;
   35000             : }
   35001             : 
   35002           0 : static int py_netr_AccountSync_in_set_buffersize(PyObject *py_obj, PyObject *value, void *closure)
   35003             : {
   35004           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35005           0 :         if (value == NULL) {
   35006           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.buffersize");
   35007           0 :                 return -1;
   35008             :         }
   35009             :         {
   35010           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.buffersize));
   35011           0 :                 if (PyLong_Check(value)) {
   35012             :                         unsigned long long test_var;
   35013           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   35014           0 :                         if (PyErr_Occurred() != NULL) {
   35015           0 :                                 return -1;
   35016             :                         }
   35017           0 :                         if (test_var > uint_max) {
   35018           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   35019             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35020           0 :                                 return -1;
   35021             :                         }
   35022           0 :                         object->in.buffersize = test_var;
   35023             :                 } else {
   35024           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   35025             :                           PyLong_Type.tp_name);
   35026           0 :                         return -1;
   35027             :                 }
   35028             :         }
   35029           0 :         return 0;
   35030             : }
   35031             : 
   35032           0 : static PyObject *py_netr_AccountSync_out_get_buffer(PyObject *obj, void *closure)
   35033             : {
   35034           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   35035             :         PyObject *py_buffer;
   35036           0 :         if (object->out.buffer == NULL) {
   35037           0 :                 Py_RETURN_NONE;
   35038             :         }
   35039           0 :         py_buffer = pytalloc_reference_ex(&netr_AccountBuffer_Type, object->out.buffer, object->out.buffer);
   35040           0 :         return py_buffer;
   35041             : }
   35042             : 
   35043           0 : static int py_netr_AccountSync_out_set_buffer(PyObject *py_obj, PyObject *value, void *closure)
   35044             : {
   35045           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35046           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.buffer));
   35047           0 :         if (value == NULL) {
   35048           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.buffer");
   35049           0 :                 return -1;
   35050             :         }
   35051           0 :         object->out.buffer = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.buffer);
   35052           0 :         if (object->out.buffer == NULL) {
   35053           0 :                 PyErr_NoMemory();
   35054           0 :                 return -1;
   35055             :         }
   35056           0 :         PY_CHECK_TYPE(&netr_AccountBuffer_Type, value, return -1;);
   35057           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   35058           0 :                 PyErr_NoMemory();
   35059           0 :                 return -1;
   35060             :         }
   35061           0 :         object->out.buffer = (struct netr_AccountBuffer *)pytalloc_get_ptr(value);
   35062           0 :         return 0;
   35063             : }
   35064             : 
   35065           0 : static PyObject *py_netr_AccountSync_out_get_count_returned(PyObject *obj, void *closure)
   35066             : {
   35067           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   35068             :         PyObject *py_count_returned;
   35069           0 :         if (object->out.count_returned == NULL) {
   35070           0 :                 Py_RETURN_NONE;
   35071             :         }
   35072           0 :         py_count_returned = PyLong_FromUnsignedLongLong((uint32_t)*object->out.count_returned);
   35073           0 :         return py_count_returned;
   35074             : }
   35075             : 
   35076           0 : static int py_netr_AccountSync_out_set_count_returned(PyObject *py_obj, PyObject *value, void *closure)
   35077             : {
   35078           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35079           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.count_returned));
   35080           0 :         if (value == NULL) {
   35081           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.count_returned");
   35082           0 :                 return -1;
   35083             :         }
   35084           0 :         object->out.count_returned = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.count_returned);
   35085           0 :         if (object->out.count_returned == NULL) {
   35086           0 :                 PyErr_NoMemory();
   35087           0 :                 return -1;
   35088             :         }
   35089             :         {
   35090           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.count_returned));
   35091           0 :                 if (PyLong_Check(value)) {
   35092             :                         unsigned long long test_var;
   35093           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   35094           0 :                         if (PyErr_Occurred() != NULL) {
   35095           0 :                                 return -1;
   35096             :                         }
   35097           0 :                         if (test_var > uint_max) {
   35098           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   35099             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35100           0 :                                 return -1;
   35101             :                         }
   35102           0 :                         *object->out.count_returned = test_var;
   35103             :                 } else {
   35104           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   35105             :                           PyLong_Type.tp_name);
   35106           0 :                         return -1;
   35107             :                 }
   35108             :         }
   35109           0 :         return 0;
   35110             : }
   35111             : 
   35112           0 : static PyObject *py_netr_AccountSync_out_get_total_entries(PyObject *obj, void *closure)
   35113             : {
   35114           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   35115             :         PyObject *py_total_entries;
   35116           0 :         if (object->out.total_entries == NULL) {
   35117           0 :                 Py_RETURN_NONE;
   35118             :         }
   35119           0 :         py_total_entries = PyLong_FromUnsignedLongLong((uint32_t)*object->out.total_entries);
   35120           0 :         return py_total_entries;
   35121             : }
   35122             : 
   35123           0 : static int py_netr_AccountSync_out_set_total_entries(PyObject *py_obj, PyObject *value, void *closure)
   35124             : {
   35125           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35126           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.total_entries));
   35127           0 :         if (value == NULL) {
   35128           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.total_entries");
   35129           0 :                 return -1;
   35130             :         }
   35131           0 :         object->out.total_entries = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.total_entries);
   35132           0 :         if (object->out.total_entries == NULL) {
   35133           0 :                 PyErr_NoMemory();
   35134           0 :                 return -1;
   35135             :         }
   35136             :         {
   35137           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.total_entries));
   35138           0 :                 if (PyLong_Check(value)) {
   35139             :                         unsigned long long test_var;
   35140           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   35141           0 :                         if (PyErr_Occurred() != NULL) {
   35142           0 :                                 return -1;
   35143             :                         }
   35144           0 :                         if (test_var > uint_max) {
   35145           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   35146             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35147           0 :                                 return -1;
   35148             :                         }
   35149           0 :                         *object->out.total_entries = test_var;
   35150             :                 } else {
   35151           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   35152             :                           PyLong_Type.tp_name);
   35153           0 :                         return -1;
   35154             :                 }
   35155             :         }
   35156           0 :         return 0;
   35157             : }
   35158             : 
   35159           0 : static PyObject *py_netr_AccountSync_out_get_next_reference(PyObject *obj, void *closure)
   35160             : {
   35161           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   35162             :         PyObject *py_next_reference;
   35163           0 :         if (object->out.next_reference == NULL) {
   35164           0 :                 Py_RETURN_NONE;
   35165             :         }
   35166           0 :         py_next_reference = PyLong_FromUnsignedLongLong((uint32_t)*object->out.next_reference);
   35167           0 :         return py_next_reference;
   35168             : }
   35169             : 
   35170           0 : static int py_netr_AccountSync_out_set_next_reference(PyObject *py_obj, PyObject *value, void *closure)
   35171             : {
   35172           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35173           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.next_reference));
   35174           0 :         if (value == NULL) {
   35175           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.next_reference");
   35176           0 :                 return -1;
   35177             :         }
   35178           0 :         object->out.next_reference = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.next_reference);
   35179           0 :         if (object->out.next_reference == NULL) {
   35180           0 :                 PyErr_NoMemory();
   35181           0 :                 return -1;
   35182             :         }
   35183             :         {
   35184           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.next_reference));
   35185           0 :                 if (PyLong_Check(value)) {
   35186             :                         unsigned long long test_var;
   35187           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   35188           0 :                         if (PyErr_Occurred() != NULL) {
   35189           0 :                                 return -1;
   35190             :                         }
   35191           0 :                         if (test_var > uint_max) {
   35192           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   35193             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35194           0 :                                 return -1;
   35195             :                         }
   35196           0 :                         *object->out.next_reference = test_var;
   35197             :                 } else {
   35198           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   35199             :                           PyLong_Type.tp_name);
   35200           0 :                         return -1;
   35201             :                 }
   35202             :         }
   35203           0 :         return 0;
   35204             : }
   35205             : 
   35206           0 : static PyObject *py_netr_AccountSync_in_get_recordid(PyObject *obj, void *closure)
   35207             : {
   35208           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   35209             :         PyObject *py_recordid;
   35210           0 :         if (object->in.recordid == NULL) {
   35211           0 :                 Py_RETURN_NONE;
   35212             :         }
   35213           0 :         py_recordid = pytalloc_reference_ex(&netr_UAS_INFO_0_Type, object->in.recordid, object->in.recordid);
   35214           0 :         return py_recordid;
   35215             : }
   35216             : 
   35217           0 : static int py_netr_AccountSync_in_set_recordid(PyObject *py_obj, PyObject *value, void *closure)
   35218             : {
   35219           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35220           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.recordid));
   35221           0 :         if (value == NULL) {
   35222           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.recordid");
   35223           0 :                 return -1;
   35224             :         }
   35225           0 :         object->in.recordid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.recordid);
   35226           0 :         if (object->in.recordid == NULL) {
   35227           0 :                 PyErr_NoMemory();
   35228           0 :                 return -1;
   35229             :         }
   35230           0 :         PY_CHECK_TYPE(&netr_UAS_INFO_0_Type, value, return -1;);
   35231           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   35232           0 :                 PyErr_NoMemory();
   35233           0 :                 return -1;
   35234             :         }
   35235           0 :         object->in.recordid = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(value);
   35236           0 :         return 0;
   35237             : }
   35238             : 
   35239           0 : static PyObject *py_netr_AccountSync_out_get_recordid(PyObject *obj, void *closure)
   35240             : {
   35241           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   35242             :         PyObject *py_recordid;
   35243           0 :         if (object->out.recordid == NULL) {
   35244           0 :                 Py_RETURN_NONE;
   35245             :         }
   35246           0 :         py_recordid = pytalloc_reference_ex(&netr_UAS_INFO_0_Type, object->out.recordid, object->out.recordid);
   35247           0 :         return py_recordid;
   35248             : }
   35249             : 
   35250           0 : static int py_netr_AccountSync_out_set_recordid(PyObject *py_obj, PyObject *value, void *closure)
   35251             : {
   35252           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35253           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.recordid));
   35254           0 :         if (value == NULL) {
   35255           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.recordid");
   35256           0 :                 return -1;
   35257             :         }
   35258           0 :         object->out.recordid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.recordid);
   35259           0 :         if (object->out.recordid == NULL) {
   35260           0 :                 PyErr_NoMemory();
   35261           0 :                 return -1;
   35262             :         }
   35263           0 :         PY_CHECK_TYPE(&netr_UAS_INFO_0_Type, value, return -1;);
   35264           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   35265           0 :                 PyErr_NoMemory();
   35266           0 :                 return -1;
   35267             :         }
   35268           0 :         object->out.recordid = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(value);
   35269           0 :         return 0;
   35270             : }
   35271             : 
   35272           0 : static PyObject *py_netr_AccountSync_get_result(PyObject *obj, void *closure)
   35273             : {
   35274           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(obj);
   35275             :         PyObject *py_result;
   35276           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   35277           0 :         return py_result;
   35278             : }
   35279             : 
   35280           0 : static int py_netr_AccountSync_set_result(PyObject *py_obj, PyObject *value, void *closure)
   35281             : {
   35282           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35283           0 :         if (value == NULL) {
   35284           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   35285           0 :                 return -1;
   35286             :         }
   35287           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   35288           0 :         return 0;
   35289             : }
   35290             : 
   35291             : static PyGetSetDef py_netr_AccountSync_getsetters[] = {
   35292             :         {
   35293             :                 .name = discard_const_p(char, "in_logon_server"),
   35294             :                 .get = py_netr_AccountSync_in_get_logon_server,
   35295             :                 .set = py_netr_AccountSync_in_set_logon_server,
   35296             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   35297             :         },
   35298             :         {
   35299             :                 .name = discard_const_p(char, "in_computername"),
   35300             :                 .get = py_netr_AccountSync_in_get_computername,
   35301             :                 .set = py_netr_AccountSync_in_set_computername,
   35302             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   35303             :         },
   35304             :         {
   35305             :                 .name = discard_const_p(char, "in_credential"),
   35306             :                 .get = py_netr_AccountSync_in_get_credential,
   35307             :                 .set = py_netr_AccountSync_in_set_credential,
   35308             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   35309             :         },
   35310             :         {
   35311             :                 .name = discard_const_p(char, "in_return_authenticator"),
   35312             :                 .get = py_netr_AccountSync_in_get_return_authenticator,
   35313             :                 .set = py_netr_AccountSync_in_set_return_authenticator,
   35314             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   35315             :         },
   35316             :         {
   35317             :                 .name = discard_const_p(char, "out_return_authenticator"),
   35318             :                 .get = py_netr_AccountSync_out_get_return_authenticator,
   35319             :                 .set = py_netr_AccountSync_out_set_return_authenticator,
   35320             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   35321             :         },
   35322             :         {
   35323             :                 .name = discard_const_p(char, "in_reference"),
   35324             :                 .get = py_netr_AccountSync_in_get_reference,
   35325             :                 .set = py_netr_AccountSync_in_set_reference,
   35326             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35327             :         },
   35328             :         {
   35329             :                 .name = discard_const_p(char, "in_level"),
   35330             :                 .get = py_netr_AccountSync_in_get_level,
   35331             :                 .set = py_netr_AccountSync_in_set_level,
   35332             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35333             :         },
   35334             :         {
   35335             :                 .name = discard_const_p(char, "in_buffersize"),
   35336             :                 .get = py_netr_AccountSync_in_get_buffersize,
   35337             :                 .set = py_netr_AccountSync_in_set_buffersize,
   35338             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35339             :         },
   35340             :         {
   35341             :                 .name = discard_const_p(char, "out_buffer"),
   35342             :                 .get = py_netr_AccountSync_out_get_buffer,
   35343             :                 .set = py_netr_AccountSync_out_set_buffer,
   35344             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_AccountBuffer")
   35345             :         },
   35346             :         {
   35347             :                 .name = discard_const_p(char, "out_count_returned"),
   35348             :                 .get = py_netr_AccountSync_out_get_count_returned,
   35349             :                 .set = py_netr_AccountSync_out_set_count_returned,
   35350             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35351             :         },
   35352             :         {
   35353             :                 .name = discard_const_p(char, "out_total_entries"),
   35354             :                 .get = py_netr_AccountSync_out_get_total_entries,
   35355             :                 .set = py_netr_AccountSync_out_set_total_entries,
   35356             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35357             :         },
   35358             :         {
   35359             :                 .name = discard_const_p(char, "out_next_reference"),
   35360             :                 .get = py_netr_AccountSync_out_get_next_reference,
   35361             :                 .set = py_netr_AccountSync_out_set_next_reference,
   35362             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35363             :         },
   35364             :         {
   35365             :                 .name = discard_const_p(char, "in_recordid"),
   35366             :                 .get = py_netr_AccountSync_in_get_recordid,
   35367             :                 .set = py_netr_AccountSync_in_set_recordid,
   35368             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UAS_INFO_0")
   35369             :         },
   35370             :         {
   35371             :                 .name = discard_const_p(char, "out_recordid"),
   35372             :                 .get = py_netr_AccountSync_out_get_recordid,
   35373             :                 .set = py_netr_AccountSync_out_set_recordid,
   35374             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_UAS_INFO_0")
   35375             :         },
   35376             :         {
   35377             :                 .name = discard_const_p(char, "result"),
   35378             :                 .get = py_netr_AccountSync_get_result,
   35379             :                 .set = py_netr_AccountSync_set_result,
   35380             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   35381             :         },
   35382             :         { .name = NULL }
   35383             : };
   35384             : 
   35385           0 : static PyObject *py_netr_AccountSync_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   35386             : {
   35387           0 :         PyObject *self = pytalloc_new(struct netr_AccountSync, type);
   35388           0 :         struct netr_AccountSync *_self = (struct netr_AccountSync *)pytalloc_get_ptr(self);
   35389           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   35390           0 :         _self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   35391           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   35392           0 :         _self->out.buffer = talloc_zero(mem_ctx, struct netr_AccountBuffer);
   35393           0 :         _self->out.count_returned = talloc_zero(mem_ctx, uint32_t);
   35394           0 :         _self->out.total_entries = talloc_zero(mem_ctx, uint32_t);
   35395           0 :         _self->out.next_reference = talloc_zero(mem_ctx, uint32_t);
   35396           0 :         _self->in.recordid = talloc_zero(mem_ctx, struct netr_UAS_INFO_0);
   35397           0 :         _self->out.recordid = talloc_zero(mem_ctx, struct netr_UAS_INFO_0);
   35398           0 :         return self;
   35399             : }
   35400             : 
   35401           0 : static PyObject *py_netr_AccountSync_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   35402             : {
   35403             : 
   35404             : 
   35405           0 :         return PyLong_FromLong(10);
   35406             : }
   35407             : 
   35408           0 : static PyObject *py_netr_AccountSync_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   35409             : {
   35410           0 :         const struct ndr_interface_call *call = NULL;
   35411           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35412           0 :         PyObject *ret = NULL;
   35413           0 :         struct ndr_push *push = NULL;
   35414             :         DATA_BLOB blob;
   35415             :         enum ndr_err_code err;
   35416             : 
   35417           0 :         if (ndr_table_netlogon.num_calls < 11) {
   35418           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_AccountSync_ndr_pack");
   35419           0 :                 return NULL;
   35420             :         }
   35421           0 :         call = &ndr_table_netlogon.calls[10];
   35422             : 
   35423           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   35424           0 :         if (push == NULL) {
   35425           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   35426           0 :                 return NULL;
   35427             :         }
   35428             : 
   35429           0 :         push->flags |= ndr_push_flags;
   35430             : 
   35431           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   35432           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   35433           0 :                 TALLOC_FREE(push);
   35434           0 :                 PyErr_SetNdrError(err);
   35435           0 :                 return NULL;
   35436             :         }
   35437           0 :         blob = ndr_push_blob(push);
   35438           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   35439           0 :         TALLOC_FREE(push);
   35440           0 :         return ret;
   35441             : }
   35442             : 
   35443           0 : static PyObject *py_netr_AccountSync_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35444             : {
   35445           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   35446           0 :         PyObject *bigendian_obj = NULL;
   35447           0 :         PyObject *ndr64_obj = NULL;
   35448           0 :         uint32_t ndr_push_flags = 0;
   35449             : 
   35450           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   35451             :                 discard_const_p(char *, kwnames),
   35452             :                 &bigendian_obj,
   35453             :                 &ndr64_obj)) {
   35454           0 :                 return NULL;
   35455             :         }
   35456             : 
   35457           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35458           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   35459             :         }
   35460           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35461           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   35462             :         }
   35463             : 
   35464           0 :         return py_netr_AccountSync_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   35465             : }
   35466             : 
   35467           0 : static PyObject *py_netr_AccountSync_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35468             : {
   35469           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   35470           0 :         PyObject *bigendian_obj = NULL;
   35471           0 :         PyObject *ndr64_obj = NULL;
   35472           0 :         uint32_t ndr_push_flags = 0;
   35473             : 
   35474           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   35475             :                 discard_const_p(char *, kwnames),
   35476             :                 &bigendian_obj,
   35477             :                 &ndr64_obj)) {
   35478           0 :                 return NULL;
   35479             :         }
   35480             : 
   35481           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35482           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   35483             :         }
   35484           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35485           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   35486             :         }
   35487             : 
   35488           0 :         return py_netr_AccountSync_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   35489             : }
   35490             : 
   35491           0 : static PyObject *py_netr_AccountSync_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   35492             : {
   35493           0 :         const struct ndr_interface_call *call = NULL;
   35494           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35495           0 :         struct ndr_pull *pull = NULL;
   35496             :         enum ndr_err_code err;
   35497             : 
   35498           0 :         if (ndr_table_netlogon.num_calls < 11) {
   35499           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_AccountSync_ndr_unpack");
   35500           0 :                 return NULL;
   35501             :         }
   35502           0 :         call = &ndr_table_netlogon.calls[10];
   35503             : 
   35504           0 :         pull = ndr_pull_init_blob(blob, object);
   35505           0 :         if (pull == NULL) {
   35506           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   35507           0 :                 return NULL;
   35508             :         }
   35509             : 
   35510           0 :         pull->flags |= ndr_pull_flags;
   35511             : 
   35512           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   35513           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   35514           0 :                 TALLOC_FREE(pull);
   35515           0 :                 PyErr_SetNdrError(err);
   35516           0 :                 return NULL;
   35517             :         }
   35518           0 :         if (!allow_remaining) {
   35519             :                 uint32_t highest_ofs;
   35520             : 
   35521           0 :                 if (pull->offset > pull->relative_highest_offset) {
   35522           0 :                         highest_ofs = pull->offset;
   35523             :                 } else {
   35524           0 :                         highest_ofs = pull->relative_highest_offset;
   35525             :                 }
   35526           0 :                 if (highest_ofs < pull->data_size) {
   35527           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   35528             :                                 "not all bytes consumed ofs[%u] size[%u]",
   35529             :                                 highest_ofs, pull->data_size);
   35530           0 :                         TALLOC_FREE(pull);
   35531           0 :                         PyErr_SetNdrError(err);
   35532           0 :                         return NULL;
   35533             :                 }
   35534             :         }
   35535             : 
   35536           0 :         TALLOC_FREE(pull);
   35537           0 :         Py_RETURN_NONE;
   35538             : }
   35539             : 
   35540           0 : static PyObject *py_netr_AccountSync_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35541             : {
   35542             :         DATA_BLOB blob;
   35543           0 :         Py_ssize_t blob_length = 0;
   35544           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   35545           0 :         PyObject *bigendian_obj = NULL;
   35546           0 :         PyObject *ndr64_obj = NULL;
   35547           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   35548           0 :         PyObject *allow_remaining_obj = NULL;
   35549           0 :         bool allow_remaining = false;
   35550             : 
   35551           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   35552             :                 discard_const_p(char *, kwnames),
   35553             :                 &blob.data, &blob_length,
   35554             :                 &bigendian_obj,
   35555             :                 &ndr64_obj,
   35556             :                 &allow_remaining_obj)) {
   35557           0 :                 return NULL;
   35558             :         }
   35559           0 :         blob.length = blob_length;
   35560             : 
   35561           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35562           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   35563             :         }
   35564           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35565           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   35566             :         }
   35567             : 
   35568           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   35569           0 :                 allow_remaining = true;
   35570             :         }
   35571             : 
   35572           0 :         return py_netr_AccountSync_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   35573             : }
   35574             : 
   35575           0 : static PyObject *py_netr_AccountSync_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35576             : {
   35577             :         DATA_BLOB blob;
   35578           0 :         Py_ssize_t blob_length = 0;
   35579           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   35580           0 :         PyObject *bigendian_obj = NULL;
   35581           0 :         PyObject *ndr64_obj = NULL;
   35582           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   35583           0 :         PyObject *allow_remaining_obj = NULL;
   35584           0 :         bool allow_remaining = false;
   35585             : 
   35586           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   35587             :                 discard_const_p(char *, kwnames),
   35588             :                 &blob.data, &blob_length,
   35589             :                 &bigendian_obj,
   35590             :                 &ndr64_obj,
   35591             :                 &allow_remaining_obj)) {
   35592           0 :                 return NULL;
   35593             :         }
   35594           0 :         blob.length = blob_length;
   35595             : 
   35596           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35597           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   35598             :         }
   35599           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35600           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   35601             :         }
   35602             : 
   35603           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   35604           0 :                 allow_remaining = true;
   35605             :         }
   35606             : 
   35607           0 :         return py_netr_AccountSync_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   35608             : }
   35609             : 
   35610           0 : static PyObject *py_netr_AccountSync_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   35611             : {
   35612           0 :         const struct ndr_interface_call *call = NULL;
   35613           0 :         struct netr_AccountSync *object = (struct netr_AccountSync *)pytalloc_get_ptr(py_obj);
   35614             :         PyObject *ret;
   35615             :         char *retstr;
   35616             : 
   35617           0 :         if (ndr_table_netlogon.num_calls < 11) {
   35618           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_AccountSync_ndr_print");
   35619           0 :                 return NULL;
   35620             :         }
   35621           0 :         call = &ndr_table_netlogon.calls[10];
   35622             : 
   35623           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   35624           0 :         ret = PyUnicode_FromString(retstr);
   35625           0 :         TALLOC_FREE(retstr);
   35626             : 
   35627           0 :         return ret;
   35628             : }
   35629             : 
   35630           0 : static PyObject *py_netr_AccountSync_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   35631             : {
   35632           0 :         return py_netr_AccountSync_ndr_print(py_obj, "netr_AccountSync_in", NDR_IN);
   35633             : }
   35634             : 
   35635           0 : static PyObject *py_netr_AccountSync_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   35636             : {
   35637           0 :         return py_netr_AccountSync_ndr_print(py_obj, "netr_AccountSync_out", NDR_OUT);
   35638             : }
   35639             : 
   35640             : static PyMethodDef py_netr_AccountSync_methods[] = {
   35641             :         { "opnum", (PyCFunction)py_netr_AccountSync_ndr_opnum, METH_NOARGS|METH_CLASS,
   35642             :                 "netlogon.netr_AccountSync.opnum() -> 10 (0x0a) " },
   35643             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountSync_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   35644             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   35645             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountSync_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   35646             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   35647             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountSync_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   35648             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   35649             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_AccountSync_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   35650             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   35651             :         { "__ndr_print_in__", (PyCFunction)py_netr_AccountSync_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   35652             :         { "__ndr_print_out__", (PyCFunction)py_netr_AccountSync_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   35653             :         { NULL, NULL, 0, NULL }
   35654             : };
   35655             : 
   35656             : 
   35657             : static PyTypeObject netr_AccountSync_Type = {
   35658             :         PyVarObject_HEAD_INIT(NULL, 0)
   35659             :         .tp_name = "netlogon.netr_AccountSync",
   35660             :         .tp_getset = py_netr_AccountSync_getsetters,
   35661             :         .tp_methods = py_netr_AccountSync_methods,
   35662             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   35663             :         .tp_new = py_netr_AccountSync_new,
   35664             : };
   35665             : 
   35666           0 : static bool pack_py_netr_AccountSync_args_in(PyObject *args, PyObject *kwargs, struct netr_AccountSync *r)
   35667             : {
   35668             :         PyObject *py_logon_server;
   35669             :         PyObject *py_computername;
   35670             :         PyObject *py_credential;
   35671             :         PyObject *py_return_authenticator;
   35672             :         PyObject *py_reference;
   35673             :         PyObject *py_level;
   35674             :         PyObject *py_buffersize;
   35675             :         PyObject *py_recordid;
   35676           0 :         const char *kwnames[] = {
   35677             :                 "logon_server", "computername", "credential", "return_authenticator", "reference", "level", "buffersize", "recordid", NULL
   35678             :         };
   35679             : 
   35680           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)) {
   35681           0 :                 return false;
   35682             :         }
   35683             : 
   35684           0 :         if (py_logon_server == NULL) {
   35685           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_server");
   35686           0 :                 return false;
   35687             :         }
   35688           0 :         if (py_logon_server == Py_None) {
   35689           0 :                 r->in.logon_server = NULL;
   35690             :         } else {
   35691           0 :                 r->in.logon_server = NULL;
   35692             :                 {
   35693             :                         const char *test_str;
   35694             :                         const char *talloc_str;
   35695           0 :                         PyObject *unicode = NULL;
   35696           0 :                         if (PyUnicode_Check(py_logon_server)) {
   35697           0 :                                 unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   35698           0 :                                 if (unicode == NULL) {
   35699           0 :                                         PyErr_NoMemory();
   35700           0 :                                         return false;
   35701             :                                 }
   35702           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   35703           0 :                         } else if (PyBytes_Check(py_logon_server)) {
   35704           0 :                                 test_str = PyBytes_AS_STRING(py_logon_server);
   35705             :                         } else {
   35706           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   35707           0 :                                 return false;
   35708             :                         }
   35709           0 :                         talloc_str = talloc_strdup(r, test_str);
   35710           0 :                         if (unicode != NULL) {
   35711           0 :                                 Py_DECREF(unicode);
   35712             :                         }
   35713           0 :                         if (talloc_str == NULL) {
   35714           0 :                                 PyErr_NoMemory();
   35715           0 :                                 return false;
   35716             :                         }
   35717           0 :                         r->in.logon_server = talloc_str;
   35718             :                 }
   35719             :         }
   35720           0 :         if (py_computername == NULL) {
   35721           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computername");
   35722           0 :                 return false;
   35723             :         }
   35724           0 :         r->in.computername = talloc_ptrtype(r, r->in.computername);
   35725           0 :         if (r->in.computername == NULL) {
   35726           0 :                 PyErr_NoMemory();
   35727           0 :                 return false;
   35728             :         }
   35729             :         {
   35730             :                 const char *test_str;
   35731             :                 const char *talloc_str;
   35732           0 :                 PyObject *unicode = NULL;
   35733           0 :                 if (PyUnicode_Check(py_computername)) {
   35734           0 :                         unicode = PyUnicode_AsEncodedString(py_computername, "utf-8", "ignore");
   35735           0 :                         if (unicode == NULL) {
   35736           0 :                                 PyErr_NoMemory();
   35737           0 :                                 return false;
   35738             :                         }
   35739           0 :                         test_str = PyBytes_AS_STRING(unicode);
   35740           0 :                 } else if (PyBytes_Check(py_computername)) {
   35741           0 :                         test_str = PyBytes_AS_STRING(py_computername);
   35742             :                 } else {
   35743           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computername)->tp_name);
   35744           0 :                         return false;
   35745             :                 }
   35746           0 :                 talloc_str = talloc_strdup(r, test_str);
   35747           0 :                 if (unicode != NULL) {
   35748           0 :                         Py_DECREF(unicode);
   35749             :                 }
   35750           0 :                 if (talloc_str == NULL) {
   35751           0 :                         PyErr_NoMemory();
   35752           0 :                         return false;
   35753             :                 }
   35754           0 :                 r->in.computername = talloc_str;
   35755             :         }
   35756           0 :         if (py_credential == NULL) {
   35757           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   35758           0 :                 return false;
   35759             :         }
   35760           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   35761           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   35762           0 :                 PyErr_NoMemory();
   35763           0 :                 return false;
   35764             :         }
   35765           0 :         r->in.credential = *(struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   35766           0 :         if (py_return_authenticator == NULL) {
   35767           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.return_authenticator");
   35768           0 :                 return false;
   35769             :         }
   35770           0 :         r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
   35771           0 :         if (r->in.return_authenticator == NULL) {
   35772           0 :                 PyErr_NoMemory();
   35773           0 :                 return false;
   35774             :         }
   35775           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   35776           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   35777           0 :                 PyErr_NoMemory();
   35778           0 :                 return false;
   35779             :         }
   35780           0 :         r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   35781           0 :         if (py_reference == NULL) {
   35782           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.reference");
   35783           0 :                 return false;
   35784             :         }
   35785             :         {
   35786           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.reference));
   35787           0 :                 if (PyLong_Check(py_reference)) {
   35788             :                         unsigned long long test_var;
   35789           0 :                         test_var = PyLong_AsUnsignedLongLong(py_reference);
   35790           0 :                         if (PyErr_Occurred() != NULL) {
   35791           0 :                                 return false;
   35792             :                         }
   35793           0 :                         if (test_var > uint_max) {
   35794           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   35795             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35796           0 :                                 return false;
   35797             :                         }
   35798           0 :                         r->in.reference = test_var;
   35799             :                 } else {
   35800           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   35801             :                           PyLong_Type.tp_name);
   35802           0 :                         return false;
   35803             :                 }
   35804             :         }
   35805           0 :         if (py_level == NULL) {
   35806           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   35807           0 :                 return false;
   35808             :         }
   35809             :         {
   35810           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   35811           0 :                 if (PyLong_Check(py_level)) {
   35812             :                         unsigned long long test_var;
   35813           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   35814           0 :                         if (PyErr_Occurred() != NULL) {
   35815           0 :                                 return false;
   35816             :                         }
   35817           0 :                         if (test_var > uint_max) {
   35818           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   35819             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35820           0 :                                 return false;
   35821             :                         }
   35822           0 :                         r->in.level = test_var;
   35823             :                 } else {
   35824           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   35825             :                           PyLong_Type.tp_name);
   35826           0 :                         return false;
   35827             :                 }
   35828             :         }
   35829           0 :         if (py_buffersize == NULL) {
   35830           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.buffersize");
   35831           0 :                 return false;
   35832             :         }
   35833             :         {
   35834           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.buffersize));
   35835           0 :                 if (PyLong_Check(py_buffersize)) {
   35836             :                         unsigned long long test_var;
   35837           0 :                         test_var = PyLong_AsUnsignedLongLong(py_buffersize);
   35838           0 :                         if (PyErr_Occurred() != NULL) {
   35839           0 :                                 return false;
   35840             :                         }
   35841           0 :                         if (test_var > uint_max) {
   35842           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   35843             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35844           0 :                                 return false;
   35845             :                         }
   35846           0 :                         r->in.buffersize = test_var;
   35847             :                 } else {
   35848           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   35849             :                           PyLong_Type.tp_name);
   35850           0 :                         return false;
   35851             :                 }
   35852             :         }
   35853           0 :         if (py_recordid == NULL) {
   35854           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.recordid");
   35855           0 :                 return false;
   35856             :         }
   35857           0 :         r->in.recordid = talloc_ptrtype(r, r->in.recordid);
   35858           0 :         if (r->in.recordid == NULL) {
   35859           0 :                 PyErr_NoMemory();
   35860           0 :                 return false;
   35861             :         }
   35862           0 :         PY_CHECK_TYPE(&netr_UAS_INFO_0_Type, py_recordid, return false;);
   35863           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_recordid)) == NULL) {
   35864           0 :                 PyErr_NoMemory();
   35865           0 :                 return false;
   35866             :         }
   35867           0 :         r->in.recordid = (struct netr_UAS_INFO_0 *)pytalloc_get_ptr(py_recordid);
   35868           0 :         return true;
   35869             : }
   35870             : 
   35871           0 : static PyObject *unpack_py_netr_AccountSync_args_out(struct netr_AccountSync *r)
   35872             : {
   35873             :         PyObject *result;
   35874             :         PyObject *py_return_authenticator;
   35875             :         PyObject *py_buffer;
   35876             :         PyObject *py_count_returned;
   35877             :         PyObject *py_total_entries;
   35878             :         PyObject *py_next_reference;
   35879             :         PyObject *py_recordid;
   35880           0 :         result = PyTuple_New(6);
   35881           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   35882           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   35883           0 :         py_buffer = pytalloc_reference_ex(&netr_AccountBuffer_Type, r->out.buffer, r->out.buffer);
   35884           0 :         PyTuple_SetItem(result, 1, py_buffer);
   35885           0 :         py_count_returned = PyLong_FromUnsignedLongLong((uint32_t)*r->out.count_returned);
   35886           0 :         PyTuple_SetItem(result, 2, py_count_returned);
   35887           0 :         py_total_entries = PyLong_FromUnsignedLongLong((uint32_t)*r->out.total_entries);
   35888           0 :         PyTuple_SetItem(result, 3, py_total_entries);
   35889           0 :         py_next_reference = PyLong_FromUnsignedLongLong((uint32_t)*r->out.next_reference);
   35890           0 :         PyTuple_SetItem(result, 4, py_next_reference);
   35891           0 :         py_recordid = pytalloc_reference_ex(&netr_UAS_INFO_0_Type, r->out.recordid, r->out.recordid);
   35892           0 :         PyTuple_SetItem(result, 5, py_recordid);
   35893           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   35894           0 :                 PyErr_SetNTSTATUS(r->out.result);
   35895           0 :                 return NULL;
   35896             :         }
   35897             : 
   35898           0 :         return result;
   35899             : }
   35900             : 
   35901             : 
   35902           0 : static PyObject *py_netr_GetDcName_in_get_logon_server(PyObject *obj, void *closure)
   35903             : {
   35904           0 :         struct netr_GetDcName *object = (struct netr_GetDcName *)pytalloc_get_ptr(obj);
   35905             :         PyObject *py_logon_server;
   35906           0 :         if (object->in.logon_server == NULL) {
   35907           0 :                 Py_RETURN_NONE;
   35908             :         }
   35909           0 :         if (object->in.logon_server == NULL) {
   35910           0 :                 py_logon_server = Py_None;
   35911           0 :                 Py_INCREF(py_logon_server);
   35912             :         } else {
   35913           0 :                 py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   35914             :         }
   35915           0 :         return py_logon_server;
   35916             : }
   35917             : 
   35918           0 : static int py_netr_GetDcName_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   35919             : {
   35920           0 :         struct netr_GetDcName *object = (struct netr_GetDcName *)pytalloc_get_ptr(py_obj);
   35921           0 :         if (value == NULL) {
   35922           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_server");
   35923           0 :                 return -1;
   35924             :         }
   35925           0 :         object->in.logon_server = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon_server);
   35926           0 :         if (object->in.logon_server == NULL) {
   35927           0 :                 PyErr_NoMemory();
   35928           0 :                 return -1;
   35929             :         }
   35930             :         {
   35931             :                 const char *test_str;
   35932             :                 const char *talloc_str;
   35933           0 :                 PyObject *unicode = NULL;
   35934           0 :                 if (PyUnicode_Check(value)) {
   35935           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   35936           0 :                         if (unicode == NULL) {
   35937           0 :                                 PyErr_NoMemory();
   35938           0 :                                 return -1;
   35939             :                         }
   35940           0 :                         test_str = PyBytes_AS_STRING(unicode);
   35941           0 :                 } else if (PyBytes_Check(value)) {
   35942           0 :                         test_str = PyBytes_AS_STRING(value);
   35943             :                 } else {
   35944           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   35945           0 :                         return -1;
   35946             :                 }
   35947           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   35948           0 :                 if (unicode != NULL) {
   35949           0 :                         Py_DECREF(unicode);
   35950             :                 }
   35951           0 :                 if (talloc_str == NULL) {
   35952           0 :                         PyErr_NoMemory();
   35953           0 :                         return -1;
   35954             :                 }
   35955           0 :                 object->in.logon_server = talloc_str;
   35956             :         }
   35957           0 :         return 0;
   35958             : }
   35959             : 
   35960           0 : static PyObject *py_netr_GetDcName_in_get_domainname(PyObject *obj, void *closure)
   35961             : {
   35962           0 :         struct netr_GetDcName *object = (struct netr_GetDcName *)pytalloc_get_ptr(obj);
   35963             :         PyObject *py_domainname;
   35964           0 :         if (object->in.domainname == NULL) {
   35965           0 :                 Py_RETURN_NONE;
   35966             :         }
   35967           0 :         if (object->in.domainname == NULL) {
   35968           0 :                 py_domainname = Py_None;
   35969           0 :                 Py_INCREF(py_domainname);
   35970             :         } else {
   35971           0 :                 if (object->in.domainname == NULL) {
   35972           0 :                         py_domainname = Py_None;
   35973           0 :                         Py_INCREF(py_domainname);
   35974             :                 } else {
   35975           0 :                         py_domainname = PyUnicode_Decode(object->in.domainname, strlen(object->in.domainname), "utf-8", "ignore");
   35976             :                 }
   35977             :         }
   35978           0 :         return py_domainname;
   35979             : }
   35980             : 
   35981           0 : static int py_netr_GetDcName_in_set_domainname(PyObject *py_obj, PyObject *value, void *closure)
   35982             : {
   35983           0 :         struct netr_GetDcName *object = (struct netr_GetDcName *)pytalloc_get_ptr(py_obj);
   35984           0 :         if (value == NULL) {
   35985           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domainname");
   35986           0 :                 return -1;
   35987             :         }
   35988           0 :         if (value == Py_None) {
   35989           0 :                 object->in.domainname = NULL;
   35990             :         } else {
   35991           0 :                 object->in.domainname = NULL;
   35992             :                 {
   35993             :                         const char *test_str;
   35994             :                         const char *talloc_str;
   35995           0 :                         PyObject *unicode = NULL;
   35996           0 :                         if (PyUnicode_Check(value)) {
   35997           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   35998           0 :                                 if (unicode == NULL) {
   35999           0 :                                         PyErr_NoMemory();
   36000           0 :                                         return -1;
   36001             :                                 }
   36002           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   36003           0 :                         } else if (PyBytes_Check(value)) {
   36004           0 :                                 test_str = PyBytes_AS_STRING(value);
   36005             :                         } else {
   36006           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   36007           0 :                                 return -1;
   36008             :                         }
   36009           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   36010           0 :                         if (unicode != NULL) {
   36011           0 :                                 Py_DECREF(unicode);
   36012             :                         }
   36013           0 :                         if (talloc_str == NULL) {
   36014           0 :                                 PyErr_NoMemory();
   36015           0 :                                 return -1;
   36016             :                         }
   36017           0 :                         object->in.domainname = talloc_str;
   36018             :                 }
   36019             :         }
   36020           0 :         return 0;
   36021             : }
   36022             : 
   36023           0 : static PyObject *py_netr_GetDcName_out_get_dcname(PyObject *obj, void *closure)
   36024             : {
   36025           0 :         struct netr_GetDcName *object = (struct netr_GetDcName *)pytalloc_get_ptr(obj);
   36026             :         PyObject *py_dcname;
   36027           0 :         if (object->out.dcname == NULL) {
   36028           0 :                 Py_RETURN_NONE;
   36029             :         }
   36030           0 :         if (*object->out.dcname == NULL) {
   36031           0 :                 py_dcname = Py_None;
   36032           0 :                 Py_INCREF(py_dcname);
   36033             :         } else {
   36034           0 :                 if (*object->out.dcname == NULL) {
   36035           0 :                         py_dcname = Py_None;
   36036           0 :                         Py_INCREF(py_dcname);
   36037             :                 } else {
   36038           0 :                         py_dcname = PyUnicode_Decode(*object->out.dcname, strlen(*object->out.dcname), "utf-8", "ignore");
   36039             :                 }
   36040             :         }
   36041           0 :         return py_dcname;
   36042             : }
   36043             : 
   36044           0 : static int py_netr_GetDcName_out_set_dcname(PyObject *py_obj, PyObject *value, void *closure)
   36045             : {
   36046           0 :         struct netr_GetDcName *object = (struct netr_GetDcName *)pytalloc_get_ptr(py_obj);
   36047           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.dcname));
   36048           0 :         if (value == NULL) {
   36049           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.dcname");
   36050           0 :                 return -1;
   36051             :         }
   36052           0 :         object->out.dcname = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.dcname);
   36053           0 :         if (object->out.dcname == NULL) {
   36054           0 :                 PyErr_NoMemory();
   36055           0 :                 return -1;
   36056             :         }
   36057           0 :         if (value == Py_None) {
   36058           0 :                 *object->out.dcname = NULL;
   36059             :         } else {
   36060           0 :                 *object->out.dcname = NULL;
   36061             :                 {
   36062             :                         const char *test_str;
   36063             :                         const char *talloc_str;
   36064           0 :                         PyObject *unicode = NULL;
   36065           0 :                         if (PyUnicode_Check(value)) {
   36066           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   36067           0 :                                 if (unicode == NULL) {
   36068           0 :                                         PyErr_NoMemory();
   36069           0 :                                         return -1;
   36070             :                                 }
   36071           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   36072           0 :                         } else if (PyBytes_Check(value)) {
   36073           0 :                                 test_str = PyBytes_AS_STRING(value);
   36074             :                         } else {
   36075           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   36076           0 :                                 return -1;
   36077             :                         }
   36078           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   36079           0 :                         if (unicode != NULL) {
   36080           0 :                                 Py_DECREF(unicode);
   36081             :                         }
   36082           0 :                         if (talloc_str == NULL) {
   36083           0 :                                 PyErr_NoMemory();
   36084           0 :                                 return -1;
   36085             :                         }
   36086           0 :                         *object->out.dcname = talloc_str;
   36087             :                 }
   36088             :         }
   36089           0 :         return 0;
   36090             : }
   36091             : 
   36092           0 : static PyObject *py_netr_GetDcName_get_result(PyObject *obj, void *closure)
   36093             : {
   36094           0 :         struct netr_GetDcName *object = (struct netr_GetDcName *)pytalloc_get_ptr(obj);
   36095             :         PyObject *py_result;
   36096           0 :         py_result = PyErr_FromWERROR(object->out.result);
   36097           0 :         return py_result;
   36098             : }
   36099             : 
   36100           0 : static int py_netr_GetDcName_set_result(PyObject *py_obj, PyObject *value, void *closure)
   36101             : {
   36102           0 :         struct netr_GetDcName *object = (struct netr_GetDcName *)pytalloc_get_ptr(py_obj);
   36103           0 :         if (value == NULL) {
   36104           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   36105           0 :                 return -1;
   36106             :         }
   36107           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   36108           0 :         return 0;
   36109             : }
   36110             : 
   36111             : static PyGetSetDef py_netr_GetDcName_getsetters[] = {
   36112             :         {
   36113             :                 .name = discard_const_p(char, "in_logon_server"),
   36114             :                 .get = py_netr_GetDcName_in_get_logon_server,
   36115             :                 .set = py_netr_GetDcName_in_set_logon_server,
   36116             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   36117             :         },
   36118             :         {
   36119             :                 .name = discard_const_p(char, "in_domainname"),
   36120             :                 .get = py_netr_GetDcName_in_get_domainname,
   36121             :                 .set = py_netr_GetDcName_in_set_domainname,
   36122             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   36123             :         },
   36124             :         {
   36125             :                 .name = discard_const_p(char, "out_dcname"),
   36126             :                 .get = py_netr_GetDcName_out_get_dcname,
   36127             :                 .set = py_netr_GetDcName_out_set_dcname,
   36128             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   36129             :         },
   36130             :         {
   36131             :                 .name = discard_const_p(char, "result"),
   36132             :                 .get = py_netr_GetDcName_get_result,
   36133             :                 .set = py_netr_GetDcName_set_result,
   36134             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   36135             :         },
   36136             :         { .name = NULL }
   36137             : };
   36138             : 
   36139           0 : static PyObject *py_netr_GetDcName_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   36140             : {
   36141           0 :         PyObject *self = pytalloc_new(struct netr_GetDcName, type);
   36142           0 :         return self;
   36143             : }
   36144             : 
   36145           0 : static PyObject *py_netr_GetDcName_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   36146             : {
   36147             : 
   36148             : 
   36149           0 :         return PyLong_FromLong(11);
   36150             : }
   36151             : 
   36152           0 : static PyObject *py_netr_GetDcName_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   36153             : {
   36154           0 :         const struct ndr_interface_call *call = NULL;
   36155           0 :         struct netr_GetDcName *object = (struct netr_GetDcName *)pytalloc_get_ptr(py_obj);
   36156           0 :         PyObject *ret = NULL;
   36157           0 :         struct ndr_push *push = NULL;
   36158             :         DATA_BLOB blob;
   36159             :         enum ndr_err_code err;
   36160             : 
   36161           0 :         if (ndr_table_netlogon.num_calls < 12) {
   36162           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetDcName_ndr_pack");
   36163           0 :                 return NULL;
   36164             :         }
   36165           0 :         call = &ndr_table_netlogon.calls[11];
   36166             : 
   36167           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   36168           0 :         if (push == NULL) {
   36169           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   36170           0 :                 return NULL;
   36171             :         }
   36172             : 
   36173           0 :         push->flags |= ndr_push_flags;
   36174             : 
   36175           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   36176           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   36177           0 :                 TALLOC_FREE(push);
   36178           0 :                 PyErr_SetNdrError(err);
   36179           0 :                 return NULL;
   36180             :         }
   36181           0 :         blob = ndr_push_blob(push);
   36182           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   36183           0 :         TALLOC_FREE(push);
   36184           0 :         return ret;
   36185             : }
   36186             : 
   36187           0 : static PyObject *py_netr_GetDcName_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36188             : {
   36189           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   36190           0 :         PyObject *bigendian_obj = NULL;
   36191           0 :         PyObject *ndr64_obj = NULL;
   36192           0 :         uint32_t ndr_push_flags = 0;
   36193             : 
   36194           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   36195             :                 discard_const_p(char *, kwnames),
   36196             :                 &bigendian_obj,
   36197             :                 &ndr64_obj)) {
   36198           0 :                 return NULL;
   36199             :         }
   36200             : 
   36201           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36202           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   36203             :         }
   36204           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36205           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   36206             :         }
   36207             : 
   36208           0 :         return py_netr_GetDcName_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   36209             : }
   36210             : 
   36211           0 : static PyObject *py_netr_GetDcName_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36212             : {
   36213           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   36214           0 :         PyObject *bigendian_obj = NULL;
   36215           0 :         PyObject *ndr64_obj = NULL;
   36216           0 :         uint32_t ndr_push_flags = 0;
   36217             : 
   36218           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   36219             :                 discard_const_p(char *, kwnames),
   36220             :                 &bigendian_obj,
   36221             :                 &ndr64_obj)) {
   36222           0 :                 return NULL;
   36223             :         }
   36224             : 
   36225           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36226           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   36227             :         }
   36228           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36229           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   36230             :         }
   36231             : 
   36232           0 :         return py_netr_GetDcName_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   36233             : }
   36234             : 
   36235           0 : static PyObject *py_netr_GetDcName_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   36236             : {
   36237           0 :         const struct ndr_interface_call *call = NULL;
   36238           0 :         struct netr_GetDcName *object = (struct netr_GetDcName *)pytalloc_get_ptr(py_obj);
   36239           0 :         struct ndr_pull *pull = NULL;
   36240             :         enum ndr_err_code err;
   36241             : 
   36242           0 :         if (ndr_table_netlogon.num_calls < 12) {
   36243           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetDcName_ndr_unpack");
   36244           0 :                 return NULL;
   36245             :         }
   36246           0 :         call = &ndr_table_netlogon.calls[11];
   36247             : 
   36248           0 :         pull = ndr_pull_init_blob(blob, object);
   36249           0 :         if (pull == NULL) {
   36250           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   36251           0 :                 return NULL;
   36252             :         }
   36253             : 
   36254           0 :         pull->flags |= ndr_pull_flags;
   36255             : 
   36256           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   36257           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   36258           0 :                 TALLOC_FREE(pull);
   36259           0 :                 PyErr_SetNdrError(err);
   36260           0 :                 return NULL;
   36261             :         }
   36262           0 :         if (!allow_remaining) {
   36263             :                 uint32_t highest_ofs;
   36264             : 
   36265           0 :                 if (pull->offset > pull->relative_highest_offset) {
   36266           0 :                         highest_ofs = pull->offset;
   36267             :                 } else {
   36268           0 :                         highest_ofs = pull->relative_highest_offset;
   36269             :                 }
   36270           0 :                 if (highest_ofs < pull->data_size) {
   36271           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   36272             :                                 "not all bytes consumed ofs[%u] size[%u]",
   36273             :                                 highest_ofs, pull->data_size);
   36274           0 :                         TALLOC_FREE(pull);
   36275           0 :                         PyErr_SetNdrError(err);
   36276           0 :                         return NULL;
   36277             :                 }
   36278             :         }
   36279             : 
   36280           0 :         TALLOC_FREE(pull);
   36281           0 :         Py_RETURN_NONE;
   36282             : }
   36283             : 
   36284           0 : static PyObject *py_netr_GetDcName_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36285             : {
   36286             :         DATA_BLOB blob;
   36287           0 :         Py_ssize_t blob_length = 0;
   36288           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   36289           0 :         PyObject *bigendian_obj = NULL;
   36290           0 :         PyObject *ndr64_obj = NULL;
   36291           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   36292           0 :         PyObject *allow_remaining_obj = NULL;
   36293           0 :         bool allow_remaining = false;
   36294             : 
   36295           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   36296             :                 discard_const_p(char *, kwnames),
   36297             :                 &blob.data, &blob_length,
   36298             :                 &bigendian_obj,
   36299             :                 &ndr64_obj,
   36300             :                 &allow_remaining_obj)) {
   36301           0 :                 return NULL;
   36302             :         }
   36303           0 :         blob.length = blob_length;
   36304             : 
   36305           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36306           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   36307             :         }
   36308           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36309           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   36310             :         }
   36311             : 
   36312           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   36313           0 :                 allow_remaining = true;
   36314             :         }
   36315             : 
   36316           0 :         return py_netr_GetDcName_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   36317             : }
   36318             : 
   36319           0 : static PyObject *py_netr_GetDcName_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36320             : {
   36321             :         DATA_BLOB blob;
   36322           0 :         Py_ssize_t blob_length = 0;
   36323           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   36324           0 :         PyObject *bigendian_obj = NULL;
   36325           0 :         PyObject *ndr64_obj = NULL;
   36326           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   36327           0 :         PyObject *allow_remaining_obj = NULL;
   36328           0 :         bool allow_remaining = false;
   36329             : 
   36330           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   36331             :                 discard_const_p(char *, kwnames),
   36332             :                 &blob.data, &blob_length,
   36333             :                 &bigendian_obj,
   36334             :                 &ndr64_obj,
   36335             :                 &allow_remaining_obj)) {
   36336           0 :                 return NULL;
   36337             :         }
   36338           0 :         blob.length = blob_length;
   36339             : 
   36340           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36341           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   36342             :         }
   36343           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36344           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   36345             :         }
   36346             : 
   36347           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   36348           0 :                 allow_remaining = true;
   36349             :         }
   36350             : 
   36351           0 :         return py_netr_GetDcName_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   36352             : }
   36353             : 
   36354           0 : static PyObject *py_netr_GetDcName_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   36355             : {
   36356           0 :         const struct ndr_interface_call *call = NULL;
   36357           0 :         struct netr_GetDcName *object = (struct netr_GetDcName *)pytalloc_get_ptr(py_obj);
   36358             :         PyObject *ret;
   36359             :         char *retstr;
   36360             : 
   36361           0 :         if (ndr_table_netlogon.num_calls < 12) {
   36362           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetDcName_ndr_print");
   36363           0 :                 return NULL;
   36364             :         }
   36365           0 :         call = &ndr_table_netlogon.calls[11];
   36366             : 
   36367           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   36368           0 :         ret = PyUnicode_FromString(retstr);
   36369           0 :         TALLOC_FREE(retstr);
   36370             : 
   36371           0 :         return ret;
   36372             : }
   36373             : 
   36374           0 : static PyObject *py_netr_GetDcName_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   36375             : {
   36376           0 :         return py_netr_GetDcName_ndr_print(py_obj, "netr_GetDcName_in", NDR_IN);
   36377             : }
   36378             : 
   36379           0 : static PyObject *py_netr_GetDcName_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   36380             : {
   36381           0 :         return py_netr_GetDcName_ndr_print(py_obj, "netr_GetDcName_out", NDR_OUT);
   36382             : }
   36383             : 
   36384             : static PyMethodDef py_netr_GetDcName_methods[] = {
   36385             :         { "opnum", (PyCFunction)py_netr_GetDcName_ndr_opnum, METH_NOARGS|METH_CLASS,
   36386             :                 "netlogon.netr_GetDcName.opnum() -> 11 (0x0b) " },
   36387             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetDcName_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   36388             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   36389             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetDcName_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   36390             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   36391             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetDcName_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   36392             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   36393             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetDcName_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   36394             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   36395             :         { "__ndr_print_in__", (PyCFunction)py_netr_GetDcName_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   36396             :         { "__ndr_print_out__", (PyCFunction)py_netr_GetDcName_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   36397             :         { NULL, NULL, 0, NULL }
   36398             : };
   36399             : 
   36400             : 
   36401             : static PyTypeObject netr_GetDcName_Type = {
   36402             :         PyVarObject_HEAD_INIT(NULL, 0)
   36403             :         .tp_name = "netlogon.netr_GetDcName",
   36404             :         .tp_getset = py_netr_GetDcName_getsetters,
   36405             :         .tp_methods = py_netr_GetDcName_methods,
   36406             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   36407             :         .tp_new = py_netr_GetDcName_new,
   36408             : };
   36409             : 
   36410           0 : static bool pack_py_netr_GetDcName_args_in(PyObject *args, PyObject *kwargs, struct netr_GetDcName *r)
   36411             : {
   36412             :         PyObject *py_logon_server;
   36413             :         PyObject *py_domainname;
   36414           0 :         const char *kwnames[] = {
   36415             :                 "logon_server", "domainname", NULL
   36416             :         };
   36417             : 
   36418           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:netr_GetDcName", discard_const_p(char *, kwnames), &py_logon_server, &py_domainname)) {
   36419           0 :                 return false;
   36420             :         }
   36421             : 
   36422           0 :         if (py_logon_server == NULL) {
   36423           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_server");
   36424           0 :                 return false;
   36425             :         }
   36426           0 :         r->in.logon_server = talloc_ptrtype(r, r->in.logon_server);
   36427           0 :         if (r->in.logon_server == NULL) {
   36428           0 :                 PyErr_NoMemory();
   36429           0 :                 return false;
   36430             :         }
   36431             :         {
   36432             :                 const char *test_str;
   36433             :                 const char *talloc_str;
   36434           0 :                 PyObject *unicode = NULL;
   36435           0 :                 if (PyUnicode_Check(py_logon_server)) {
   36436           0 :                         unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   36437           0 :                         if (unicode == NULL) {
   36438           0 :                                 PyErr_NoMemory();
   36439           0 :                                 return false;
   36440             :                         }
   36441           0 :                         test_str = PyBytes_AS_STRING(unicode);
   36442           0 :                 } else if (PyBytes_Check(py_logon_server)) {
   36443           0 :                         test_str = PyBytes_AS_STRING(py_logon_server);
   36444             :                 } else {
   36445           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   36446           0 :                         return false;
   36447             :                 }
   36448           0 :                 talloc_str = talloc_strdup(r, test_str);
   36449           0 :                 if (unicode != NULL) {
   36450           0 :                         Py_DECREF(unicode);
   36451             :                 }
   36452           0 :                 if (talloc_str == NULL) {
   36453           0 :                         PyErr_NoMemory();
   36454           0 :                         return false;
   36455             :                 }
   36456           0 :                 r->in.logon_server = talloc_str;
   36457             :         }
   36458           0 :         if (py_domainname == NULL) {
   36459           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domainname");
   36460           0 :                 return false;
   36461             :         }
   36462           0 :         if (py_domainname == Py_None) {
   36463           0 :                 r->in.domainname = NULL;
   36464             :         } else {
   36465           0 :                 r->in.domainname = NULL;
   36466             :                 {
   36467             :                         const char *test_str;
   36468             :                         const char *talloc_str;
   36469           0 :                         PyObject *unicode = NULL;
   36470           0 :                         if (PyUnicode_Check(py_domainname)) {
   36471           0 :                                 unicode = PyUnicode_AsEncodedString(py_domainname, "utf-8", "ignore");
   36472           0 :                                 if (unicode == NULL) {
   36473           0 :                                         PyErr_NoMemory();
   36474           0 :                                         return false;
   36475             :                                 }
   36476           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   36477           0 :                         } else if (PyBytes_Check(py_domainname)) {
   36478           0 :                                 test_str = PyBytes_AS_STRING(py_domainname);
   36479             :                         } else {
   36480           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domainname)->tp_name);
   36481           0 :                                 return false;
   36482             :                         }
   36483           0 :                         talloc_str = talloc_strdup(r, test_str);
   36484           0 :                         if (unicode != NULL) {
   36485           0 :                                 Py_DECREF(unicode);
   36486             :                         }
   36487           0 :                         if (talloc_str == NULL) {
   36488           0 :                                 PyErr_NoMemory();
   36489           0 :                                 return false;
   36490             :                         }
   36491           0 :                         r->in.domainname = talloc_str;
   36492             :                 }
   36493             :         }
   36494           0 :         return true;
   36495             : }
   36496             : 
   36497           0 : static PyObject *unpack_py_netr_GetDcName_args_out(struct netr_GetDcName *r)
   36498             : {
   36499             :         PyObject *result;
   36500             :         PyObject *py_dcname;
   36501           0 :         if (*r->out.dcname == NULL) {
   36502           0 :                 py_dcname = Py_None;
   36503           0 :                 Py_INCREF(py_dcname);
   36504             :         } else {
   36505           0 :                 if (*r->out.dcname == NULL) {
   36506           0 :                         py_dcname = Py_None;
   36507           0 :                         Py_INCREF(py_dcname);
   36508             :                 } else {
   36509           0 :                         py_dcname = PyUnicode_Decode(*r->out.dcname, strlen(*r->out.dcname), "utf-8", "ignore");
   36510             :                 }
   36511             :         }
   36512           0 :         result = py_dcname;
   36513           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   36514           0 :                 PyErr_SetWERROR(r->out.result);
   36515           0 :                 return NULL;
   36516             :         }
   36517             : 
   36518           0 :         return result;
   36519             : }
   36520             : 
   36521             : 
   36522           0 : static PyObject *py_netr_LogonControl_in_get_logon_server(PyObject *obj, void *closure)
   36523             : {
   36524           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(obj);
   36525             :         PyObject *py_logon_server;
   36526           0 :         if (object->in.logon_server == NULL) {
   36527           0 :                 Py_RETURN_NONE;
   36528             :         }
   36529           0 :         if (object->in.logon_server == NULL) {
   36530           0 :                 py_logon_server = Py_None;
   36531           0 :                 Py_INCREF(py_logon_server);
   36532             :         } else {
   36533           0 :                 if (object->in.logon_server == NULL) {
   36534           0 :                         py_logon_server = Py_None;
   36535           0 :                         Py_INCREF(py_logon_server);
   36536             :                 } else {
   36537           0 :                         py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   36538             :                 }
   36539             :         }
   36540           0 :         return py_logon_server;
   36541             : }
   36542             : 
   36543           0 : static int py_netr_LogonControl_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   36544             : {
   36545           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(py_obj);
   36546           0 :         if (value == NULL) {
   36547           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_server");
   36548           0 :                 return -1;
   36549             :         }
   36550           0 :         if (value == Py_None) {
   36551           0 :                 object->in.logon_server = NULL;
   36552             :         } else {
   36553           0 :                 object->in.logon_server = NULL;
   36554             :                 {
   36555             :                         const char *test_str;
   36556             :                         const char *talloc_str;
   36557           0 :                         PyObject *unicode = NULL;
   36558           0 :                         if (PyUnicode_Check(value)) {
   36559           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   36560           0 :                                 if (unicode == NULL) {
   36561           0 :                                         PyErr_NoMemory();
   36562           0 :                                         return -1;
   36563             :                                 }
   36564           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   36565           0 :                         } else if (PyBytes_Check(value)) {
   36566           0 :                                 test_str = PyBytes_AS_STRING(value);
   36567             :                         } else {
   36568           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   36569           0 :                                 return -1;
   36570             :                         }
   36571           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   36572           0 :                         if (unicode != NULL) {
   36573           0 :                                 Py_DECREF(unicode);
   36574             :                         }
   36575           0 :                         if (talloc_str == NULL) {
   36576           0 :                                 PyErr_NoMemory();
   36577           0 :                                 return -1;
   36578             :                         }
   36579           0 :                         object->in.logon_server = talloc_str;
   36580             :                 }
   36581             :         }
   36582           0 :         return 0;
   36583             : }
   36584             : 
   36585           0 : static PyObject *py_netr_LogonControl_in_get_function_code(PyObject *obj, void *closure)
   36586             : {
   36587           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(obj);
   36588             :         PyObject *py_function_code;
   36589           0 :         py_function_code = PyLong_FromUnsignedLongLong((uint32_t)object->in.function_code);
   36590           0 :         return py_function_code;
   36591             : }
   36592             : 
   36593           0 : static int py_netr_LogonControl_in_set_function_code(PyObject *py_obj, PyObject *value, void *closure)
   36594             : {
   36595           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(py_obj);
   36596           0 :         if (value == NULL) {
   36597           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.function_code");
   36598           0 :                 return -1;
   36599             :         }
   36600             :         {
   36601           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.function_code));
   36602           0 :                 if (PyLong_Check(value)) {
   36603             :                         unsigned long long test_var;
   36604           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   36605           0 :                         if (PyErr_Occurred() != NULL) {
   36606           0 :                                 return -1;
   36607             :                         }
   36608           0 :                         if (test_var > uint_max) {
   36609           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   36610             :                                   PyLong_Type.tp_name, uint_max, test_var);
   36611           0 :                                 return -1;
   36612             :                         }
   36613           0 :                         object->in.function_code = test_var;
   36614             :                 } else {
   36615           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   36616             :                           PyLong_Type.tp_name);
   36617           0 :                         return -1;
   36618             :                 }
   36619             :         }
   36620           0 :         return 0;
   36621             : }
   36622             : 
   36623           0 : static PyObject *py_netr_LogonControl_in_get_level(PyObject *obj, void *closure)
   36624             : {
   36625           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(obj);
   36626             :         PyObject *py_level;
   36627           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   36628           0 :         return py_level;
   36629             : }
   36630             : 
   36631           0 : static int py_netr_LogonControl_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   36632             : {
   36633           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(py_obj);
   36634           0 :         if (value == NULL) {
   36635           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   36636           0 :                 return -1;
   36637             :         }
   36638             :         {
   36639           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   36640           0 :                 if (PyLong_Check(value)) {
   36641             :                         unsigned long long test_var;
   36642           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   36643           0 :                         if (PyErr_Occurred() != NULL) {
   36644           0 :                                 return -1;
   36645             :                         }
   36646           0 :                         if (test_var > uint_max) {
   36647           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   36648             :                                   PyLong_Type.tp_name, uint_max, test_var);
   36649           0 :                                 return -1;
   36650             :                         }
   36651           0 :                         object->in.level = test_var;
   36652             :                 } else {
   36653           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   36654             :                           PyLong_Type.tp_name);
   36655           0 :                         return -1;
   36656             :                 }
   36657             :         }
   36658           0 :         return 0;
   36659             : }
   36660             : 
   36661           0 : static PyObject *py_netr_LogonControl_out_get_query(PyObject *obj, void *closure)
   36662             : {
   36663           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(obj);
   36664             :         PyObject *py_query;
   36665           0 :         if (object->out.query == NULL) {
   36666           0 :                 Py_RETURN_NONE;
   36667             :         }
   36668           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");
   36669           0 :         if (py_query == NULL) {
   36670           0 :                 return NULL;
   36671             :         }
   36672           0 :         return py_query;
   36673             : }
   36674             : 
   36675           0 : static int py_netr_LogonControl_out_set_query(PyObject *py_obj, PyObject *value, void *closure)
   36676             : {
   36677           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(py_obj);
   36678           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.query));
   36679           0 :         if (value == NULL) {
   36680           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.query");
   36681           0 :                 return -1;
   36682             :         }
   36683           0 :         object->out.query = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.query);
   36684           0 :         if (object->out.query == NULL) {
   36685           0 :                 PyErr_NoMemory();
   36686           0 :                 return -1;
   36687             :         }
   36688             :         {
   36689             :                 union netr_CONTROL_QUERY_INFORMATION *query_switch_1;
   36690           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");
   36691           0 :                 if (query_switch_1 == NULL) {
   36692           0 :                         return -1;
   36693             :                 }
   36694           0 :                 object->out.query = query_switch_1;
   36695             :         }
   36696           0 :         return 0;
   36697             : }
   36698             : 
   36699           0 : static PyObject *py_netr_LogonControl_get_result(PyObject *obj, void *closure)
   36700             : {
   36701           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(obj);
   36702             :         PyObject *py_result;
   36703           0 :         py_result = PyErr_FromWERROR(object->out.result);
   36704           0 :         return py_result;
   36705             : }
   36706             : 
   36707           0 : static int py_netr_LogonControl_set_result(PyObject *py_obj, PyObject *value, void *closure)
   36708             : {
   36709           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(py_obj);
   36710           0 :         if (value == NULL) {
   36711           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   36712           0 :                 return -1;
   36713             :         }
   36714           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   36715           0 :         return 0;
   36716             : }
   36717             : 
   36718             : static PyGetSetDef py_netr_LogonControl_getsetters[] = {
   36719             :         {
   36720             :                 .name = discard_const_p(char, "in_logon_server"),
   36721             :                 .get = py_netr_LogonControl_in_get_logon_server,
   36722             :                 .set = py_netr_LogonControl_in_set_logon_server,
   36723             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   36724             :         },
   36725             :         {
   36726             :                 .name = discard_const_p(char, "in_function_code"),
   36727             :                 .get = py_netr_LogonControl_in_get_function_code,
   36728             :                 .set = py_netr_LogonControl_in_set_function_code,
   36729             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonControlCode")
   36730             :         },
   36731             :         {
   36732             :                 .name = discard_const_p(char, "in_level"),
   36733             :                 .get = py_netr_LogonControl_in_get_level,
   36734             :                 .set = py_netr_LogonControl_in_set_level,
   36735             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   36736             :         },
   36737             :         {
   36738             :                 .name = discard_const_p(char, "out_query"),
   36739             :                 .get = py_netr_LogonControl_out_get_query,
   36740             :                 .set = py_netr_LogonControl_out_set_query,
   36741             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CONTROL_QUERY_INFORMATION")
   36742             :         },
   36743             :         {
   36744             :                 .name = discard_const_p(char, "result"),
   36745             :                 .get = py_netr_LogonControl_get_result,
   36746             :                 .set = py_netr_LogonControl_set_result,
   36747             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   36748             :         },
   36749             :         { .name = NULL }
   36750             : };
   36751             : 
   36752           0 : static PyObject *py_netr_LogonControl_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   36753             : {
   36754           0 :         PyObject *self = pytalloc_new(struct netr_LogonControl, type);
   36755           0 :         struct netr_LogonControl *_self = (struct netr_LogonControl *)pytalloc_get_ptr(self);
   36756           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   36757           0 :         _self->out.query = talloc_zero(mem_ctx, union netr_CONTROL_QUERY_INFORMATION);
   36758           0 :         return self;
   36759             : }
   36760             : 
   36761           0 : static PyObject *py_netr_LogonControl_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   36762             : {
   36763             : 
   36764             : 
   36765           0 :         return PyLong_FromLong(12);
   36766             : }
   36767             : 
   36768           0 : static PyObject *py_netr_LogonControl_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   36769             : {
   36770           0 :         const struct ndr_interface_call *call = NULL;
   36771           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(py_obj);
   36772           0 :         PyObject *ret = NULL;
   36773           0 :         struct ndr_push *push = NULL;
   36774             :         DATA_BLOB blob;
   36775             :         enum ndr_err_code err;
   36776             : 
   36777           0 :         if (ndr_table_netlogon.num_calls < 13) {
   36778           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl_ndr_pack");
   36779           0 :                 return NULL;
   36780             :         }
   36781           0 :         call = &ndr_table_netlogon.calls[12];
   36782             : 
   36783           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   36784           0 :         if (push == NULL) {
   36785           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   36786           0 :                 return NULL;
   36787             :         }
   36788             : 
   36789           0 :         push->flags |= ndr_push_flags;
   36790             : 
   36791           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   36792           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   36793           0 :                 TALLOC_FREE(push);
   36794           0 :                 PyErr_SetNdrError(err);
   36795           0 :                 return NULL;
   36796             :         }
   36797           0 :         blob = ndr_push_blob(push);
   36798           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   36799           0 :         TALLOC_FREE(push);
   36800           0 :         return ret;
   36801             : }
   36802             : 
   36803           0 : static PyObject *py_netr_LogonControl_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36804             : {
   36805           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   36806           0 :         PyObject *bigendian_obj = NULL;
   36807           0 :         PyObject *ndr64_obj = NULL;
   36808           0 :         uint32_t ndr_push_flags = 0;
   36809             : 
   36810           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   36811             :                 discard_const_p(char *, kwnames),
   36812             :                 &bigendian_obj,
   36813             :                 &ndr64_obj)) {
   36814           0 :                 return NULL;
   36815             :         }
   36816             : 
   36817           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36818           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   36819             :         }
   36820           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36821           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   36822             :         }
   36823             : 
   36824           0 :         return py_netr_LogonControl_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   36825             : }
   36826             : 
   36827           0 : static PyObject *py_netr_LogonControl_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36828             : {
   36829           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   36830           0 :         PyObject *bigendian_obj = NULL;
   36831           0 :         PyObject *ndr64_obj = NULL;
   36832           0 :         uint32_t ndr_push_flags = 0;
   36833             : 
   36834           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   36835             :                 discard_const_p(char *, kwnames),
   36836             :                 &bigendian_obj,
   36837             :                 &ndr64_obj)) {
   36838           0 :                 return NULL;
   36839             :         }
   36840             : 
   36841           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36842           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   36843             :         }
   36844           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36845           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   36846             :         }
   36847             : 
   36848           0 :         return py_netr_LogonControl_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   36849             : }
   36850             : 
   36851           0 : static PyObject *py_netr_LogonControl_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   36852             : {
   36853           0 :         const struct ndr_interface_call *call = NULL;
   36854           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(py_obj);
   36855           0 :         struct ndr_pull *pull = NULL;
   36856             :         enum ndr_err_code err;
   36857             : 
   36858           0 :         if (ndr_table_netlogon.num_calls < 13) {
   36859           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl_ndr_unpack");
   36860           0 :                 return NULL;
   36861             :         }
   36862           0 :         call = &ndr_table_netlogon.calls[12];
   36863             : 
   36864           0 :         pull = ndr_pull_init_blob(blob, object);
   36865           0 :         if (pull == NULL) {
   36866           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   36867           0 :                 return NULL;
   36868             :         }
   36869             : 
   36870           0 :         pull->flags |= ndr_pull_flags;
   36871             : 
   36872           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   36873           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   36874           0 :                 TALLOC_FREE(pull);
   36875           0 :                 PyErr_SetNdrError(err);
   36876           0 :                 return NULL;
   36877             :         }
   36878           0 :         if (!allow_remaining) {
   36879             :                 uint32_t highest_ofs;
   36880             : 
   36881           0 :                 if (pull->offset > pull->relative_highest_offset) {
   36882           0 :                         highest_ofs = pull->offset;
   36883             :                 } else {
   36884           0 :                         highest_ofs = pull->relative_highest_offset;
   36885             :                 }
   36886           0 :                 if (highest_ofs < pull->data_size) {
   36887           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   36888             :                                 "not all bytes consumed ofs[%u] size[%u]",
   36889             :                                 highest_ofs, pull->data_size);
   36890           0 :                         TALLOC_FREE(pull);
   36891           0 :                         PyErr_SetNdrError(err);
   36892           0 :                         return NULL;
   36893             :                 }
   36894             :         }
   36895             : 
   36896           0 :         TALLOC_FREE(pull);
   36897           0 :         Py_RETURN_NONE;
   36898             : }
   36899             : 
   36900           0 : static PyObject *py_netr_LogonControl_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36901             : {
   36902             :         DATA_BLOB blob;
   36903           0 :         Py_ssize_t blob_length = 0;
   36904           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   36905           0 :         PyObject *bigendian_obj = NULL;
   36906           0 :         PyObject *ndr64_obj = NULL;
   36907           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   36908           0 :         PyObject *allow_remaining_obj = NULL;
   36909           0 :         bool allow_remaining = false;
   36910             : 
   36911           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   36912             :                 discard_const_p(char *, kwnames),
   36913             :                 &blob.data, &blob_length,
   36914             :                 &bigendian_obj,
   36915             :                 &ndr64_obj,
   36916             :                 &allow_remaining_obj)) {
   36917           0 :                 return NULL;
   36918             :         }
   36919           0 :         blob.length = blob_length;
   36920             : 
   36921           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36922           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   36923             :         }
   36924           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36925           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   36926             :         }
   36927             : 
   36928           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   36929           0 :                 allow_remaining = true;
   36930             :         }
   36931             : 
   36932           0 :         return py_netr_LogonControl_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   36933             : }
   36934             : 
   36935           0 : static PyObject *py_netr_LogonControl_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36936             : {
   36937             :         DATA_BLOB blob;
   36938           0 :         Py_ssize_t blob_length = 0;
   36939           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   36940           0 :         PyObject *bigendian_obj = NULL;
   36941           0 :         PyObject *ndr64_obj = NULL;
   36942           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   36943           0 :         PyObject *allow_remaining_obj = NULL;
   36944           0 :         bool allow_remaining = false;
   36945             : 
   36946           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   36947             :                 discard_const_p(char *, kwnames),
   36948             :                 &blob.data, &blob_length,
   36949             :                 &bigendian_obj,
   36950             :                 &ndr64_obj,
   36951             :                 &allow_remaining_obj)) {
   36952           0 :                 return NULL;
   36953             :         }
   36954           0 :         blob.length = blob_length;
   36955             : 
   36956           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36957           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   36958             :         }
   36959           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36960           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   36961             :         }
   36962             : 
   36963           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   36964           0 :                 allow_remaining = true;
   36965             :         }
   36966             : 
   36967           0 :         return py_netr_LogonControl_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   36968             : }
   36969             : 
   36970           0 : static PyObject *py_netr_LogonControl_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   36971             : {
   36972           0 :         const struct ndr_interface_call *call = NULL;
   36973           0 :         struct netr_LogonControl *object = (struct netr_LogonControl *)pytalloc_get_ptr(py_obj);
   36974             :         PyObject *ret;
   36975             :         char *retstr;
   36976             : 
   36977           0 :         if (ndr_table_netlogon.num_calls < 13) {
   36978           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl_ndr_print");
   36979           0 :                 return NULL;
   36980             :         }
   36981           0 :         call = &ndr_table_netlogon.calls[12];
   36982             : 
   36983           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   36984           0 :         ret = PyUnicode_FromString(retstr);
   36985           0 :         TALLOC_FREE(retstr);
   36986             : 
   36987           0 :         return ret;
   36988             : }
   36989             : 
   36990           0 : static PyObject *py_netr_LogonControl_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   36991             : {
   36992           0 :         return py_netr_LogonControl_ndr_print(py_obj, "netr_LogonControl_in", NDR_IN);
   36993             : }
   36994             : 
   36995           0 : static PyObject *py_netr_LogonControl_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   36996             : {
   36997           0 :         return py_netr_LogonControl_ndr_print(py_obj, "netr_LogonControl_out", NDR_OUT);
   36998             : }
   36999             : 
   37000             : static PyMethodDef py_netr_LogonControl_methods[] = {
   37001             :         { "opnum", (PyCFunction)py_netr_LogonControl_ndr_opnum, METH_NOARGS|METH_CLASS,
   37002             :                 "netlogon.netr_LogonControl.opnum() -> 12 (0x0c) " },
   37003             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   37004             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   37005             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   37006             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   37007             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   37008             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   37009             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   37010             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   37011             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonControl_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   37012             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonControl_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   37013             :         { NULL, NULL, 0, NULL }
   37014             : };
   37015             : 
   37016             : 
   37017             : static PyTypeObject netr_LogonControl_Type = {
   37018             :         PyVarObject_HEAD_INIT(NULL, 0)
   37019             :         .tp_name = "netlogon.netr_LogonControl",
   37020             :         .tp_getset = py_netr_LogonControl_getsetters,
   37021             :         .tp_methods = py_netr_LogonControl_methods,
   37022             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   37023             :         .tp_new = py_netr_LogonControl_new,
   37024             : };
   37025             : 
   37026           0 : static bool pack_py_netr_LogonControl_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonControl *r)
   37027             : {
   37028             :         PyObject *py_logon_server;
   37029             :         PyObject *py_function_code;
   37030             :         PyObject *py_level;
   37031           0 :         const char *kwnames[] = {
   37032             :                 "logon_server", "function_code", "level", NULL
   37033             :         };
   37034             : 
   37035           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:netr_LogonControl", discard_const_p(char *, kwnames), &py_logon_server, &py_function_code, &py_level)) {
   37036           0 :                 return false;
   37037             :         }
   37038             : 
   37039           0 :         if (py_logon_server == NULL) {
   37040           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_server");
   37041           0 :                 return false;
   37042             :         }
   37043           0 :         if (py_logon_server == Py_None) {
   37044           0 :                 r->in.logon_server = NULL;
   37045             :         } else {
   37046           0 :                 r->in.logon_server = NULL;
   37047             :                 {
   37048             :                         const char *test_str;
   37049             :                         const char *talloc_str;
   37050           0 :                         PyObject *unicode = NULL;
   37051           0 :                         if (PyUnicode_Check(py_logon_server)) {
   37052           0 :                                 unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   37053           0 :                                 if (unicode == NULL) {
   37054           0 :                                         PyErr_NoMemory();
   37055           0 :                                         return false;
   37056             :                                 }
   37057           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37058           0 :                         } else if (PyBytes_Check(py_logon_server)) {
   37059           0 :                                 test_str = PyBytes_AS_STRING(py_logon_server);
   37060             :                         } else {
   37061           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   37062           0 :                                 return false;
   37063             :                         }
   37064           0 :                         talloc_str = talloc_strdup(r, test_str);
   37065           0 :                         if (unicode != NULL) {
   37066           0 :                                 Py_DECREF(unicode);
   37067             :                         }
   37068           0 :                         if (talloc_str == NULL) {
   37069           0 :                                 PyErr_NoMemory();
   37070           0 :                                 return false;
   37071             :                         }
   37072           0 :                         r->in.logon_server = talloc_str;
   37073             :                 }
   37074             :         }
   37075           0 :         if (py_function_code == NULL) {
   37076           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.function_code");
   37077           0 :                 return false;
   37078             :         }
   37079             :         {
   37080           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.function_code));
   37081           0 :                 if (PyLong_Check(py_function_code)) {
   37082             :                         unsigned long long test_var;
   37083           0 :                         test_var = PyLong_AsUnsignedLongLong(py_function_code);
   37084           0 :                         if (PyErr_Occurred() != NULL) {
   37085           0 :                                 return false;
   37086             :                         }
   37087           0 :                         if (test_var > uint_max) {
   37088           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   37089             :                                   PyLong_Type.tp_name, uint_max, test_var);
   37090           0 :                                 return false;
   37091             :                         }
   37092           0 :                         r->in.function_code = test_var;
   37093             :                 } else {
   37094           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   37095             :                           PyLong_Type.tp_name);
   37096           0 :                         return false;
   37097             :                 }
   37098             :         }
   37099           0 :         if (py_level == NULL) {
   37100           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   37101           0 :                 return false;
   37102             :         }
   37103             :         {
   37104           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   37105           0 :                 if (PyLong_Check(py_level)) {
   37106             :                         unsigned long long test_var;
   37107           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   37108           0 :                         if (PyErr_Occurred() != NULL) {
   37109           0 :                                 return false;
   37110             :                         }
   37111           0 :                         if (test_var > uint_max) {
   37112           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   37113             :                                   PyLong_Type.tp_name, uint_max, test_var);
   37114           0 :                                 return false;
   37115             :                         }
   37116           0 :                         r->in.level = test_var;
   37117             :                 } else {
   37118           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   37119             :                           PyLong_Type.tp_name);
   37120           0 :                         return false;
   37121             :                 }
   37122             :         }
   37123           0 :         return true;
   37124             : }
   37125             : 
   37126           0 : static PyObject *unpack_py_netr_LogonControl_args_out(struct netr_LogonControl *r)
   37127             : {
   37128             :         PyObject *result;
   37129             :         PyObject *py_query;
   37130           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");
   37131           0 :         if (py_query == NULL) {
   37132           0 :                 return NULL;
   37133             :         }
   37134           0 :         result = py_query;
   37135           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   37136           0 :                 PyErr_SetWERROR(r->out.result);
   37137           0 :                 return NULL;
   37138             :         }
   37139             : 
   37140           0 :         return result;
   37141             : }
   37142             : 
   37143             : 
   37144           0 : static PyObject *py_netr_GetAnyDCName_in_get_logon_server(PyObject *obj, void *closure)
   37145             : {
   37146           0 :         struct netr_GetAnyDCName *object = (struct netr_GetAnyDCName *)pytalloc_get_ptr(obj);
   37147             :         PyObject *py_logon_server;
   37148           0 :         if (object->in.logon_server == NULL) {
   37149           0 :                 Py_RETURN_NONE;
   37150             :         }
   37151           0 :         if (object->in.logon_server == NULL) {
   37152           0 :                 py_logon_server = Py_None;
   37153           0 :                 Py_INCREF(py_logon_server);
   37154             :         } else {
   37155           0 :                 if (object->in.logon_server == NULL) {
   37156           0 :                         py_logon_server = Py_None;
   37157           0 :                         Py_INCREF(py_logon_server);
   37158             :                 } else {
   37159           0 :                         py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   37160             :                 }
   37161             :         }
   37162           0 :         return py_logon_server;
   37163             : }
   37164             : 
   37165           0 : static int py_netr_GetAnyDCName_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   37166             : {
   37167           0 :         struct netr_GetAnyDCName *object = (struct netr_GetAnyDCName *)pytalloc_get_ptr(py_obj);
   37168           0 :         if (value == NULL) {
   37169           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_server");
   37170           0 :                 return -1;
   37171             :         }
   37172           0 :         if (value == Py_None) {
   37173           0 :                 object->in.logon_server = NULL;
   37174             :         } else {
   37175           0 :                 object->in.logon_server = NULL;
   37176             :                 {
   37177             :                         const char *test_str;
   37178             :                         const char *talloc_str;
   37179           0 :                         PyObject *unicode = NULL;
   37180           0 :                         if (PyUnicode_Check(value)) {
   37181           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   37182           0 :                                 if (unicode == NULL) {
   37183           0 :                                         PyErr_NoMemory();
   37184           0 :                                         return -1;
   37185             :                                 }
   37186           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37187           0 :                         } else if (PyBytes_Check(value)) {
   37188           0 :                                 test_str = PyBytes_AS_STRING(value);
   37189             :                         } else {
   37190           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   37191           0 :                                 return -1;
   37192             :                         }
   37193           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   37194           0 :                         if (unicode != NULL) {
   37195           0 :                                 Py_DECREF(unicode);
   37196             :                         }
   37197           0 :                         if (talloc_str == NULL) {
   37198           0 :                                 PyErr_NoMemory();
   37199           0 :                                 return -1;
   37200             :                         }
   37201           0 :                         object->in.logon_server = talloc_str;
   37202             :                 }
   37203             :         }
   37204           0 :         return 0;
   37205             : }
   37206             : 
   37207           0 : static PyObject *py_netr_GetAnyDCName_in_get_domainname(PyObject *obj, void *closure)
   37208             : {
   37209           0 :         struct netr_GetAnyDCName *object = (struct netr_GetAnyDCName *)pytalloc_get_ptr(obj);
   37210             :         PyObject *py_domainname;
   37211           0 :         if (object->in.domainname == NULL) {
   37212           0 :                 Py_RETURN_NONE;
   37213             :         }
   37214           0 :         if (object->in.domainname == NULL) {
   37215           0 :                 py_domainname = Py_None;
   37216           0 :                 Py_INCREF(py_domainname);
   37217             :         } else {
   37218           0 :                 if (object->in.domainname == NULL) {
   37219           0 :                         py_domainname = Py_None;
   37220           0 :                         Py_INCREF(py_domainname);
   37221             :                 } else {
   37222           0 :                         py_domainname = PyUnicode_Decode(object->in.domainname, strlen(object->in.domainname), "utf-8", "ignore");
   37223             :                 }
   37224             :         }
   37225           0 :         return py_domainname;
   37226             : }
   37227             : 
   37228           0 : static int py_netr_GetAnyDCName_in_set_domainname(PyObject *py_obj, PyObject *value, void *closure)
   37229             : {
   37230           0 :         struct netr_GetAnyDCName *object = (struct netr_GetAnyDCName *)pytalloc_get_ptr(py_obj);
   37231           0 :         if (value == NULL) {
   37232           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domainname");
   37233           0 :                 return -1;
   37234             :         }
   37235           0 :         if (value == Py_None) {
   37236           0 :                 object->in.domainname = NULL;
   37237             :         } else {
   37238           0 :                 object->in.domainname = NULL;
   37239             :                 {
   37240             :                         const char *test_str;
   37241             :                         const char *talloc_str;
   37242           0 :                         PyObject *unicode = NULL;
   37243           0 :                         if (PyUnicode_Check(value)) {
   37244           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   37245           0 :                                 if (unicode == NULL) {
   37246           0 :                                         PyErr_NoMemory();
   37247           0 :                                         return -1;
   37248             :                                 }
   37249           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37250           0 :                         } else if (PyBytes_Check(value)) {
   37251           0 :                                 test_str = PyBytes_AS_STRING(value);
   37252             :                         } else {
   37253           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   37254           0 :                                 return -1;
   37255             :                         }
   37256           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   37257           0 :                         if (unicode != NULL) {
   37258           0 :                                 Py_DECREF(unicode);
   37259             :                         }
   37260           0 :                         if (talloc_str == NULL) {
   37261           0 :                                 PyErr_NoMemory();
   37262           0 :                                 return -1;
   37263             :                         }
   37264           0 :                         object->in.domainname = talloc_str;
   37265             :                 }
   37266             :         }
   37267           0 :         return 0;
   37268             : }
   37269             : 
   37270           0 : static PyObject *py_netr_GetAnyDCName_out_get_dcname(PyObject *obj, void *closure)
   37271             : {
   37272           0 :         struct netr_GetAnyDCName *object = (struct netr_GetAnyDCName *)pytalloc_get_ptr(obj);
   37273             :         PyObject *py_dcname;
   37274           0 :         if (object->out.dcname == NULL) {
   37275           0 :                 Py_RETURN_NONE;
   37276             :         }
   37277           0 :         if (*object->out.dcname == NULL) {
   37278           0 :                 py_dcname = Py_None;
   37279           0 :                 Py_INCREF(py_dcname);
   37280             :         } else {
   37281           0 :                 if (*object->out.dcname == NULL) {
   37282           0 :                         py_dcname = Py_None;
   37283           0 :                         Py_INCREF(py_dcname);
   37284             :                 } else {
   37285           0 :                         py_dcname = PyUnicode_Decode(*object->out.dcname, strlen(*object->out.dcname), "utf-8", "ignore");
   37286             :                 }
   37287             :         }
   37288           0 :         return py_dcname;
   37289             : }
   37290             : 
   37291           0 : static int py_netr_GetAnyDCName_out_set_dcname(PyObject *py_obj, PyObject *value, void *closure)
   37292             : {
   37293           0 :         struct netr_GetAnyDCName *object = (struct netr_GetAnyDCName *)pytalloc_get_ptr(py_obj);
   37294           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.dcname));
   37295           0 :         if (value == NULL) {
   37296           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.dcname");
   37297           0 :                 return -1;
   37298             :         }
   37299           0 :         object->out.dcname = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.dcname);
   37300           0 :         if (object->out.dcname == NULL) {
   37301           0 :                 PyErr_NoMemory();
   37302           0 :                 return -1;
   37303             :         }
   37304           0 :         if (value == Py_None) {
   37305           0 :                 *object->out.dcname = NULL;
   37306             :         } else {
   37307           0 :                 *object->out.dcname = NULL;
   37308             :                 {
   37309             :                         const char *test_str;
   37310             :                         const char *talloc_str;
   37311           0 :                         PyObject *unicode = NULL;
   37312           0 :                         if (PyUnicode_Check(value)) {
   37313           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   37314           0 :                                 if (unicode == NULL) {
   37315           0 :                                         PyErr_NoMemory();
   37316           0 :                                         return -1;
   37317             :                                 }
   37318           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37319           0 :                         } else if (PyBytes_Check(value)) {
   37320           0 :                                 test_str = PyBytes_AS_STRING(value);
   37321             :                         } else {
   37322           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   37323           0 :                                 return -1;
   37324             :                         }
   37325           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   37326           0 :                         if (unicode != NULL) {
   37327           0 :                                 Py_DECREF(unicode);
   37328             :                         }
   37329           0 :                         if (talloc_str == NULL) {
   37330           0 :                                 PyErr_NoMemory();
   37331           0 :                                 return -1;
   37332             :                         }
   37333           0 :                         *object->out.dcname = talloc_str;
   37334             :                 }
   37335             :         }
   37336           0 :         return 0;
   37337             : }
   37338             : 
   37339           0 : static PyObject *py_netr_GetAnyDCName_get_result(PyObject *obj, void *closure)
   37340             : {
   37341           0 :         struct netr_GetAnyDCName *object = (struct netr_GetAnyDCName *)pytalloc_get_ptr(obj);
   37342             :         PyObject *py_result;
   37343           0 :         py_result = PyErr_FromWERROR(object->out.result);
   37344           0 :         return py_result;
   37345             : }
   37346             : 
   37347           0 : static int py_netr_GetAnyDCName_set_result(PyObject *py_obj, PyObject *value, void *closure)
   37348             : {
   37349           0 :         struct netr_GetAnyDCName *object = (struct netr_GetAnyDCName *)pytalloc_get_ptr(py_obj);
   37350           0 :         if (value == NULL) {
   37351           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   37352           0 :                 return -1;
   37353             :         }
   37354           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   37355           0 :         return 0;
   37356             : }
   37357             : 
   37358             : static PyGetSetDef py_netr_GetAnyDCName_getsetters[] = {
   37359             :         {
   37360             :                 .name = discard_const_p(char, "in_logon_server"),
   37361             :                 .get = py_netr_GetAnyDCName_in_get_logon_server,
   37362             :                 .set = py_netr_GetAnyDCName_in_set_logon_server,
   37363             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   37364             :         },
   37365             :         {
   37366             :                 .name = discard_const_p(char, "in_domainname"),
   37367             :                 .get = py_netr_GetAnyDCName_in_get_domainname,
   37368             :                 .set = py_netr_GetAnyDCName_in_set_domainname,
   37369             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   37370             :         },
   37371             :         {
   37372             :                 .name = discard_const_p(char, "out_dcname"),
   37373             :                 .get = py_netr_GetAnyDCName_out_get_dcname,
   37374             :                 .set = py_netr_GetAnyDCName_out_set_dcname,
   37375             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   37376             :         },
   37377             :         {
   37378             :                 .name = discard_const_p(char, "result"),
   37379             :                 .get = py_netr_GetAnyDCName_get_result,
   37380             :                 .set = py_netr_GetAnyDCName_set_result,
   37381             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   37382             :         },
   37383             :         { .name = NULL }
   37384             : };
   37385             : 
   37386           0 : static PyObject *py_netr_GetAnyDCName_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   37387             : {
   37388           0 :         PyObject *self = pytalloc_new(struct netr_GetAnyDCName, type);
   37389           0 :         return self;
   37390             : }
   37391             : 
   37392           0 : static PyObject *py_netr_GetAnyDCName_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   37393             : {
   37394             : 
   37395             : 
   37396           0 :         return PyLong_FromLong(13);
   37397             : }
   37398             : 
   37399           0 : static PyObject *py_netr_GetAnyDCName_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   37400             : {
   37401           0 :         const struct ndr_interface_call *call = NULL;
   37402           0 :         struct netr_GetAnyDCName *object = (struct netr_GetAnyDCName *)pytalloc_get_ptr(py_obj);
   37403           0 :         PyObject *ret = NULL;
   37404           0 :         struct ndr_push *push = NULL;
   37405             :         DATA_BLOB blob;
   37406             :         enum ndr_err_code err;
   37407             : 
   37408           0 :         if (ndr_table_netlogon.num_calls < 14) {
   37409           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetAnyDCName_ndr_pack");
   37410           0 :                 return NULL;
   37411             :         }
   37412           0 :         call = &ndr_table_netlogon.calls[13];
   37413             : 
   37414           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   37415           0 :         if (push == NULL) {
   37416           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   37417           0 :                 return NULL;
   37418             :         }
   37419             : 
   37420           0 :         push->flags |= ndr_push_flags;
   37421             : 
   37422           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   37423           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   37424           0 :                 TALLOC_FREE(push);
   37425           0 :                 PyErr_SetNdrError(err);
   37426           0 :                 return NULL;
   37427             :         }
   37428           0 :         blob = ndr_push_blob(push);
   37429           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   37430           0 :         TALLOC_FREE(push);
   37431           0 :         return ret;
   37432             : }
   37433             : 
   37434           0 : static PyObject *py_netr_GetAnyDCName_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37435             : {
   37436           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   37437           0 :         PyObject *bigendian_obj = NULL;
   37438           0 :         PyObject *ndr64_obj = NULL;
   37439           0 :         uint32_t ndr_push_flags = 0;
   37440             : 
   37441           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   37442             :                 discard_const_p(char *, kwnames),
   37443             :                 &bigendian_obj,
   37444             :                 &ndr64_obj)) {
   37445           0 :                 return NULL;
   37446             :         }
   37447             : 
   37448           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37449           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   37450             :         }
   37451           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37452           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   37453             :         }
   37454             : 
   37455           0 :         return py_netr_GetAnyDCName_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   37456             : }
   37457             : 
   37458           0 : static PyObject *py_netr_GetAnyDCName_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37459             : {
   37460           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   37461           0 :         PyObject *bigendian_obj = NULL;
   37462           0 :         PyObject *ndr64_obj = NULL;
   37463           0 :         uint32_t ndr_push_flags = 0;
   37464             : 
   37465           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   37466             :                 discard_const_p(char *, kwnames),
   37467             :                 &bigendian_obj,
   37468             :                 &ndr64_obj)) {
   37469           0 :                 return NULL;
   37470             :         }
   37471             : 
   37472           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37473           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   37474             :         }
   37475           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37476           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   37477             :         }
   37478             : 
   37479           0 :         return py_netr_GetAnyDCName_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   37480             : }
   37481             : 
   37482           0 : static PyObject *py_netr_GetAnyDCName_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   37483             : {
   37484           0 :         const struct ndr_interface_call *call = NULL;
   37485           0 :         struct netr_GetAnyDCName *object = (struct netr_GetAnyDCName *)pytalloc_get_ptr(py_obj);
   37486           0 :         struct ndr_pull *pull = NULL;
   37487             :         enum ndr_err_code err;
   37488             : 
   37489           0 :         if (ndr_table_netlogon.num_calls < 14) {
   37490           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetAnyDCName_ndr_unpack");
   37491           0 :                 return NULL;
   37492             :         }
   37493           0 :         call = &ndr_table_netlogon.calls[13];
   37494             : 
   37495           0 :         pull = ndr_pull_init_blob(blob, object);
   37496           0 :         if (pull == NULL) {
   37497           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   37498           0 :                 return NULL;
   37499             :         }
   37500             : 
   37501           0 :         pull->flags |= ndr_pull_flags;
   37502             : 
   37503           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   37504           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   37505           0 :                 TALLOC_FREE(pull);
   37506           0 :                 PyErr_SetNdrError(err);
   37507           0 :                 return NULL;
   37508             :         }
   37509           0 :         if (!allow_remaining) {
   37510             :                 uint32_t highest_ofs;
   37511             : 
   37512           0 :                 if (pull->offset > pull->relative_highest_offset) {
   37513           0 :                         highest_ofs = pull->offset;
   37514             :                 } else {
   37515           0 :                         highest_ofs = pull->relative_highest_offset;
   37516             :                 }
   37517           0 :                 if (highest_ofs < pull->data_size) {
   37518           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   37519             :                                 "not all bytes consumed ofs[%u] size[%u]",
   37520             :                                 highest_ofs, pull->data_size);
   37521           0 :                         TALLOC_FREE(pull);
   37522           0 :                         PyErr_SetNdrError(err);
   37523           0 :                         return NULL;
   37524             :                 }
   37525             :         }
   37526             : 
   37527           0 :         TALLOC_FREE(pull);
   37528           0 :         Py_RETURN_NONE;
   37529             : }
   37530             : 
   37531           0 : static PyObject *py_netr_GetAnyDCName_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37532             : {
   37533             :         DATA_BLOB blob;
   37534           0 :         Py_ssize_t blob_length = 0;
   37535           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   37536           0 :         PyObject *bigendian_obj = NULL;
   37537           0 :         PyObject *ndr64_obj = NULL;
   37538           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   37539           0 :         PyObject *allow_remaining_obj = NULL;
   37540           0 :         bool allow_remaining = false;
   37541             : 
   37542           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   37543             :                 discard_const_p(char *, kwnames),
   37544             :                 &blob.data, &blob_length,
   37545             :                 &bigendian_obj,
   37546             :                 &ndr64_obj,
   37547             :                 &allow_remaining_obj)) {
   37548           0 :                 return NULL;
   37549             :         }
   37550           0 :         blob.length = blob_length;
   37551             : 
   37552           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37553           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   37554             :         }
   37555           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37556           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   37557             :         }
   37558             : 
   37559           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   37560           0 :                 allow_remaining = true;
   37561             :         }
   37562             : 
   37563           0 :         return py_netr_GetAnyDCName_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   37564             : }
   37565             : 
   37566           0 : static PyObject *py_netr_GetAnyDCName_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37567             : {
   37568             :         DATA_BLOB blob;
   37569           0 :         Py_ssize_t blob_length = 0;
   37570           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   37571           0 :         PyObject *bigendian_obj = NULL;
   37572           0 :         PyObject *ndr64_obj = NULL;
   37573           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   37574           0 :         PyObject *allow_remaining_obj = NULL;
   37575           0 :         bool allow_remaining = false;
   37576             : 
   37577           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   37578             :                 discard_const_p(char *, kwnames),
   37579             :                 &blob.data, &blob_length,
   37580             :                 &bigendian_obj,
   37581             :                 &ndr64_obj,
   37582             :                 &allow_remaining_obj)) {
   37583           0 :                 return NULL;
   37584             :         }
   37585           0 :         blob.length = blob_length;
   37586             : 
   37587           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37588           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   37589             :         }
   37590           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37591           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   37592             :         }
   37593             : 
   37594           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   37595           0 :                 allow_remaining = true;
   37596             :         }
   37597             : 
   37598           0 :         return py_netr_GetAnyDCName_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   37599             : }
   37600             : 
   37601           0 : static PyObject *py_netr_GetAnyDCName_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   37602             : {
   37603           0 :         const struct ndr_interface_call *call = NULL;
   37604           0 :         struct netr_GetAnyDCName *object = (struct netr_GetAnyDCName *)pytalloc_get_ptr(py_obj);
   37605             :         PyObject *ret;
   37606             :         char *retstr;
   37607             : 
   37608           0 :         if (ndr_table_netlogon.num_calls < 14) {
   37609           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetAnyDCName_ndr_print");
   37610           0 :                 return NULL;
   37611             :         }
   37612           0 :         call = &ndr_table_netlogon.calls[13];
   37613             : 
   37614           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   37615           0 :         ret = PyUnicode_FromString(retstr);
   37616           0 :         TALLOC_FREE(retstr);
   37617             : 
   37618           0 :         return ret;
   37619             : }
   37620             : 
   37621           0 : static PyObject *py_netr_GetAnyDCName_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   37622             : {
   37623           0 :         return py_netr_GetAnyDCName_ndr_print(py_obj, "netr_GetAnyDCName_in", NDR_IN);
   37624             : }
   37625             : 
   37626           0 : static PyObject *py_netr_GetAnyDCName_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   37627             : {
   37628           0 :         return py_netr_GetAnyDCName_ndr_print(py_obj, "netr_GetAnyDCName_out", NDR_OUT);
   37629             : }
   37630             : 
   37631             : static PyMethodDef py_netr_GetAnyDCName_methods[] = {
   37632             :         { "opnum", (PyCFunction)py_netr_GetAnyDCName_ndr_opnum, METH_NOARGS|METH_CLASS,
   37633             :                 "netlogon.netr_GetAnyDCName.opnum() -> 13 (0x0d) " },
   37634             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetAnyDCName_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   37635             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   37636             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetAnyDCName_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   37637             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   37638             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetAnyDCName_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   37639             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   37640             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetAnyDCName_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   37641             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   37642             :         { "__ndr_print_in__", (PyCFunction)py_netr_GetAnyDCName_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   37643             :         { "__ndr_print_out__", (PyCFunction)py_netr_GetAnyDCName_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   37644             :         { NULL, NULL, 0, NULL }
   37645             : };
   37646             : 
   37647             : 
   37648             : static PyTypeObject netr_GetAnyDCName_Type = {
   37649             :         PyVarObject_HEAD_INIT(NULL, 0)
   37650             :         .tp_name = "netlogon.netr_GetAnyDCName",
   37651             :         .tp_getset = py_netr_GetAnyDCName_getsetters,
   37652             :         .tp_methods = py_netr_GetAnyDCName_methods,
   37653             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   37654             :         .tp_new = py_netr_GetAnyDCName_new,
   37655             : };
   37656             : 
   37657           0 : static bool pack_py_netr_GetAnyDCName_args_in(PyObject *args, PyObject *kwargs, struct netr_GetAnyDCName *r)
   37658             : {
   37659             :         PyObject *py_logon_server;
   37660             :         PyObject *py_domainname;
   37661           0 :         const char *kwnames[] = {
   37662             :                 "logon_server", "domainname", NULL
   37663             :         };
   37664             : 
   37665           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:netr_GetAnyDCName", discard_const_p(char *, kwnames), &py_logon_server, &py_domainname)) {
   37666           0 :                 return false;
   37667             :         }
   37668             : 
   37669           0 :         if (py_logon_server == NULL) {
   37670           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_server");
   37671           0 :                 return false;
   37672             :         }
   37673           0 :         if (py_logon_server == Py_None) {
   37674           0 :                 r->in.logon_server = NULL;
   37675             :         } else {
   37676           0 :                 r->in.logon_server = NULL;
   37677             :                 {
   37678             :                         const char *test_str;
   37679             :                         const char *talloc_str;
   37680           0 :                         PyObject *unicode = NULL;
   37681           0 :                         if (PyUnicode_Check(py_logon_server)) {
   37682           0 :                                 unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   37683           0 :                                 if (unicode == NULL) {
   37684           0 :                                         PyErr_NoMemory();
   37685           0 :                                         return false;
   37686             :                                 }
   37687           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37688           0 :                         } else if (PyBytes_Check(py_logon_server)) {
   37689           0 :                                 test_str = PyBytes_AS_STRING(py_logon_server);
   37690             :                         } else {
   37691           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   37692           0 :                                 return false;
   37693             :                         }
   37694           0 :                         talloc_str = talloc_strdup(r, test_str);
   37695           0 :                         if (unicode != NULL) {
   37696           0 :                                 Py_DECREF(unicode);
   37697             :                         }
   37698           0 :                         if (talloc_str == NULL) {
   37699           0 :                                 PyErr_NoMemory();
   37700           0 :                                 return false;
   37701             :                         }
   37702           0 :                         r->in.logon_server = talloc_str;
   37703             :                 }
   37704             :         }
   37705           0 :         if (py_domainname == NULL) {
   37706           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domainname");
   37707           0 :                 return false;
   37708             :         }
   37709           0 :         if (py_domainname == Py_None) {
   37710           0 :                 r->in.domainname = NULL;
   37711             :         } else {
   37712           0 :                 r->in.domainname = NULL;
   37713             :                 {
   37714             :                         const char *test_str;
   37715             :                         const char *talloc_str;
   37716           0 :                         PyObject *unicode = NULL;
   37717           0 :                         if (PyUnicode_Check(py_domainname)) {
   37718           0 :                                 unicode = PyUnicode_AsEncodedString(py_domainname, "utf-8", "ignore");
   37719           0 :                                 if (unicode == NULL) {
   37720           0 :                                         PyErr_NoMemory();
   37721           0 :                                         return false;
   37722             :                                 }
   37723           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37724           0 :                         } else if (PyBytes_Check(py_domainname)) {
   37725           0 :                                 test_str = PyBytes_AS_STRING(py_domainname);
   37726             :                         } else {
   37727           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domainname)->tp_name);
   37728           0 :                                 return false;
   37729             :                         }
   37730           0 :                         talloc_str = talloc_strdup(r, test_str);
   37731           0 :                         if (unicode != NULL) {
   37732           0 :                                 Py_DECREF(unicode);
   37733             :                         }
   37734           0 :                         if (talloc_str == NULL) {
   37735           0 :                                 PyErr_NoMemory();
   37736           0 :                                 return false;
   37737             :                         }
   37738           0 :                         r->in.domainname = talloc_str;
   37739             :                 }
   37740             :         }
   37741           0 :         return true;
   37742             : }
   37743             : 
   37744           0 : static PyObject *unpack_py_netr_GetAnyDCName_args_out(struct netr_GetAnyDCName *r)
   37745             : {
   37746             :         PyObject *result;
   37747             :         PyObject *py_dcname;
   37748           0 :         if (*r->out.dcname == NULL) {
   37749           0 :                 py_dcname = Py_None;
   37750           0 :                 Py_INCREF(py_dcname);
   37751             :         } else {
   37752           0 :                 if (*r->out.dcname == NULL) {
   37753           0 :                         py_dcname = Py_None;
   37754           0 :                         Py_INCREF(py_dcname);
   37755             :                 } else {
   37756           0 :                         py_dcname = PyUnicode_Decode(*r->out.dcname, strlen(*r->out.dcname), "utf-8", "ignore");
   37757             :                 }
   37758             :         }
   37759           0 :         result = py_dcname;
   37760           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   37761           0 :                 PyErr_SetWERROR(r->out.result);
   37762           0 :                 return NULL;
   37763             :         }
   37764             : 
   37765           0 :         return result;
   37766             : }
   37767             : 
   37768             : 
   37769           0 : static PyObject *py_netr_LogonControl2_in_get_logon_server(PyObject *obj, void *closure)
   37770             : {
   37771           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(obj);
   37772             :         PyObject *py_logon_server;
   37773           0 :         if (object->in.logon_server == NULL) {
   37774           0 :                 Py_RETURN_NONE;
   37775             :         }
   37776           0 :         if (object->in.logon_server == NULL) {
   37777           0 :                 py_logon_server = Py_None;
   37778           0 :                 Py_INCREF(py_logon_server);
   37779             :         } else {
   37780           0 :                 if (object->in.logon_server == NULL) {
   37781           0 :                         py_logon_server = Py_None;
   37782           0 :                         Py_INCREF(py_logon_server);
   37783             :                 } else {
   37784           0 :                         py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   37785             :                 }
   37786             :         }
   37787           0 :         return py_logon_server;
   37788             : }
   37789             : 
   37790           0 : static int py_netr_LogonControl2_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   37791             : {
   37792           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(py_obj);
   37793           0 :         if (value == NULL) {
   37794           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_server");
   37795           0 :                 return -1;
   37796             :         }
   37797           0 :         if (value == Py_None) {
   37798           0 :                 object->in.logon_server = NULL;
   37799             :         } else {
   37800           0 :                 object->in.logon_server = NULL;
   37801             :                 {
   37802             :                         const char *test_str;
   37803             :                         const char *talloc_str;
   37804           0 :                         PyObject *unicode = NULL;
   37805           0 :                         if (PyUnicode_Check(value)) {
   37806           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   37807           0 :                                 if (unicode == NULL) {
   37808           0 :                                         PyErr_NoMemory();
   37809           0 :                                         return -1;
   37810             :                                 }
   37811           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   37812           0 :                         } else if (PyBytes_Check(value)) {
   37813           0 :                                 test_str = PyBytes_AS_STRING(value);
   37814             :                         } else {
   37815           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   37816           0 :                                 return -1;
   37817             :                         }
   37818           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   37819           0 :                         if (unicode != NULL) {
   37820           0 :                                 Py_DECREF(unicode);
   37821             :                         }
   37822           0 :                         if (talloc_str == NULL) {
   37823           0 :                                 PyErr_NoMemory();
   37824           0 :                                 return -1;
   37825             :                         }
   37826           0 :                         object->in.logon_server = talloc_str;
   37827             :                 }
   37828             :         }
   37829           0 :         return 0;
   37830             : }
   37831             : 
   37832           0 : static PyObject *py_netr_LogonControl2_in_get_function_code(PyObject *obj, void *closure)
   37833             : {
   37834           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(obj);
   37835             :         PyObject *py_function_code;
   37836           0 :         py_function_code = PyLong_FromUnsignedLongLong((uint32_t)object->in.function_code);
   37837           0 :         return py_function_code;
   37838             : }
   37839             : 
   37840           0 : static int py_netr_LogonControl2_in_set_function_code(PyObject *py_obj, PyObject *value, void *closure)
   37841             : {
   37842           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(py_obj);
   37843           0 :         if (value == NULL) {
   37844           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.function_code");
   37845           0 :                 return -1;
   37846             :         }
   37847             :         {
   37848           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.function_code));
   37849           0 :                 if (PyLong_Check(value)) {
   37850             :                         unsigned long long test_var;
   37851           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   37852           0 :                         if (PyErr_Occurred() != NULL) {
   37853           0 :                                 return -1;
   37854             :                         }
   37855           0 :                         if (test_var > uint_max) {
   37856           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   37857             :                                   PyLong_Type.tp_name, uint_max, test_var);
   37858           0 :                                 return -1;
   37859             :                         }
   37860           0 :                         object->in.function_code = test_var;
   37861             :                 } else {
   37862           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   37863             :                           PyLong_Type.tp_name);
   37864           0 :                         return -1;
   37865             :                 }
   37866             :         }
   37867           0 :         return 0;
   37868             : }
   37869             : 
   37870           0 : static PyObject *py_netr_LogonControl2_in_get_level(PyObject *obj, void *closure)
   37871             : {
   37872           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(obj);
   37873             :         PyObject *py_level;
   37874           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   37875           0 :         return py_level;
   37876             : }
   37877             : 
   37878           0 : static int py_netr_LogonControl2_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   37879             : {
   37880           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(py_obj);
   37881           0 :         if (value == NULL) {
   37882           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   37883           0 :                 return -1;
   37884             :         }
   37885             :         {
   37886           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   37887           0 :                 if (PyLong_Check(value)) {
   37888             :                         unsigned long long test_var;
   37889           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   37890           0 :                         if (PyErr_Occurred() != NULL) {
   37891           0 :                                 return -1;
   37892             :                         }
   37893           0 :                         if (test_var > uint_max) {
   37894           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   37895             :                                   PyLong_Type.tp_name, uint_max, test_var);
   37896           0 :                                 return -1;
   37897             :                         }
   37898           0 :                         object->in.level = test_var;
   37899             :                 } else {
   37900           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   37901             :                           PyLong_Type.tp_name);
   37902           0 :                         return -1;
   37903             :                 }
   37904             :         }
   37905           0 :         return 0;
   37906             : }
   37907             : 
   37908           0 : static PyObject *py_netr_LogonControl2_in_get_data(PyObject *obj, void *closure)
   37909             : {
   37910           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(obj);
   37911             :         PyObject *py_data;
   37912           0 :         if (object->in.data == NULL) {
   37913           0 :                 Py_RETURN_NONE;
   37914             :         }
   37915           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");
   37916           0 :         if (py_data == NULL) {
   37917           0 :                 return NULL;
   37918             :         }
   37919           0 :         return py_data;
   37920             : }
   37921             : 
   37922           0 : static int py_netr_LogonControl2_in_set_data(PyObject *py_obj, PyObject *value, void *closure)
   37923             : {
   37924           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(py_obj);
   37925           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.data));
   37926           0 :         if (value == NULL) {
   37927           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.data");
   37928           0 :                 return -1;
   37929             :         }
   37930           0 :         object->in.data = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.data);
   37931           0 :         if (object->in.data == NULL) {
   37932           0 :                 PyErr_NoMemory();
   37933           0 :                 return -1;
   37934             :         }
   37935             :         {
   37936             :                 union netr_CONTROL_DATA_INFORMATION *data_switch_1;
   37937           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");
   37938           0 :                 if (data_switch_1 == NULL) {
   37939           0 :                         return -1;
   37940             :                 }
   37941           0 :                 object->in.data = data_switch_1;
   37942             :         }
   37943           0 :         return 0;
   37944             : }
   37945             : 
   37946           0 : static PyObject *py_netr_LogonControl2_out_get_query(PyObject *obj, void *closure)
   37947             : {
   37948           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(obj);
   37949             :         PyObject *py_query;
   37950           0 :         if (object->out.query == NULL) {
   37951           0 :                 Py_RETURN_NONE;
   37952             :         }
   37953           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");
   37954           0 :         if (py_query == NULL) {
   37955           0 :                 return NULL;
   37956             :         }
   37957           0 :         return py_query;
   37958             : }
   37959             : 
   37960           0 : static int py_netr_LogonControl2_out_set_query(PyObject *py_obj, PyObject *value, void *closure)
   37961             : {
   37962           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(py_obj);
   37963           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.query));
   37964           0 :         if (value == NULL) {
   37965           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.query");
   37966           0 :                 return -1;
   37967             :         }
   37968           0 :         object->out.query = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.query);
   37969           0 :         if (object->out.query == NULL) {
   37970           0 :                 PyErr_NoMemory();
   37971           0 :                 return -1;
   37972             :         }
   37973             :         {
   37974             :                 union netr_CONTROL_QUERY_INFORMATION *query_switch_1;
   37975           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");
   37976           0 :                 if (query_switch_1 == NULL) {
   37977           0 :                         return -1;
   37978             :                 }
   37979           0 :                 object->out.query = query_switch_1;
   37980             :         }
   37981           0 :         return 0;
   37982             : }
   37983             : 
   37984           0 : static PyObject *py_netr_LogonControl2_get_result(PyObject *obj, void *closure)
   37985             : {
   37986           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(obj);
   37987             :         PyObject *py_result;
   37988           0 :         py_result = PyErr_FromWERROR(object->out.result);
   37989           0 :         return py_result;
   37990             : }
   37991             : 
   37992           0 : static int py_netr_LogonControl2_set_result(PyObject *py_obj, PyObject *value, void *closure)
   37993             : {
   37994           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(py_obj);
   37995           0 :         if (value == NULL) {
   37996           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   37997           0 :                 return -1;
   37998             :         }
   37999           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   38000           0 :         return 0;
   38001             : }
   38002             : 
   38003             : static PyGetSetDef py_netr_LogonControl2_getsetters[] = {
   38004             :         {
   38005             :                 .name = discard_const_p(char, "in_logon_server"),
   38006             :                 .get = py_netr_LogonControl2_in_get_logon_server,
   38007             :                 .set = py_netr_LogonControl2_in_set_logon_server,
   38008             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   38009             :         },
   38010             :         {
   38011             :                 .name = discard_const_p(char, "in_function_code"),
   38012             :                 .get = py_netr_LogonControl2_in_get_function_code,
   38013             :                 .set = py_netr_LogonControl2_in_set_function_code,
   38014             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonControlCode")
   38015             :         },
   38016             :         {
   38017             :                 .name = discard_const_p(char, "in_level"),
   38018             :                 .get = py_netr_LogonControl2_in_get_level,
   38019             :                 .set = py_netr_LogonControl2_in_set_level,
   38020             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   38021             :         },
   38022             :         {
   38023             :                 .name = discard_const_p(char, "in_data"),
   38024             :                 .get = py_netr_LogonControl2_in_get_data,
   38025             :                 .set = py_netr_LogonControl2_in_set_data,
   38026             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CONTROL_DATA_INFORMATION")
   38027             :         },
   38028             :         {
   38029             :                 .name = discard_const_p(char, "out_query"),
   38030             :                 .get = py_netr_LogonControl2_out_get_query,
   38031             :                 .set = py_netr_LogonControl2_out_set_query,
   38032             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CONTROL_QUERY_INFORMATION")
   38033             :         },
   38034             :         {
   38035             :                 .name = discard_const_p(char, "result"),
   38036             :                 .get = py_netr_LogonControl2_get_result,
   38037             :                 .set = py_netr_LogonControl2_set_result,
   38038             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   38039             :         },
   38040             :         { .name = NULL }
   38041             : };
   38042             : 
   38043           0 : static PyObject *py_netr_LogonControl2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   38044             : {
   38045           0 :         PyObject *self = pytalloc_new(struct netr_LogonControl2, type);
   38046           0 :         struct netr_LogonControl2 *_self = (struct netr_LogonControl2 *)pytalloc_get_ptr(self);
   38047           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   38048           0 :         _self->in.data = talloc_zero(mem_ctx, union netr_CONTROL_DATA_INFORMATION);
   38049           0 :         _self->out.query = talloc_zero(mem_ctx, union netr_CONTROL_QUERY_INFORMATION);
   38050           0 :         return self;
   38051             : }
   38052             : 
   38053           0 : static PyObject *py_netr_LogonControl2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   38054             : {
   38055             : 
   38056             : 
   38057           0 :         return PyLong_FromLong(14);
   38058             : }
   38059             : 
   38060           0 : static PyObject *py_netr_LogonControl2_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   38061             : {
   38062           0 :         const struct ndr_interface_call *call = NULL;
   38063           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(py_obj);
   38064           0 :         PyObject *ret = NULL;
   38065           0 :         struct ndr_push *push = NULL;
   38066             :         DATA_BLOB blob;
   38067             :         enum ndr_err_code err;
   38068             : 
   38069           0 :         if (ndr_table_netlogon.num_calls < 15) {
   38070           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl2_ndr_pack");
   38071           0 :                 return NULL;
   38072             :         }
   38073           0 :         call = &ndr_table_netlogon.calls[14];
   38074             : 
   38075           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   38076           0 :         if (push == NULL) {
   38077           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   38078           0 :                 return NULL;
   38079             :         }
   38080             : 
   38081           0 :         push->flags |= ndr_push_flags;
   38082             : 
   38083           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   38084           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   38085           0 :                 TALLOC_FREE(push);
   38086           0 :                 PyErr_SetNdrError(err);
   38087           0 :                 return NULL;
   38088             :         }
   38089           0 :         blob = ndr_push_blob(push);
   38090           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   38091           0 :         TALLOC_FREE(push);
   38092           0 :         return ret;
   38093             : }
   38094             : 
   38095           0 : static PyObject *py_netr_LogonControl2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38096             : {
   38097           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   38098           0 :         PyObject *bigendian_obj = NULL;
   38099           0 :         PyObject *ndr64_obj = NULL;
   38100           0 :         uint32_t ndr_push_flags = 0;
   38101             : 
   38102           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   38103             :                 discard_const_p(char *, kwnames),
   38104             :                 &bigendian_obj,
   38105             :                 &ndr64_obj)) {
   38106           0 :                 return NULL;
   38107             :         }
   38108             : 
   38109           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38110           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   38111             :         }
   38112           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38113           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   38114             :         }
   38115             : 
   38116           0 :         return py_netr_LogonControl2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   38117             : }
   38118             : 
   38119           0 : static PyObject *py_netr_LogonControl2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38120             : {
   38121           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   38122           0 :         PyObject *bigendian_obj = NULL;
   38123           0 :         PyObject *ndr64_obj = NULL;
   38124           0 :         uint32_t ndr_push_flags = 0;
   38125             : 
   38126           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   38127             :                 discard_const_p(char *, kwnames),
   38128             :                 &bigendian_obj,
   38129             :                 &ndr64_obj)) {
   38130           0 :                 return NULL;
   38131             :         }
   38132             : 
   38133           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38134           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   38135             :         }
   38136           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38137           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   38138             :         }
   38139             : 
   38140           0 :         return py_netr_LogonControl2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   38141             : }
   38142             : 
   38143           0 : static PyObject *py_netr_LogonControl2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   38144             : {
   38145           0 :         const struct ndr_interface_call *call = NULL;
   38146           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(py_obj);
   38147           0 :         struct ndr_pull *pull = NULL;
   38148             :         enum ndr_err_code err;
   38149             : 
   38150           0 :         if (ndr_table_netlogon.num_calls < 15) {
   38151           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl2_ndr_unpack");
   38152           0 :                 return NULL;
   38153             :         }
   38154           0 :         call = &ndr_table_netlogon.calls[14];
   38155             : 
   38156           0 :         pull = ndr_pull_init_blob(blob, object);
   38157           0 :         if (pull == NULL) {
   38158           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   38159           0 :                 return NULL;
   38160             :         }
   38161             : 
   38162           0 :         pull->flags |= ndr_pull_flags;
   38163             : 
   38164           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   38165           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   38166           0 :                 TALLOC_FREE(pull);
   38167           0 :                 PyErr_SetNdrError(err);
   38168           0 :                 return NULL;
   38169             :         }
   38170           0 :         if (!allow_remaining) {
   38171             :                 uint32_t highest_ofs;
   38172             : 
   38173           0 :                 if (pull->offset > pull->relative_highest_offset) {
   38174           0 :                         highest_ofs = pull->offset;
   38175             :                 } else {
   38176           0 :                         highest_ofs = pull->relative_highest_offset;
   38177             :                 }
   38178           0 :                 if (highest_ofs < pull->data_size) {
   38179           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   38180             :                                 "not all bytes consumed ofs[%u] size[%u]",
   38181             :                                 highest_ofs, pull->data_size);
   38182           0 :                         TALLOC_FREE(pull);
   38183           0 :                         PyErr_SetNdrError(err);
   38184           0 :                         return NULL;
   38185             :                 }
   38186             :         }
   38187             : 
   38188           0 :         TALLOC_FREE(pull);
   38189           0 :         Py_RETURN_NONE;
   38190             : }
   38191             : 
   38192           0 : static PyObject *py_netr_LogonControl2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38193             : {
   38194             :         DATA_BLOB blob;
   38195           0 :         Py_ssize_t blob_length = 0;
   38196           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   38197           0 :         PyObject *bigendian_obj = NULL;
   38198           0 :         PyObject *ndr64_obj = NULL;
   38199           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   38200           0 :         PyObject *allow_remaining_obj = NULL;
   38201           0 :         bool allow_remaining = false;
   38202             : 
   38203           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   38204             :                 discard_const_p(char *, kwnames),
   38205             :                 &blob.data, &blob_length,
   38206             :                 &bigendian_obj,
   38207             :                 &ndr64_obj,
   38208             :                 &allow_remaining_obj)) {
   38209           0 :                 return NULL;
   38210             :         }
   38211           0 :         blob.length = blob_length;
   38212             : 
   38213           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38214           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   38215             :         }
   38216           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38217           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   38218             :         }
   38219             : 
   38220           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   38221           0 :                 allow_remaining = true;
   38222             :         }
   38223             : 
   38224           0 :         return py_netr_LogonControl2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   38225             : }
   38226             : 
   38227           0 : static PyObject *py_netr_LogonControl2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38228             : {
   38229             :         DATA_BLOB blob;
   38230           0 :         Py_ssize_t blob_length = 0;
   38231           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   38232           0 :         PyObject *bigendian_obj = NULL;
   38233           0 :         PyObject *ndr64_obj = NULL;
   38234           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   38235           0 :         PyObject *allow_remaining_obj = NULL;
   38236           0 :         bool allow_remaining = false;
   38237             : 
   38238           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   38239             :                 discard_const_p(char *, kwnames),
   38240             :                 &blob.data, &blob_length,
   38241             :                 &bigendian_obj,
   38242             :                 &ndr64_obj,
   38243             :                 &allow_remaining_obj)) {
   38244           0 :                 return NULL;
   38245             :         }
   38246           0 :         blob.length = blob_length;
   38247             : 
   38248           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38249           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   38250             :         }
   38251           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38252           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   38253             :         }
   38254             : 
   38255           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   38256           0 :                 allow_remaining = true;
   38257             :         }
   38258             : 
   38259           0 :         return py_netr_LogonControl2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   38260             : }
   38261             : 
   38262           0 : static PyObject *py_netr_LogonControl2_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   38263             : {
   38264           0 :         const struct ndr_interface_call *call = NULL;
   38265           0 :         struct netr_LogonControl2 *object = (struct netr_LogonControl2 *)pytalloc_get_ptr(py_obj);
   38266             :         PyObject *ret;
   38267             :         char *retstr;
   38268             : 
   38269           0 :         if (ndr_table_netlogon.num_calls < 15) {
   38270           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl2_ndr_print");
   38271           0 :                 return NULL;
   38272             :         }
   38273           0 :         call = &ndr_table_netlogon.calls[14];
   38274             : 
   38275           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   38276           0 :         ret = PyUnicode_FromString(retstr);
   38277           0 :         TALLOC_FREE(retstr);
   38278             : 
   38279           0 :         return ret;
   38280             : }
   38281             : 
   38282           0 : static PyObject *py_netr_LogonControl2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   38283             : {
   38284           0 :         return py_netr_LogonControl2_ndr_print(py_obj, "netr_LogonControl2_in", NDR_IN);
   38285             : }
   38286             : 
   38287           0 : static PyObject *py_netr_LogonControl2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   38288             : {
   38289           0 :         return py_netr_LogonControl2_ndr_print(py_obj, "netr_LogonControl2_out", NDR_OUT);
   38290             : }
   38291             : 
   38292             : static PyMethodDef py_netr_LogonControl2_methods[] = {
   38293             :         { "opnum", (PyCFunction)py_netr_LogonControl2_ndr_opnum, METH_NOARGS|METH_CLASS,
   38294             :                 "netlogon.netr_LogonControl2.opnum() -> 14 (0x0e) " },
   38295             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   38296             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   38297             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   38298             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   38299             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   38300             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   38301             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   38302             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   38303             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonControl2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   38304             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonControl2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   38305             :         { NULL, NULL, 0, NULL }
   38306             : };
   38307             : 
   38308             : 
   38309             : static PyTypeObject netr_LogonControl2_Type = {
   38310             :         PyVarObject_HEAD_INIT(NULL, 0)
   38311             :         .tp_name = "netlogon.netr_LogonControl2",
   38312             :         .tp_getset = py_netr_LogonControl2_getsetters,
   38313             :         .tp_methods = py_netr_LogonControl2_methods,
   38314             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   38315             :         .tp_new = py_netr_LogonControl2_new,
   38316             : };
   38317             : 
   38318           0 : static bool pack_py_netr_LogonControl2_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonControl2 *r)
   38319             : {
   38320             :         PyObject *py_logon_server;
   38321             :         PyObject *py_function_code;
   38322             :         PyObject *py_level;
   38323             :         PyObject *py_data;
   38324           0 :         const char *kwnames[] = {
   38325             :                 "logon_server", "function_code", "level", "data", NULL
   38326             :         };
   38327             : 
   38328           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:netr_LogonControl2", discard_const_p(char *, kwnames), &py_logon_server, &py_function_code, &py_level, &py_data)) {
   38329           0 :                 return false;
   38330             :         }
   38331             : 
   38332           0 :         if (py_logon_server == NULL) {
   38333           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_server");
   38334           0 :                 return false;
   38335             :         }
   38336           0 :         if (py_logon_server == Py_None) {
   38337           0 :                 r->in.logon_server = NULL;
   38338             :         } else {
   38339           0 :                 r->in.logon_server = NULL;
   38340             :                 {
   38341             :                         const char *test_str;
   38342             :                         const char *talloc_str;
   38343           0 :                         PyObject *unicode = NULL;
   38344           0 :                         if (PyUnicode_Check(py_logon_server)) {
   38345           0 :                                 unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   38346           0 :                                 if (unicode == NULL) {
   38347           0 :                                         PyErr_NoMemory();
   38348           0 :                                         return false;
   38349             :                                 }
   38350           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   38351           0 :                         } else if (PyBytes_Check(py_logon_server)) {
   38352           0 :                                 test_str = PyBytes_AS_STRING(py_logon_server);
   38353             :                         } else {
   38354           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   38355           0 :                                 return false;
   38356             :                         }
   38357           0 :                         talloc_str = talloc_strdup(r, test_str);
   38358           0 :                         if (unicode != NULL) {
   38359           0 :                                 Py_DECREF(unicode);
   38360             :                         }
   38361           0 :                         if (talloc_str == NULL) {
   38362           0 :                                 PyErr_NoMemory();
   38363           0 :                                 return false;
   38364             :                         }
   38365           0 :                         r->in.logon_server = talloc_str;
   38366             :                 }
   38367             :         }
   38368           0 :         if (py_function_code == NULL) {
   38369           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.function_code");
   38370           0 :                 return false;
   38371             :         }
   38372             :         {
   38373           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.function_code));
   38374           0 :                 if (PyLong_Check(py_function_code)) {
   38375             :                         unsigned long long test_var;
   38376           0 :                         test_var = PyLong_AsUnsignedLongLong(py_function_code);
   38377           0 :                         if (PyErr_Occurred() != NULL) {
   38378           0 :                                 return false;
   38379             :                         }
   38380           0 :                         if (test_var > uint_max) {
   38381           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   38382             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38383           0 :                                 return false;
   38384             :                         }
   38385           0 :                         r->in.function_code = test_var;
   38386             :                 } else {
   38387           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   38388             :                           PyLong_Type.tp_name);
   38389           0 :                         return false;
   38390             :                 }
   38391             :         }
   38392           0 :         if (py_level == NULL) {
   38393           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   38394           0 :                 return false;
   38395             :         }
   38396             :         {
   38397           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   38398           0 :                 if (PyLong_Check(py_level)) {
   38399             :                         unsigned long long test_var;
   38400           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   38401           0 :                         if (PyErr_Occurred() != NULL) {
   38402           0 :                                 return false;
   38403             :                         }
   38404           0 :                         if (test_var > uint_max) {
   38405           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   38406             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38407           0 :                                 return false;
   38408             :                         }
   38409           0 :                         r->in.level = test_var;
   38410             :                 } else {
   38411           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   38412             :                           PyLong_Type.tp_name);
   38413           0 :                         return false;
   38414             :                 }
   38415             :         }
   38416           0 :         if (py_data == NULL) {
   38417           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.data");
   38418           0 :                 return false;
   38419             :         }
   38420           0 :         r->in.data = talloc_ptrtype(r, r->in.data);
   38421           0 :         if (r->in.data == NULL) {
   38422           0 :                 PyErr_NoMemory();
   38423           0 :                 return false;
   38424             :         }
   38425             :         {
   38426             :                 union netr_CONTROL_DATA_INFORMATION *data_switch_1;
   38427           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");
   38428           0 :                 if (data_switch_1 == NULL) {
   38429           0 :                         return false;
   38430             :                 }
   38431           0 :                 r->in.data = data_switch_1;
   38432             :         }
   38433           0 :         return true;
   38434             : }
   38435             : 
   38436           0 : static PyObject *unpack_py_netr_LogonControl2_args_out(struct netr_LogonControl2 *r)
   38437             : {
   38438             :         PyObject *result;
   38439             :         PyObject *py_query;
   38440           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");
   38441           0 :         if (py_query == NULL) {
   38442           0 :                 return NULL;
   38443             :         }
   38444           0 :         result = py_query;
   38445           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   38446           0 :                 PyErr_SetWERROR(r->out.result);
   38447           0 :                 return NULL;
   38448             :         }
   38449             : 
   38450           0 :         return result;
   38451             : }
   38452             : 
   38453             : 
   38454           0 : static PyObject *py_netr_ServerAuthenticate2_in_get_server_name(PyObject *obj, void *closure)
   38455             : {
   38456           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(obj);
   38457             :         PyObject *py_server_name;
   38458           0 :         if (object->in.server_name == NULL) {
   38459           0 :                 Py_RETURN_NONE;
   38460             :         }
   38461           0 :         if (object->in.server_name == NULL) {
   38462           0 :                 py_server_name = Py_None;
   38463           0 :                 Py_INCREF(py_server_name);
   38464             :         } else {
   38465           0 :                 if (object->in.server_name == NULL) {
   38466           0 :                         py_server_name = Py_None;
   38467           0 :                         Py_INCREF(py_server_name);
   38468             :                 } else {
   38469           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   38470             :                 }
   38471             :         }
   38472           0 :         return py_server_name;
   38473             : }
   38474             : 
   38475           0 : static int py_netr_ServerAuthenticate2_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   38476             : {
   38477           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(py_obj);
   38478           0 :         if (value == NULL) {
   38479           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   38480           0 :                 return -1;
   38481             :         }
   38482           0 :         if (value == Py_None) {
   38483           0 :                 object->in.server_name = NULL;
   38484             :         } else {
   38485           0 :                 object->in.server_name = NULL;
   38486             :                 {
   38487             :                         const char *test_str;
   38488             :                         const char *talloc_str;
   38489           0 :                         PyObject *unicode = NULL;
   38490           0 :                         if (PyUnicode_Check(value)) {
   38491           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   38492           0 :                                 if (unicode == NULL) {
   38493           0 :                                         PyErr_NoMemory();
   38494           0 :                                         return -1;
   38495             :                                 }
   38496           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   38497           0 :                         } else if (PyBytes_Check(value)) {
   38498           0 :                                 test_str = PyBytes_AS_STRING(value);
   38499             :                         } else {
   38500           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   38501           0 :                                 return -1;
   38502             :                         }
   38503           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   38504           0 :                         if (unicode != NULL) {
   38505           0 :                                 Py_DECREF(unicode);
   38506             :                         }
   38507           0 :                         if (talloc_str == NULL) {
   38508           0 :                                 PyErr_NoMemory();
   38509           0 :                                 return -1;
   38510             :                         }
   38511           0 :                         object->in.server_name = talloc_str;
   38512             :                 }
   38513             :         }
   38514           0 :         return 0;
   38515             : }
   38516             : 
   38517           0 : static PyObject *py_netr_ServerAuthenticate2_in_get_account_name(PyObject *obj, void *closure)
   38518             : {
   38519           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(obj);
   38520             :         PyObject *py_account_name;
   38521           0 :         if (object->in.account_name == NULL) {
   38522           0 :                 Py_RETURN_NONE;
   38523             :         }
   38524           0 :         if (object->in.account_name == NULL) {
   38525           0 :                 py_account_name = Py_None;
   38526           0 :                 Py_INCREF(py_account_name);
   38527             :         } else {
   38528           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   38529             :         }
   38530           0 :         return py_account_name;
   38531             : }
   38532             : 
   38533           0 : static int py_netr_ServerAuthenticate2_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   38534             : {
   38535           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(py_obj);
   38536           0 :         if (value == NULL) {
   38537           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.account_name");
   38538           0 :                 return -1;
   38539             :         }
   38540           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   38541           0 :         if (object->in.account_name == NULL) {
   38542           0 :                 PyErr_NoMemory();
   38543           0 :                 return -1;
   38544             :         }
   38545             :         {
   38546             :                 const char *test_str;
   38547             :                 const char *talloc_str;
   38548           0 :                 PyObject *unicode = NULL;
   38549           0 :                 if (PyUnicode_Check(value)) {
   38550           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   38551           0 :                         if (unicode == NULL) {
   38552           0 :                                 PyErr_NoMemory();
   38553           0 :                                 return -1;
   38554             :                         }
   38555           0 :                         test_str = PyBytes_AS_STRING(unicode);
   38556           0 :                 } else if (PyBytes_Check(value)) {
   38557           0 :                         test_str = PyBytes_AS_STRING(value);
   38558             :                 } else {
   38559           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   38560           0 :                         return -1;
   38561             :                 }
   38562           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   38563           0 :                 if (unicode != NULL) {
   38564           0 :                         Py_DECREF(unicode);
   38565             :                 }
   38566           0 :                 if (talloc_str == NULL) {
   38567           0 :                         PyErr_NoMemory();
   38568           0 :                         return -1;
   38569             :                 }
   38570           0 :                 object->in.account_name = talloc_str;
   38571             :         }
   38572           0 :         return 0;
   38573             : }
   38574             : 
   38575           0 : static PyObject *py_netr_ServerAuthenticate2_in_get_secure_channel_type(PyObject *obj, void *closure)
   38576             : {
   38577           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(obj);
   38578             :         PyObject *py_secure_channel_type;
   38579           0 :         py_secure_channel_type = PyLong_FromLong((uint16_t)object->in.secure_channel_type);
   38580           0 :         return py_secure_channel_type;
   38581             : }
   38582             : 
   38583           0 : static int py_netr_ServerAuthenticate2_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
   38584             : {
   38585           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(py_obj);
   38586           0 :         if (value == NULL) {
   38587           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.secure_channel_type");
   38588           0 :                 return -1;
   38589             :         }
   38590             :         {
   38591           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
   38592           0 :                 if (PyLong_Check(value)) {
   38593             :                         unsigned long long test_var;
   38594           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   38595           0 :                         if (PyErr_Occurred() != NULL) {
   38596           0 :                                 return -1;
   38597             :                         }
   38598           0 :                         if (test_var > uint_max) {
   38599           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   38600             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38601           0 :                                 return -1;
   38602             :                         }
   38603           0 :                         object->in.secure_channel_type = test_var;
   38604             :                 } else {
   38605           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   38606             :                           PyLong_Type.tp_name);
   38607           0 :                         return -1;
   38608             :                 }
   38609             :         }
   38610           0 :         return 0;
   38611             : }
   38612             : 
   38613           0 : static PyObject *py_netr_ServerAuthenticate2_in_get_computer_name(PyObject *obj, void *closure)
   38614             : {
   38615           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(obj);
   38616             :         PyObject *py_computer_name;
   38617           0 :         if (object->in.computer_name == NULL) {
   38618           0 :                 Py_RETURN_NONE;
   38619             :         }
   38620           0 :         if (object->in.computer_name == NULL) {
   38621           0 :                 py_computer_name = Py_None;
   38622           0 :                 Py_INCREF(py_computer_name);
   38623             :         } else {
   38624           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   38625             :         }
   38626           0 :         return py_computer_name;
   38627             : }
   38628             : 
   38629           0 : static int py_netr_ServerAuthenticate2_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   38630             : {
   38631           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(py_obj);
   38632           0 :         if (value == NULL) {
   38633           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   38634           0 :                 return -1;
   38635             :         }
   38636           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   38637           0 :         if (object->in.computer_name == NULL) {
   38638           0 :                 PyErr_NoMemory();
   38639           0 :                 return -1;
   38640             :         }
   38641             :         {
   38642             :                 const char *test_str;
   38643             :                 const char *talloc_str;
   38644           0 :                 PyObject *unicode = NULL;
   38645           0 :                 if (PyUnicode_Check(value)) {
   38646           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   38647           0 :                         if (unicode == NULL) {
   38648           0 :                                 PyErr_NoMemory();
   38649           0 :                                 return -1;
   38650             :                         }
   38651           0 :                         test_str = PyBytes_AS_STRING(unicode);
   38652           0 :                 } else if (PyBytes_Check(value)) {
   38653           0 :                         test_str = PyBytes_AS_STRING(value);
   38654             :                 } else {
   38655           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   38656           0 :                         return -1;
   38657             :                 }
   38658           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   38659           0 :                 if (unicode != NULL) {
   38660           0 :                         Py_DECREF(unicode);
   38661             :                 }
   38662           0 :                 if (talloc_str == NULL) {
   38663           0 :                         PyErr_NoMemory();
   38664           0 :                         return -1;
   38665             :                 }
   38666           0 :                 object->in.computer_name = talloc_str;
   38667             :         }
   38668           0 :         return 0;
   38669             : }
   38670             : 
   38671           0 : static PyObject *py_netr_ServerAuthenticate2_in_get_credentials(PyObject *obj, void *closure)
   38672             : {
   38673           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(obj);
   38674             :         PyObject *py_credentials;
   38675           0 :         if (object->in.credentials == NULL) {
   38676           0 :                 Py_RETURN_NONE;
   38677             :         }
   38678           0 :         py_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->in.credentials, object->in.credentials);
   38679           0 :         return py_credentials;
   38680             : }
   38681             : 
   38682           0 : static int py_netr_ServerAuthenticate2_in_set_credentials(PyObject *py_obj, PyObject *value, void *closure)
   38683             : {
   38684           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(py_obj);
   38685           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credentials));
   38686           0 :         if (value == NULL) {
   38687           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credentials");
   38688           0 :                 return -1;
   38689             :         }
   38690           0 :         object->in.credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credentials);
   38691           0 :         if (object->in.credentials == NULL) {
   38692           0 :                 PyErr_NoMemory();
   38693           0 :                 return -1;
   38694             :         }
   38695           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
   38696           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   38697           0 :                 PyErr_NoMemory();
   38698           0 :                 return -1;
   38699             :         }
   38700           0 :         object->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
   38701           0 :         return 0;
   38702             : }
   38703             : 
   38704           0 : static PyObject *py_netr_ServerAuthenticate2_out_get_return_credentials(PyObject *obj, void *closure)
   38705             : {
   38706           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(obj);
   38707             :         PyObject *py_return_credentials;
   38708           0 :         if (object->out.return_credentials == NULL) {
   38709           0 :                 Py_RETURN_NONE;
   38710             :         }
   38711           0 :         py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->out.return_credentials, object->out.return_credentials);
   38712           0 :         return py_return_credentials;
   38713             : }
   38714             : 
   38715           0 : static int py_netr_ServerAuthenticate2_out_set_return_credentials(PyObject *py_obj, PyObject *value, void *closure)
   38716             : {
   38717           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(py_obj);
   38718           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_credentials));
   38719           0 :         if (value == NULL) {
   38720           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_credentials");
   38721           0 :                 return -1;
   38722             :         }
   38723           0 :         object->out.return_credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_credentials);
   38724           0 :         if (object->out.return_credentials == NULL) {
   38725           0 :                 PyErr_NoMemory();
   38726           0 :                 return -1;
   38727             :         }
   38728           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
   38729           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   38730           0 :                 PyErr_NoMemory();
   38731           0 :                 return -1;
   38732             :         }
   38733           0 :         object->out.return_credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
   38734           0 :         return 0;
   38735             : }
   38736             : 
   38737           0 : static PyObject *py_netr_ServerAuthenticate2_in_get_negotiate_flags(PyObject *obj, void *closure)
   38738             : {
   38739           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(obj);
   38740             :         PyObject *py_negotiate_flags;
   38741           0 :         if (object->in.negotiate_flags == NULL) {
   38742           0 :                 Py_RETURN_NONE;
   38743             :         }
   38744           0 :         py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)*object->in.negotiate_flags);
   38745           0 :         return py_negotiate_flags;
   38746             : }
   38747             : 
   38748           0 : static int py_netr_ServerAuthenticate2_in_set_negotiate_flags(PyObject *py_obj, PyObject *value, void *closure)
   38749             : {
   38750           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(py_obj);
   38751           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.negotiate_flags));
   38752           0 :         if (value == NULL) {
   38753           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.negotiate_flags");
   38754           0 :                 return -1;
   38755             :         }
   38756           0 :         object->in.negotiate_flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.negotiate_flags);
   38757           0 :         if (object->in.negotiate_flags == NULL) {
   38758           0 :                 PyErr_NoMemory();
   38759           0 :                 return -1;
   38760             :         }
   38761             :         {
   38762           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.negotiate_flags));
   38763           0 :                 if (PyLong_Check(value)) {
   38764             :                         unsigned long long test_var;
   38765           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   38766           0 :                         if (PyErr_Occurred() != NULL) {
   38767           0 :                                 return -1;
   38768             :                         }
   38769           0 :                         if (test_var > uint_max) {
   38770           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   38771             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38772           0 :                                 return -1;
   38773             :                         }
   38774           0 :                         *object->in.negotiate_flags = test_var;
   38775             :                 } else {
   38776           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   38777             :                           PyLong_Type.tp_name);
   38778           0 :                         return -1;
   38779             :                 }
   38780             :         }
   38781           0 :         return 0;
   38782             : }
   38783             : 
   38784           0 : static PyObject *py_netr_ServerAuthenticate2_out_get_negotiate_flags(PyObject *obj, void *closure)
   38785             : {
   38786           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(obj);
   38787             :         PyObject *py_negotiate_flags;
   38788           0 :         if (object->out.negotiate_flags == NULL) {
   38789           0 :                 Py_RETURN_NONE;
   38790             :         }
   38791           0 :         py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)*object->out.negotiate_flags);
   38792           0 :         return py_negotiate_flags;
   38793             : }
   38794             : 
   38795           0 : static int py_netr_ServerAuthenticate2_out_set_negotiate_flags(PyObject *py_obj, PyObject *value, void *closure)
   38796             : {
   38797           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(py_obj);
   38798           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.negotiate_flags));
   38799           0 :         if (value == NULL) {
   38800           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.negotiate_flags");
   38801           0 :                 return -1;
   38802             :         }
   38803           0 :         object->out.negotiate_flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.negotiate_flags);
   38804           0 :         if (object->out.negotiate_flags == NULL) {
   38805           0 :                 PyErr_NoMemory();
   38806           0 :                 return -1;
   38807             :         }
   38808             :         {
   38809           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.negotiate_flags));
   38810           0 :                 if (PyLong_Check(value)) {
   38811             :                         unsigned long long test_var;
   38812           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   38813           0 :                         if (PyErr_Occurred() != NULL) {
   38814           0 :                                 return -1;
   38815             :                         }
   38816           0 :                         if (test_var > uint_max) {
   38817           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   38818             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38819           0 :                                 return -1;
   38820             :                         }
   38821           0 :                         *object->out.negotiate_flags = test_var;
   38822             :                 } else {
   38823           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   38824             :                           PyLong_Type.tp_name);
   38825           0 :                         return -1;
   38826             :                 }
   38827             :         }
   38828           0 :         return 0;
   38829             : }
   38830             : 
   38831           0 : static PyObject *py_netr_ServerAuthenticate2_get_result(PyObject *obj, void *closure)
   38832             : {
   38833           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(obj);
   38834             :         PyObject *py_result;
   38835           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   38836           0 :         return py_result;
   38837             : }
   38838             : 
   38839           0 : static int py_netr_ServerAuthenticate2_set_result(PyObject *py_obj, PyObject *value, void *closure)
   38840             : {
   38841           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(py_obj);
   38842           0 :         if (value == NULL) {
   38843           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   38844           0 :                 return -1;
   38845             :         }
   38846           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   38847           0 :         return 0;
   38848             : }
   38849             : 
   38850             : static PyGetSetDef py_netr_ServerAuthenticate2_getsetters[] = {
   38851             :         {
   38852             :                 .name = discard_const_p(char, "in_server_name"),
   38853             :                 .get = py_netr_ServerAuthenticate2_in_get_server_name,
   38854             :                 .set = py_netr_ServerAuthenticate2_in_set_server_name,
   38855             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   38856             :         },
   38857             :         {
   38858             :                 .name = discard_const_p(char, "in_account_name"),
   38859             :                 .get = py_netr_ServerAuthenticate2_in_get_account_name,
   38860             :                 .set = py_netr_ServerAuthenticate2_in_set_account_name,
   38861             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   38862             :         },
   38863             :         {
   38864             :                 .name = discard_const_p(char, "in_secure_channel_type"),
   38865             :                 .get = py_netr_ServerAuthenticate2_in_get_secure_channel_type,
   38866             :                 .set = py_netr_ServerAuthenticate2_in_set_secure_channel_type,
   38867             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
   38868             :         },
   38869             :         {
   38870             :                 .name = discard_const_p(char, "in_computer_name"),
   38871             :                 .get = py_netr_ServerAuthenticate2_in_get_computer_name,
   38872             :                 .set = py_netr_ServerAuthenticate2_in_set_computer_name,
   38873             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   38874             :         },
   38875             :         {
   38876             :                 .name = discard_const_p(char, "in_credentials"),
   38877             :                 .get = py_netr_ServerAuthenticate2_in_get_credentials,
   38878             :                 .set = py_netr_ServerAuthenticate2_in_set_credentials,
   38879             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
   38880             :         },
   38881             :         {
   38882             :                 .name = discard_const_p(char, "out_return_credentials"),
   38883             :                 .get = py_netr_ServerAuthenticate2_out_get_return_credentials,
   38884             :                 .set = py_netr_ServerAuthenticate2_out_set_return_credentials,
   38885             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
   38886             :         },
   38887             :         {
   38888             :                 .name = discard_const_p(char, "in_negotiate_flags"),
   38889             :                 .get = py_netr_ServerAuthenticate2_in_get_negotiate_flags,
   38890             :                 .set = py_netr_ServerAuthenticate2_in_set_negotiate_flags,
   38891             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_NegotiateFlags")
   38892             :         },
   38893             :         {
   38894             :                 .name = discard_const_p(char, "out_negotiate_flags"),
   38895             :                 .get = py_netr_ServerAuthenticate2_out_get_negotiate_flags,
   38896             :                 .set = py_netr_ServerAuthenticate2_out_set_negotiate_flags,
   38897             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_NegotiateFlags")
   38898             :         },
   38899             :         {
   38900             :                 .name = discard_const_p(char, "result"),
   38901             :                 .get = py_netr_ServerAuthenticate2_get_result,
   38902             :                 .set = py_netr_ServerAuthenticate2_set_result,
   38903             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   38904             :         },
   38905             :         { .name = NULL }
   38906             : };
   38907             : 
   38908           0 : static PyObject *py_netr_ServerAuthenticate2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   38909             : {
   38910           0 :         PyObject *self = pytalloc_new(struct netr_ServerAuthenticate2, type);
   38911           0 :         struct netr_ServerAuthenticate2 *_self = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(self);
   38912           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   38913           0 :         _self->in.credentials = talloc_zero(mem_ctx, struct netr_Credential);
   38914           0 :         _self->out.return_credentials = talloc_zero(mem_ctx, struct netr_Credential);
   38915           0 :         _self->in.negotiate_flags = talloc_zero(mem_ctx, uint32_t);
   38916           0 :         _self->out.negotiate_flags = talloc_zero(mem_ctx, uint32_t);
   38917           0 :         return self;
   38918             : }
   38919             : 
   38920           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   38921             : {
   38922             : 
   38923             : 
   38924           0 :         return PyLong_FromLong(15);
   38925             : }
   38926             : 
   38927           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   38928             : {
   38929           0 :         const struct ndr_interface_call *call = NULL;
   38930           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(py_obj);
   38931           0 :         PyObject *ret = NULL;
   38932           0 :         struct ndr_push *push = NULL;
   38933             :         DATA_BLOB blob;
   38934             :         enum ndr_err_code err;
   38935             : 
   38936           0 :         if (ndr_table_netlogon.num_calls < 16) {
   38937           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate2_ndr_pack");
   38938           0 :                 return NULL;
   38939             :         }
   38940           0 :         call = &ndr_table_netlogon.calls[15];
   38941             : 
   38942           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   38943           0 :         if (push == NULL) {
   38944           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   38945           0 :                 return NULL;
   38946             :         }
   38947             : 
   38948           0 :         push->flags |= ndr_push_flags;
   38949             : 
   38950           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   38951           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   38952           0 :                 TALLOC_FREE(push);
   38953           0 :                 PyErr_SetNdrError(err);
   38954           0 :                 return NULL;
   38955             :         }
   38956           0 :         blob = ndr_push_blob(push);
   38957           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   38958           0 :         TALLOC_FREE(push);
   38959           0 :         return ret;
   38960             : }
   38961             : 
   38962           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38963             : {
   38964           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   38965           0 :         PyObject *bigendian_obj = NULL;
   38966           0 :         PyObject *ndr64_obj = NULL;
   38967           0 :         uint32_t ndr_push_flags = 0;
   38968             : 
   38969           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   38970             :                 discard_const_p(char *, kwnames),
   38971             :                 &bigendian_obj,
   38972             :                 &ndr64_obj)) {
   38973           0 :                 return NULL;
   38974             :         }
   38975             : 
   38976           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38977           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   38978             :         }
   38979           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38980           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   38981             :         }
   38982             : 
   38983           0 :         return py_netr_ServerAuthenticate2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   38984             : }
   38985             : 
   38986           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38987             : {
   38988           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   38989           0 :         PyObject *bigendian_obj = NULL;
   38990           0 :         PyObject *ndr64_obj = NULL;
   38991           0 :         uint32_t ndr_push_flags = 0;
   38992             : 
   38993           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   38994             :                 discard_const_p(char *, kwnames),
   38995             :                 &bigendian_obj,
   38996             :                 &ndr64_obj)) {
   38997           0 :                 return NULL;
   38998             :         }
   38999             : 
   39000           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39001           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   39002             :         }
   39003           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39004           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   39005             :         }
   39006             : 
   39007           0 :         return py_netr_ServerAuthenticate2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   39008             : }
   39009             : 
   39010           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   39011             : {
   39012           0 :         const struct ndr_interface_call *call = NULL;
   39013           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(py_obj);
   39014           0 :         struct ndr_pull *pull = NULL;
   39015             :         enum ndr_err_code err;
   39016             : 
   39017           0 :         if (ndr_table_netlogon.num_calls < 16) {
   39018           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate2_ndr_unpack");
   39019           0 :                 return NULL;
   39020             :         }
   39021           0 :         call = &ndr_table_netlogon.calls[15];
   39022             : 
   39023           0 :         pull = ndr_pull_init_blob(blob, object);
   39024           0 :         if (pull == NULL) {
   39025           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   39026           0 :                 return NULL;
   39027             :         }
   39028             : 
   39029           0 :         pull->flags |= ndr_pull_flags;
   39030             : 
   39031           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   39032           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   39033           0 :                 TALLOC_FREE(pull);
   39034           0 :                 PyErr_SetNdrError(err);
   39035           0 :                 return NULL;
   39036             :         }
   39037           0 :         if (!allow_remaining) {
   39038             :                 uint32_t highest_ofs;
   39039             : 
   39040           0 :                 if (pull->offset > pull->relative_highest_offset) {
   39041           0 :                         highest_ofs = pull->offset;
   39042             :                 } else {
   39043           0 :                         highest_ofs = pull->relative_highest_offset;
   39044             :                 }
   39045           0 :                 if (highest_ofs < pull->data_size) {
   39046           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   39047             :                                 "not all bytes consumed ofs[%u] size[%u]",
   39048             :                                 highest_ofs, pull->data_size);
   39049           0 :                         TALLOC_FREE(pull);
   39050           0 :                         PyErr_SetNdrError(err);
   39051           0 :                         return NULL;
   39052             :                 }
   39053             :         }
   39054             : 
   39055           0 :         TALLOC_FREE(pull);
   39056           0 :         Py_RETURN_NONE;
   39057             : }
   39058             : 
   39059           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39060             : {
   39061             :         DATA_BLOB blob;
   39062           0 :         Py_ssize_t blob_length = 0;
   39063           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   39064           0 :         PyObject *bigendian_obj = NULL;
   39065           0 :         PyObject *ndr64_obj = NULL;
   39066           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   39067           0 :         PyObject *allow_remaining_obj = NULL;
   39068           0 :         bool allow_remaining = false;
   39069             : 
   39070           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   39071             :                 discard_const_p(char *, kwnames),
   39072             :                 &blob.data, &blob_length,
   39073             :                 &bigendian_obj,
   39074             :                 &ndr64_obj,
   39075             :                 &allow_remaining_obj)) {
   39076           0 :                 return NULL;
   39077             :         }
   39078           0 :         blob.length = blob_length;
   39079             : 
   39080           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39081           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   39082             :         }
   39083           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39084           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   39085             :         }
   39086             : 
   39087           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   39088           0 :                 allow_remaining = true;
   39089             :         }
   39090             : 
   39091           0 :         return py_netr_ServerAuthenticate2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   39092             : }
   39093             : 
   39094           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39095             : {
   39096             :         DATA_BLOB blob;
   39097           0 :         Py_ssize_t blob_length = 0;
   39098           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   39099           0 :         PyObject *bigendian_obj = NULL;
   39100           0 :         PyObject *ndr64_obj = NULL;
   39101           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   39102           0 :         PyObject *allow_remaining_obj = NULL;
   39103           0 :         bool allow_remaining = false;
   39104             : 
   39105           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   39106             :                 discard_const_p(char *, kwnames),
   39107             :                 &blob.data, &blob_length,
   39108             :                 &bigendian_obj,
   39109             :                 &ndr64_obj,
   39110             :                 &allow_remaining_obj)) {
   39111           0 :                 return NULL;
   39112             :         }
   39113           0 :         blob.length = blob_length;
   39114             : 
   39115           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39116           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   39117             :         }
   39118           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39119           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   39120             :         }
   39121             : 
   39122           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   39123           0 :                 allow_remaining = true;
   39124             :         }
   39125             : 
   39126           0 :         return py_netr_ServerAuthenticate2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   39127             : }
   39128             : 
   39129           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   39130             : {
   39131           0 :         const struct ndr_interface_call *call = NULL;
   39132           0 :         struct netr_ServerAuthenticate2 *object = (struct netr_ServerAuthenticate2 *)pytalloc_get_ptr(py_obj);
   39133             :         PyObject *ret;
   39134             :         char *retstr;
   39135             : 
   39136           0 :         if (ndr_table_netlogon.num_calls < 16) {
   39137           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate2_ndr_print");
   39138           0 :                 return NULL;
   39139             :         }
   39140           0 :         call = &ndr_table_netlogon.calls[15];
   39141             : 
   39142           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   39143           0 :         ret = PyUnicode_FromString(retstr);
   39144           0 :         TALLOC_FREE(retstr);
   39145             : 
   39146           0 :         return ret;
   39147             : }
   39148             : 
   39149           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   39150             : {
   39151           0 :         return py_netr_ServerAuthenticate2_ndr_print(py_obj, "netr_ServerAuthenticate2_in", NDR_IN);
   39152             : }
   39153             : 
   39154           0 : static PyObject *py_netr_ServerAuthenticate2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   39155             : {
   39156           0 :         return py_netr_ServerAuthenticate2_ndr_print(py_obj, "netr_ServerAuthenticate2_out", NDR_OUT);
   39157             : }
   39158             : 
   39159             : static PyMethodDef py_netr_ServerAuthenticate2_methods[] = {
   39160             :         { "opnum", (PyCFunction)py_netr_ServerAuthenticate2_ndr_opnum, METH_NOARGS|METH_CLASS,
   39161             :                 "netlogon.netr_ServerAuthenticate2.opnum() -> 15 (0x0f) " },
   39162             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   39163             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   39164             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   39165             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   39166             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   39167             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   39168             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   39169             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   39170             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerAuthenticate2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   39171             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerAuthenticate2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   39172             :         { NULL, NULL, 0, NULL }
   39173             : };
   39174             : 
   39175             : 
   39176             : static PyTypeObject netr_ServerAuthenticate2_Type = {
   39177             :         PyVarObject_HEAD_INIT(NULL, 0)
   39178             :         .tp_name = "netlogon.netr_ServerAuthenticate2",
   39179             :         .tp_getset = py_netr_ServerAuthenticate2_getsetters,
   39180             :         .tp_methods = py_netr_ServerAuthenticate2_methods,
   39181             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   39182             :         .tp_new = py_netr_ServerAuthenticate2_new,
   39183             : };
   39184             : 
   39185           0 : static bool pack_py_netr_ServerAuthenticate2_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerAuthenticate2 *r)
   39186             : {
   39187             :         PyObject *py_server_name;
   39188             :         PyObject *py_account_name;
   39189             :         PyObject *py_secure_channel_type;
   39190             :         PyObject *py_computer_name;
   39191             :         PyObject *py_credentials;
   39192             :         PyObject *py_negotiate_flags;
   39193           0 :         const char *kwnames[] = {
   39194             :                 "server_name", "account_name", "secure_channel_type", "computer_name", "credentials", "negotiate_flags", NULL
   39195             :         };
   39196             : 
   39197           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)) {
   39198           0 :                 return false;
   39199             :         }
   39200             : 
   39201           0 :         if (py_server_name == NULL) {
   39202           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   39203           0 :                 return false;
   39204             :         }
   39205           0 :         if (py_server_name == Py_None) {
   39206           0 :                 r->in.server_name = NULL;
   39207             :         } else {
   39208           0 :                 r->in.server_name = NULL;
   39209             :                 {
   39210             :                         const char *test_str;
   39211             :                         const char *talloc_str;
   39212           0 :                         PyObject *unicode = NULL;
   39213           0 :                         if (PyUnicode_Check(py_server_name)) {
   39214           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   39215           0 :                                 if (unicode == NULL) {
   39216           0 :                                         PyErr_NoMemory();
   39217           0 :                                         return false;
   39218             :                                 }
   39219           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   39220           0 :                         } else if (PyBytes_Check(py_server_name)) {
   39221           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   39222             :                         } else {
   39223           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   39224           0 :                                 return false;
   39225             :                         }
   39226           0 :                         talloc_str = talloc_strdup(r, test_str);
   39227           0 :                         if (unicode != NULL) {
   39228           0 :                                 Py_DECREF(unicode);
   39229             :                         }
   39230           0 :                         if (talloc_str == NULL) {
   39231           0 :                                 PyErr_NoMemory();
   39232           0 :                                 return false;
   39233             :                         }
   39234           0 :                         r->in.server_name = talloc_str;
   39235             :                 }
   39236             :         }
   39237           0 :         if (py_account_name == NULL) {
   39238           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.account_name");
   39239           0 :                 return false;
   39240             :         }
   39241           0 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   39242           0 :         if (r->in.account_name == NULL) {
   39243           0 :                 PyErr_NoMemory();
   39244           0 :                 return false;
   39245             :         }
   39246             :         {
   39247             :                 const char *test_str;
   39248             :                 const char *talloc_str;
   39249           0 :                 PyObject *unicode = NULL;
   39250           0 :                 if (PyUnicode_Check(py_account_name)) {
   39251           0 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   39252           0 :                         if (unicode == NULL) {
   39253           0 :                                 PyErr_NoMemory();
   39254           0 :                                 return false;
   39255             :                         }
   39256           0 :                         test_str = PyBytes_AS_STRING(unicode);
   39257           0 :                 } else if (PyBytes_Check(py_account_name)) {
   39258           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   39259             :                 } else {
   39260           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   39261           0 :                         return false;
   39262             :                 }
   39263           0 :                 talloc_str = talloc_strdup(r, test_str);
   39264           0 :                 if (unicode != NULL) {
   39265           0 :                         Py_DECREF(unicode);
   39266             :                 }
   39267           0 :                 if (talloc_str == NULL) {
   39268           0 :                         PyErr_NoMemory();
   39269           0 :                         return false;
   39270             :                 }
   39271           0 :                 r->in.account_name = talloc_str;
   39272             :         }
   39273           0 :         if (py_secure_channel_type == NULL) {
   39274           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.secure_channel_type");
   39275           0 :                 return false;
   39276             :         }
   39277             :         {
   39278           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
   39279           0 :                 if (PyLong_Check(py_secure_channel_type)) {
   39280             :                         unsigned long long test_var;
   39281           0 :                         test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
   39282           0 :                         if (PyErr_Occurred() != NULL) {
   39283           0 :                                 return false;
   39284             :                         }
   39285           0 :                         if (test_var > uint_max) {
   39286           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   39287             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39288           0 :                                 return false;
   39289             :                         }
   39290           0 :                         r->in.secure_channel_type = test_var;
   39291             :                 } else {
   39292           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   39293             :                           PyLong_Type.tp_name);
   39294           0 :                         return false;
   39295             :                 }
   39296             :         }
   39297           0 :         if (py_computer_name == NULL) {
   39298           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   39299           0 :                 return false;
   39300             :         }
   39301           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   39302           0 :         if (r->in.computer_name == NULL) {
   39303           0 :                 PyErr_NoMemory();
   39304           0 :                 return false;
   39305             :         }
   39306             :         {
   39307             :                 const char *test_str;
   39308             :                 const char *talloc_str;
   39309           0 :                 PyObject *unicode = NULL;
   39310           0 :                 if (PyUnicode_Check(py_computer_name)) {
   39311           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   39312           0 :                         if (unicode == NULL) {
   39313           0 :                                 PyErr_NoMemory();
   39314           0 :                                 return false;
   39315             :                         }
   39316           0 :                         test_str = PyBytes_AS_STRING(unicode);
   39317           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   39318           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   39319             :                 } else {
   39320           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   39321           0 :                         return false;
   39322             :                 }
   39323           0 :                 talloc_str = talloc_strdup(r, test_str);
   39324           0 :                 if (unicode != NULL) {
   39325           0 :                         Py_DECREF(unicode);
   39326             :                 }
   39327           0 :                 if (talloc_str == NULL) {
   39328           0 :                         PyErr_NoMemory();
   39329           0 :                         return false;
   39330             :                 }
   39331           0 :                 r->in.computer_name = talloc_str;
   39332             :         }
   39333           0 :         if (py_credentials == NULL) {
   39334           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credentials");
   39335           0 :                 return false;
   39336             :         }
   39337           0 :         r->in.credentials = talloc_ptrtype(r, r->in.credentials);
   39338           0 :         if (r->in.credentials == NULL) {
   39339           0 :                 PyErr_NoMemory();
   39340           0 :                 return false;
   39341             :         }
   39342           0 :         PY_CHECK_TYPE(&netr_Credential_Type, py_credentials, return false;);
   39343           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credentials)) == NULL) {
   39344           0 :                 PyErr_NoMemory();
   39345           0 :                 return false;
   39346             :         }
   39347           0 :         r->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(py_credentials);
   39348           0 :         if (py_negotiate_flags == NULL) {
   39349           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.negotiate_flags");
   39350           0 :                 return false;
   39351             :         }
   39352           0 :         r->in.negotiate_flags = talloc_ptrtype(r, r->in.negotiate_flags);
   39353           0 :         if (r->in.negotiate_flags == NULL) {
   39354           0 :                 PyErr_NoMemory();
   39355           0 :                 return false;
   39356             :         }
   39357             :         {
   39358           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.negotiate_flags));
   39359           0 :                 if (PyLong_Check(py_negotiate_flags)) {
   39360             :                         unsigned long long test_var;
   39361           0 :                         test_var = PyLong_AsUnsignedLongLong(py_negotiate_flags);
   39362           0 :                         if (PyErr_Occurred() != NULL) {
   39363           0 :                                 return false;
   39364             :                         }
   39365           0 :                         if (test_var > uint_max) {
   39366           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   39367             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39368           0 :                                 return false;
   39369             :                         }
   39370           0 :                         *r->in.negotiate_flags = test_var;
   39371             :                 } else {
   39372           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   39373             :                           PyLong_Type.tp_name);
   39374           0 :                         return false;
   39375             :                 }
   39376             :         }
   39377           0 :         return true;
   39378             : }
   39379             : 
   39380           0 : static PyObject *unpack_py_netr_ServerAuthenticate2_args_out(struct netr_ServerAuthenticate2 *r)
   39381             : {
   39382             :         PyObject *result;
   39383             :         PyObject *py_return_credentials;
   39384             :         PyObject *py_negotiate_flags;
   39385           0 :         result = PyTuple_New(2);
   39386           0 :         py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, r->out.return_credentials, r->out.return_credentials);
   39387           0 :         PyTuple_SetItem(result, 0, py_return_credentials);
   39388           0 :         py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)*r->out.negotiate_flags);
   39389           0 :         PyTuple_SetItem(result, 1, py_negotiate_flags);
   39390           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   39391           0 :                 PyErr_SetNTSTATUS(r->out.result);
   39392           0 :                 return NULL;
   39393             :         }
   39394             : 
   39395           0 :         return result;
   39396             : }
   39397             : 
   39398             : 
   39399           0 : static PyObject *py_netr_DatabaseSync2_in_get_logon_server(PyObject *obj, void *closure)
   39400             : {
   39401           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(obj);
   39402             :         PyObject *py_logon_server;
   39403           0 :         if (object->in.logon_server == NULL) {
   39404           0 :                 Py_RETURN_NONE;
   39405             :         }
   39406           0 :         if (object->in.logon_server == NULL) {
   39407           0 :                 py_logon_server = Py_None;
   39408           0 :                 Py_INCREF(py_logon_server);
   39409             :         } else {
   39410           0 :                 py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   39411             :         }
   39412           0 :         return py_logon_server;
   39413             : }
   39414             : 
   39415           0 : static int py_netr_DatabaseSync2_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   39416             : {
   39417           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   39418           0 :         if (value == NULL) {
   39419           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_server");
   39420           0 :                 return -1;
   39421             :         }
   39422           0 :         object->in.logon_server = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon_server);
   39423           0 :         if (object->in.logon_server == NULL) {
   39424           0 :                 PyErr_NoMemory();
   39425           0 :                 return -1;
   39426             :         }
   39427             :         {
   39428             :                 const char *test_str;
   39429             :                 const char *talloc_str;
   39430           0 :                 PyObject *unicode = NULL;
   39431           0 :                 if (PyUnicode_Check(value)) {
   39432           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   39433           0 :                         if (unicode == NULL) {
   39434           0 :                                 PyErr_NoMemory();
   39435           0 :                                 return -1;
   39436             :                         }
   39437           0 :                         test_str = PyBytes_AS_STRING(unicode);
   39438           0 :                 } else if (PyBytes_Check(value)) {
   39439           0 :                         test_str = PyBytes_AS_STRING(value);
   39440             :                 } else {
   39441           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   39442           0 :                         return -1;
   39443             :                 }
   39444           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   39445           0 :                 if (unicode != NULL) {
   39446           0 :                         Py_DECREF(unicode);
   39447             :                 }
   39448           0 :                 if (talloc_str == NULL) {
   39449           0 :                         PyErr_NoMemory();
   39450           0 :                         return -1;
   39451             :                 }
   39452           0 :                 object->in.logon_server = talloc_str;
   39453             :         }
   39454           0 :         return 0;
   39455             : }
   39456             : 
   39457           0 : static PyObject *py_netr_DatabaseSync2_in_get_computername(PyObject *obj, void *closure)
   39458             : {
   39459           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(obj);
   39460             :         PyObject *py_computername;
   39461           0 :         if (object->in.computername == NULL) {
   39462           0 :                 Py_RETURN_NONE;
   39463             :         }
   39464           0 :         if (object->in.computername == NULL) {
   39465           0 :                 py_computername = Py_None;
   39466           0 :                 Py_INCREF(py_computername);
   39467             :         } else {
   39468           0 :                 py_computername = PyUnicode_Decode(object->in.computername, strlen(object->in.computername), "utf-8", "ignore");
   39469             :         }
   39470           0 :         return py_computername;
   39471             : }
   39472             : 
   39473           0 : static int py_netr_DatabaseSync2_in_set_computername(PyObject *py_obj, PyObject *value, void *closure)
   39474             : {
   39475           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   39476           0 :         if (value == NULL) {
   39477           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computername");
   39478           0 :                 return -1;
   39479             :         }
   39480           0 :         object->in.computername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computername);
   39481           0 :         if (object->in.computername == NULL) {
   39482           0 :                 PyErr_NoMemory();
   39483           0 :                 return -1;
   39484             :         }
   39485             :         {
   39486             :                 const char *test_str;
   39487             :                 const char *talloc_str;
   39488           0 :                 PyObject *unicode = NULL;
   39489           0 :                 if (PyUnicode_Check(value)) {
   39490           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   39491           0 :                         if (unicode == NULL) {
   39492           0 :                                 PyErr_NoMemory();
   39493           0 :                                 return -1;
   39494             :                         }
   39495           0 :                         test_str = PyBytes_AS_STRING(unicode);
   39496           0 :                 } else if (PyBytes_Check(value)) {
   39497           0 :                         test_str = PyBytes_AS_STRING(value);
   39498             :                 } else {
   39499           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   39500           0 :                         return -1;
   39501             :                 }
   39502           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   39503           0 :                 if (unicode != NULL) {
   39504           0 :                         Py_DECREF(unicode);
   39505             :                 }
   39506           0 :                 if (talloc_str == NULL) {
   39507           0 :                         PyErr_NoMemory();
   39508           0 :                         return -1;
   39509             :                 }
   39510           0 :                 object->in.computername = talloc_str;
   39511             :         }
   39512           0 :         return 0;
   39513             : }
   39514             : 
   39515           0 : static PyObject *py_netr_DatabaseSync2_in_get_credential(PyObject *obj, void *closure)
   39516             : {
   39517           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(obj);
   39518             :         PyObject *py_credential;
   39519           0 :         if (object->in.credential == NULL) {
   39520           0 :                 Py_RETURN_NONE;
   39521             :         }
   39522           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   39523           0 :         return py_credential;
   39524             : }
   39525             : 
   39526           0 : static int py_netr_DatabaseSync2_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   39527             : {
   39528           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   39529           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   39530           0 :         if (value == NULL) {
   39531           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   39532           0 :                 return -1;
   39533             :         }
   39534           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   39535           0 :         if (object->in.credential == NULL) {
   39536           0 :                 PyErr_NoMemory();
   39537           0 :                 return -1;
   39538             :         }
   39539           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   39540           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   39541           0 :                 PyErr_NoMemory();
   39542           0 :                 return -1;
   39543             :         }
   39544           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   39545           0 :         return 0;
   39546             : }
   39547             : 
   39548           0 : static PyObject *py_netr_DatabaseSync2_in_get_return_authenticator(PyObject *obj, void *closure)
   39549             : {
   39550           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(obj);
   39551             :         PyObject *py_return_authenticator;
   39552           0 :         if (object->in.return_authenticator == NULL) {
   39553           0 :                 Py_RETURN_NONE;
   39554             :         }
   39555           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   39556           0 :         return py_return_authenticator;
   39557             : }
   39558             : 
   39559           0 : static int py_netr_DatabaseSync2_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   39560             : {
   39561           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   39562           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   39563           0 :         if (value == NULL) {
   39564           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.return_authenticator");
   39565           0 :                 return -1;
   39566             :         }
   39567           0 :         object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
   39568           0 :         if (object->in.return_authenticator == NULL) {
   39569           0 :                 PyErr_NoMemory();
   39570           0 :                 return -1;
   39571             :         }
   39572           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   39573           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   39574           0 :                 PyErr_NoMemory();
   39575           0 :                 return -1;
   39576             :         }
   39577           0 :         object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   39578           0 :         return 0;
   39579             : }
   39580             : 
   39581           0 : static PyObject *py_netr_DatabaseSync2_out_get_return_authenticator(PyObject *obj, void *closure)
   39582             : {
   39583           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(obj);
   39584             :         PyObject *py_return_authenticator;
   39585           0 :         if (object->out.return_authenticator == NULL) {
   39586           0 :                 Py_RETURN_NONE;
   39587             :         }
   39588           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   39589           0 :         return py_return_authenticator;
   39590             : }
   39591             : 
   39592           0 : static int py_netr_DatabaseSync2_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   39593             : {
   39594           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   39595           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   39596           0 :         if (value == NULL) {
   39597           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   39598           0 :                 return -1;
   39599             :         }
   39600           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   39601           0 :         if (object->out.return_authenticator == NULL) {
   39602           0 :                 PyErr_NoMemory();
   39603           0 :                 return -1;
   39604             :         }
   39605           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   39606           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   39607           0 :                 PyErr_NoMemory();
   39608           0 :                 return -1;
   39609             :         }
   39610           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   39611           0 :         return 0;
   39612             : }
   39613             : 
   39614           0 : static PyObject *py_netr_DatabaseSync2_in_get_database_id(PyObject *obj, void *closure)
   39615             : {
   39616           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(obj);
   39617             :         PyObject *py_database_id;
   39618           0 :         py_database_id = PyLong_FromUnsignedLongLong((uint32_t)object->in.database_id);
   39619           0 :         return py_database_id;
   39620             : }
   39621             : 
   39622           0 : static int py_netr_DatabaseSync2_in_set_database_id(PyObject *py_obj, PyObject *value, void *closure)
   39623             : {
   39624           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   39625           0 :         if (value == NULL) {
   39626           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.database_id");
   39627           0 :                 return -1;
   39628             :         }
   39629             :         {
   39630           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.database_id));
   39631           0 :                 if (PyLong_Check(value)) {
   39632             :                         unsigned long long test_var;
   39633           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   39634           0 :                         if (PyErr_Occurred() != NULL) {
   39635           0 :                                 return -1;
   39636             :                         }
   39637           0 :                         if (test_var > uint_max) {
   39638           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   39639             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39640           0 :                                 return -1;
   39641             :                         }
   39642           0 :                         object->in.database_id = test_var;
   39643             :                 } else {
   39644           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   39645             :                           PyLong_Type.tp_name);
   39646           0 :                         return -1;
   39647             :                 }
   39648             :         }
   39649           0 :         return 0;
   39650             : }
   39651             : 
   39652           0 : static PyObject *py_netr_DatabaseSync2_in_get_restart_state(PyObject *obj, void *closure)
   39653             : {
   39654           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(obj);
   39655             :         PyObject *py_restart_state;
   39656           0 :         py_restart_state = PyLong_FromLong((uint16_t)object->in.restart_state);
   39657           0 :         return py_restart_state;
   39658             : }
   39659             : 
   39660           0 : static int py_netr_DatabaseSync2_in_set_restart_state(PyObject *py_obj, PyObject *value, void *closure)
   39661             : {
   39662           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   39663           0 :         if (value == NULL) {
   39664           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.restart_state");
   39665           0 :                 return -1;
   39666             :         }
   39667             :         {
   39668           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.restart_state));
   39669           0 :                 if (PyLong_Check(value)) {
   39670             :                         unsigned long long test_var;
   39671           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   39672           0 :                         if (PyErr_Occurred() != NULL) {
   39673           0 :                                 return -1;
   39674             :                         }
   39675           0 :                         if (test_var > uint_max) {
   39676           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   39677             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39678           0 :                                 return -1;
   39679             :                         }
   39680           0 :                         object->in.restart_state = test_var;
   39681             :                 } else {
   39682           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   39683             :                           PyLong_Type.tp_name);
   39684           0 :                         return -1;
   39685             :                 }
   39686             :         }
   39687           0 :         return 0;
   39688             : }
   39689             : 
   39690           0 : static PyObject *py_netr_DatabaseSync2_in_get_sync_context(PyObject *obj, void *closure)
   39691             : {
   39692           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(obj);
   39693             :         PyObject *py_sync_context;
   39694           0 :         if (object->in.sync_context == NULL) {
   39695           0 :                 Py_RETURN_NONE;
   39696             :         }
   39697           0 :         py_sync_context = PyLong_FromUnsignedLongLong((uint32_t)*object->in.sync_context);
   39698           0 :         return py_sync_context;
   39699             : }
   39700             : 
   39701           0 : static int py_netr_DatabaseSync2_in_set_sync_context(PyObject *py_obj, PyObject *value, void *closure)
   39702             : {
   39703           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   39704           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.sync_context));
   39705           0 :         if (value == NULL) {
   39706           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.sync_context");
   39707           0 :                 return -1;
   39708             :         }
   39709           0 :         object->in.sync_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.sync_context);
   39710           0 :         if (object->in.sync_context == NULL) {
   39711           0 :                 PyErr_NoMemory();
   39712           0 :                 return -1;
   39713             :         }
   39714             :         {
   39715           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.sync_context));
   39716           0 :                 if (PyLong_Check(value)) {
   39717             :                         unsigned long long test_var;
   39718           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   39719           0 :                         if (PyErr_Occurred() != NULL) {
   39720           0 :                                 return -1;
   39721             :                         }
   39722           0 :                         if (test_var > uint_max) {
   39723           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   39724             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39725           0 :                                 return -1;
   39726             :                         }
   39727           0 :                         *object->in.sync_context = test_var;
   39728             :                 } else {
   39729           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   39730             :                           PyLong_Type.tp_name);
   39731           0 :                         return -1;
   39732             :                 }
   39733             :         }
   39734           0 :         return 0;
   39735             : }
   39736             : 
   39737           0 : static PyObject *py_netr_DatabaseSync2_out_get_sync_context(PyObject *obj, void *closure)
   39738             : {
   39739           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(obj);
   39740             :         PyObject *py_sync_context;
   39741           0 :         if (object->out.sync_context == NULL) {
   39742           0 :                 Py_RETURN_NONE;
   39743             :         }
   39744           0 :         py_sync_context = PyLong_FromUnsignedLongLong((uint32_t)*object->out.sync_context);
   39745           0 :         return py_sync_context;
   39746             : }
   39747             : 
   39748           0 : static int py_netr_DatabaseSync2_out_set_sync_context(PyObject *py_obj, PyObject *value, void *closure)
   39749             : {
   39750           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   39751           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.sync_context));
   39752           0 :         if (value == NULL) {
   39753           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.sync_context");
   39754           0 :                 return -1;
   39755             :         }
   39756           0 :         object->out.sync_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.sync_context);
   39757           0 :         if (object->out.sync_context == NULL) {
   39758           0 :                 PyErr_NoMemory();
   39759           0 :                 return -1;
   39760             :         }
   39761             :         {
   39762           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.sync_context));
   39763           0 :                 if (PyLong_Check(value)) {
   39764             :                         unsigned long long test_var;
   39765           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   39766           0 :                         if (PyErr_Occurred() != NULL) {
   39767           0 :                                 return -1;
   39768             :                         }
   39769           0 :                         if (test_var > uint_max) {
   39770           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   39771             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39772           0 :                                 return -1;
   39773             :                         }
   39774           0 :                         *object->out.sync_context = test_var;
   39775             :                 } else {
   39776           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   39777             :                           PyLong_Type.tp_name);
   39778           0 :                         return -1;
   39779             :                 }
   39780             :         }
   39781           0 :         return 0;
   39782             : }
   39783             : 
   39784           0 : static PyObject *py_netr_DatabaseSync2_out_get_delta_enum_array(PyObject *obj, void *closure)
   39785             : {
   39786           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(obj);
   39787             :         PyObject *py_delta_enum_array;
   39788           0 :         if (object->out.delta_enum_array == NULL) {
   39789           0 :                 Py_RETURN_NONE;
   39790             :         }
   39791           0 :         if (*object->out.delta_enum_array == NULL) {
   39792           0 :                 py_delta_enum_array = Py_None;
   39793           0 :                 Py_INCREF(py_delta_enum_array);
   39794             :         } else {
   39795           0 :                 py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *object->out.delta_enum_array, *object->out.delta_enum_array);
   39796             :         }
   39797           0 :         return py_delta_enum_array;
   39798             : }
   39799             : 
   39800           0 : static int py_netr_DatabaseSync2_out_set_delta_enum_array(PyObject *py_obj, PyObject *value, void *closure)
   39801             : {
   39802           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   39803           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.delta_enum_array));
   39804           0 :         if (value == NULL) {
   39805           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.delta_enum_array");
   39806           0 :                 return -1;
   39807             :         }
   39808           0 :         object->out.delta_enum_array = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.delta_enum_array);
   39809           0 :         if (object->out.delta_enum_array == NULL) {
   39810           0 :                 PyErr_NoMemory();
   39811           0 :                 return -1;
   39812             :         }
   39813           0 :         if (value == Py_None) {
   39814           0 :                 *object->out.delta_enum_array = NULL;
   39815             :         } else {
   39816           0 :                 *object->out.delta_enum_array = NULL;
   39817           0 :                 PY_CHECK_TYPE(&netr_DELTA_ENUM_ARRAY_Type, value, return -1;);
   39818           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   39819           0 :                         PyErr_NoMemory();
   39820           0 :                         return -1;
   39821             :                 }
   39822           0 :                 *object->out.delta_enum_array = (struct netr_DELTA_ENUM_ARRAY *)pytalloc_get_ptr(value);
   39823             :         }
   39824           0 :         return 0;
   39825             : }
   39826             : 
   39827           0 : static PyObject *py_netr_DatabaseSync2_in_get_preferredmaximumlength(PyObject *obj, void *closure)
   39828             : {
   39829           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(obj);
   39830             :         PyObject *py_preferredmaximumlength;
   39831           0 :         py_preferredmaximumlength = PyLong_FromUnsignedLongLong((uint32_t)object->in.preferredmaximumlength);
   39832           0 :         return py_preferredmaximumlength;
   39833             : }
   39834             : 
   39835           0 : static int py_netr_DatabaseSync2_in_set_preferredmaximumlength(PyObject *py_obj, PyObject *value, void *closure)
   39836             : {
   39837           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   39838           0 :         if (value == NULL) {
   39839           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.preferredmaximumlength");
   39840           0 :                 return -1;
   39841             :         }
   39842             :         {
   39843           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.preferredmaximumlength));
   39844           0 :                 if (PyLong_Check(value)) {
   39845             :                         unsigned long long test_var;
   39846           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   39847           0 :                         if (PyErr_Occurred() != NULL) {
   39848           0 :                                 return -1;
   39849             :                         }
   39850           0 :                         if (test_var > uint_max) {
   39851           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   39852             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39853           0 :                                 return -1;
   39854             :                         }
   39855           0 :                         object->in.preferredmaximumlength = test_var;
   39856             :                 } else {
   39857           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   39858             :                           PyLong_Type.tp_name);
   39859           0 :                         return -1;
   39860             :                 }
   39861             :         }
   39862           0 :         return 0;
   39863             : }
   39864             : 
   39865           0 : static PyObject *py_netr_DatabaseSync2_get_result(PyObject *obj, void *closure)
   39866             : {
   39867           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(obj);
   39868             :         PyObject *py_result;
   39869           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   39870           0 :         return py_result;
   39871             : }
   39872             : 
   39873           0 : static int py_netr_DatabaseSync2_set_result(PyObject *py_obj, PyObject *value, void *closure)
   39874             : {
   39875           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   39876           0 :         if (value == NULL) {
   39877           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   39878           0 :                 return -1;
   39879             :         }
   39880           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   39881           0 :         return 0;
   39882             : }
   39883             : 
   39884             : static PyGetSetDef py_netr_DatabaseSync2_getsetters[] = {
   39885             :         {
   39886             :                 .name = discard_const_p(char, "in_logon_server"),
   39887             :                 .get = py_netr_DatabaseSync2_in_get_logon_server,
   39888             :                 .set = py_netr_DatabaseSync2_in_set_logon_server,
   39889             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   39890             :         },
   39891             :         {
   39892             :                 .name = discard_const_p(char, "in_computername"),
   39893             :                 .get = py_netr_DatabaseSync2_in_get_computername,
   39894             :                 .set = py_netr_DatabaseSync2_in_set_computername,
   39895             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   39896             :         },
   39897             :         {
   39898             :                 .name = discard_const_p(char, "in_credential"),
   39899             :                 .get = py_netr_DatabaseSync2_in_get_credential,
   39900             :                 .set = py_netr_DatabaseSync2_in_set_credential,
   39901             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   39902             :         },
   39903             :         {
   39904             :                 .name = discard_const_p(char, "in_return_authenticator"),
   39905             :                 .get = py_netr_DatabaseSync2_in_get_return_authenticator,
   39906             :                 .set = py_netr_DatabaseSync2_in_set_return_authenticator,
   39907             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   39908             :         },
   39909             :         {
   39910             :                 .name = discard_const_p(char, "out_return_authenticator"),
   39911             :                 .get = py_netr_DatabaseSync2_out_get_return_authenticator,
   39912             :                 .set = py_netr_DatabaseSync2_out_set_return_authenticator,
   39913             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   39914             :         },
   39915             :         {
   39916             :                 .name = discard_const_p(char, "in_database_id"),
   39917             :                 .get = py_netr_DatabaseSync2_in_get_database_id,
   39918             :                 .set = py_netr_DatabaseSync2_in_set_database_id,
   39919             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SamDatabaseID")
   39920             :         },
   39921             :         {
   39922             :                 .name = discard_const_p(char, "in_restart_state"),
   39923             :                 .get = py_netr_DatabaseSync2_in_get_restart_state,
   39924             :                 .set = py_netr_DatabaseSync2_in_set_restart_state,
   39925             :                 .doc = discard_const_p(char, "PIDL-generated element of base type SyncStateEnum")
   39926             :         },
   39927             :         {
   39928             :                 .name = discard_const_p(char, "in_sync_context"),
   39929             :                 .get = py_netr_DatabaseSync2_in_get_sync_context,
   39930             :                 .set = py_netr_DatabaseSync2_in_set_sync_context,
   39931             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   39932             :         },
   39933             :         {
   39934             :                 .name = discard_const_p(char, "out_sync_context"),
   39935             :                 .get = py_netr_DatabaseSync2_out_get_sync_context,
   39936             :                 .set = py_netr_DatabaseSync2_out_set_sync_context,
   39937             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   39938             :         },
   39939             :         {
   39940             :                 .name = discard_const_p(char, "out_delta_enum_array"),
   39941             :                 .get = py_netr_DatabaseSync2_out_get_delta_enum_array,
   39942             :                 .set = py_netr_DatabaseSync2_out_set_delta_enum_array,
   39943             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_ENUM_ARRAY")
   39944             :         },
   39945             :         {
   39946             :                 .name = discard_const_p(char, "in_preferredmaximumlength"),
   39947             :                 .get = py_netr_DatabaseSync2_in_get_preferredmaximumlength,
   39948             :                 .set = py_netr_DatabaseSync2_in_set_preferredmaximumlength,
   39949             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   39950             :         },
   39951             :         {
   39952             :                 .name = discard_const_p(char, "result"),
   39953             :                 .get = py_netr_DatabaseSync2_get_result,
   39954             :                 .set = py_netr_DatabaseSync2_set_result,
   39955             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   39956             :         },
   39957             :         { .name = NULL }
   39958             : };
   39959             : 
   39960           0 : static PyObject *py_netr_DatabaseSync2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   39961             : {
   39962           0 :         PyObject *self = pytalloc_new(struct netr_DatabaseSync2, type);
   39963           0 :         struct netr_DatabaseSync2 *_self = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(self);
   39964           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   39965           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   39966           0 :         _self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   39967           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   39968           0 :         _self->in.sync_context = talloc_zero(mem_ctx, uint32_t);
   39969           0 :         _self->out.sync_context = talloc_zero(mem_ctx, uint32_t);
   39970             :         /* a pointer to a NULL pointer */
   39971           0 :         _self->out.delta_enum_array = talloc_zero(mem_ctx, struct netr_DELTA_ENUM_ARRAY *);
   39972           0 :         return self;
   39973             : }
   39974             : 
   39975           0 : static PyObject *py_netr_DatabaseSync2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   39976             : {
   39977             : 
   39978             : 
   39979           0 :         return PyLong_FromLong(16);
   39980             : }
   39981             : 
   39982           0 : static PyObject *py_netr_DatabaseSync2_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   39983             : {
   39984           0 :         const struct ndr_interface_call *call = NULL;
   39985           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   39986           0 :         PyObject *ret = NULL;
   39987           0 :         struct ndr_push *push = NULL;
   39988             :         DATA_BLOB blob;
   39989             :         enum ndr_err_code err;
   39990             : 
   39991           0 :         if (ndr_table_netlogon.num_calls < 17) {
   39992           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseSync2_ndr_pack");
   39993           0 :                 return NULL;
   39994             :         }
   39995           0 :         call = &ndr_table_netlogon.calls[16];
   39996             : 
   39997           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   39998           0 :         if (push == NULL) {
   39999           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   40000           0 :                 return NULL;
   40001             :         }
   40002             : 
   40003           0 :         push->flags |= ndr_push_flags;
   40004             : 
   40005           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   40006           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   40007           0 :                 TALLOC_FREE(push);
   40008           0 :                 PyErr_SetNdrError(err);
   40009           0 :                 return NULL;
   40010             :         }
   40011           0 :         blob = ndr_push_blob(push);
   40012           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   40013           0 :         TALLOC_FREE(push);
   40014           0 :         return ret;
   40015             : }
   40016             : 
   40017           0 : static PyObject *py_netr_DatabaseSync2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40018             : {
   40019           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   40020           0 :         PyObject *bigendian_obj = NULL;
   40021           0 :         PyObject *ndr64_obj = NULL;
   40022           0 :         uint32_t ndr_push_flags = 0;
   40023             : 
   40024           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   40025             :                 discard_const_p(char *, kwnames),
   40026             :                 &bigendian_obj,
   40027             :                 &ndr64_obj)) {
   40028           0 :                 return NULL;
   40029             :         }
   40030             : 
   40031           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40032           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   40033             :         }
   40034           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40035           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   40036             :         }
   40037             : 
   40038           0 :         return py_netr_DatabaseSync2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   40039             : }
   40040             : 
   40041           0 : static PyObject *py_netr_DatabaseSync2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40042             : {
   40043           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   40044           0 :         PyObject *bigendian_obj = NULL;
   40045           0 :         PyObject *ndr64_obj = NULL;
   40046           0 :         uint32_t ndr_push_flags = 0;
   40047             : 
   40048           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   40049             :                 discard_const_p(char *, kwnames),
   40050             :                 &bigendian_obj,
   40051             :                 &ndr64_obj)) {
   40052           0 :                 return NULL;
   40053             :         }
   40054             : 
   40055           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40056           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   40057             :         }
   40058           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40059           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   40060             :         }
   40061             : 
   40062           0 :         return py_netr_DatabaseSync2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   40063             : }
   40064             : 
   40065           0 : static PyObject *py_netr_DatabaseSync2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   40066             : {
   40067           0 :         const struct ndr_interface_call *call = NULL;
   40068           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   40069           0 :         struct ndr_pull *pull = NULL;
   40070             :         enum ndr_err_code err;
   40071             : 
   40072           0 :         if (ndr_table_netlogon.num_calls < 17) {
   40073           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseSync2_ndr_unpack");
   40074           0 :                 return NULL;
   40075             :         }
   40076           0 :         call = &ndr_table_netlogon.calls[16];
   40077             : 
   40078           0 :         pull = ndr_pull_init_blob(blob, object);
   40079           0 :         if (pull == NULL) {
   40080           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   40081           0 :                 return NULL;
   40082             :         }
   40083             : 
   40084           0 :         pull->flags |= ndr_pull_flags;
   40085             : 
   40086           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   40087           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   40088           0 :                 TALLOC_FREE(pull);
   40089           0 :                 PyErr_SetNdrError(err);
   40090           0 :                 return NULL;
   40091             :         }
   40092           0 :         if (!allow_remaining) {
   40093             :                 uint32_t highest_ofs;
   40094             : 
   40095           0 :                 if (pull->offset > pull->relative_highest_offset) {
   40096           0 :                         highest_ofs = pull->offset;
   40097             :                 } else {
   40098           0 :                         highest_ofs = pull->relative_highest_offset;
   40099             :                 }
   40100           0 :                 if (highest_ofs < pull->data_size) {
   40101           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   40102             :                                 "not all bytes consumed ofs[%u] size[%u]",
   40103             :                                 highest_ofs, pull->data_size);
   40104           0 :                         TALLOC_FREE(pull);
   40105           0 :                         PyErr_SetNdrError(err);
   40106           0 :                         return NULL;
   40107             :                 }
   40108             :         }
   40109             : 
   40110           0 :         TALLOC_FREE(pull);
   40111           0 :         Py_RETURN_NONE;
   40112             : }
   40113             : 
   40114           0 : static PyObject *py_netr_DatabaseSync2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40115             : {
   40116             :         DATA_BLOB blob;
   40117           0 :         Py_ssize_t blob_length = 0;
   40118           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   40119           0 :         PyObject *bigendian_obj = NULL;
   40120           0 :         PyObject *ndr64_obj = NULL;
   40121           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   40122           0 :         PyObject *allow_remaining_obj = NULL;
   40123           0 :         bool allow_remaining = false;
   40124             : 
   40125           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   40126             :                 discard_const_p(char *, kwnames),
   40127             :                 &blob.data, &blob_length,
   40128             :                 &bigendian_obj,
   40129             :                 &ndr64_obj,
   40130             :                 &allow_remaining_obj)) {
   40131           0 :                 return NULL;
   40132             :         }
   40133           0 :         blob.length = blob_length;
   40134             : 
   40135           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40136           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   40137             :         }
   40138           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40139           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   40140             :         }
   40141             : 
   40142           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   40143           0 :                 allow_remaining = true;
   40144             :         }
   40145             : 
   40146           0 :         return py_netr_DatabaseSync2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   40147             : }
   40148             : 
   40149           0 : static PyObject *py_netr_DatabaseSync2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40150             : {
   40151             :         DATA_BLOB blob;
   40152           0 :         Py_ssize_t blob_length = 0;
   40153           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   40154           0 :         PyObject *bigendian_obj = NULL;
   40155           0 :         PyObject *ndr64_obj = NULL;
   40156           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   40157           0 :         PyObject *allow_remaining_obj = NULL;
   40158           0 :         bool allow_remaining = false;
   40159             : 
   40160           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   40161             :                 discard_const_p(char *, kwnames),
   40162             :                 &blob.data, &blob_length,
   40163             :                 &bigendian_obj,
   40164             :                 &ndr64_obj,
   40165             :                 &allow_remaining_obj)) {
   40166           0 :                 return NULL;
   40167             :         }
   40168           0 :         blob.length = blob_length;
   40169             : 
   40170           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40171           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   40172             :         }
   40173           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40174           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   40175             :         }
   40176             : 
   40177           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   40178           0 :                 allow_remaining = true;
   40179             :         }
   40180             : 
   40181           0 :         return py_netr_DatabaseSync2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   40182             : }
   40183             : 
   40184           0 : static PyObject *py_netr_DatabaseSync2_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   40185             : {
   40186           0 :         const struct ndr_interface_call *call = NULL;
   40187           0 :         struct netr_DatabaseSync2 *object = (struct netr_DatabaseSync2 *)pytalloc_get_ptr(py_obj);
   40188             :         PyObject *ret;
   40189             :         char *retstr;
   40190             : 
   40191           0 :         if (ndr_table_netlogon.num_calls < 17) {
   40192           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseSync2_ndr_print");
   40193           0 :                 return NULL;
   40194             :         }
   40195           0 :         call = &ndr_table_netlogon.calls[16];
   40196             : 
   40197           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   40198           0 :         ret = PyUnicode_FromString(retstr);
   40199           0 :         TALLOC_FREE(retstr);
   40200             : 
   40201           0 :         return ret;
   40202             : }
   40203             : 
   40204           0 : static PyObject *py_netr_DatabaseSync2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   40205             : {
   40206           0 :         return py_netr_DatabaseSync2_ndr_print(py_obj, "netr_DatabaseSync2_in", NDR_IN);
   40207             : }
   40208             : 
   40209           0 : static PyObject *py_netr_DatabaseSync2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   40210             : {
   40211           0 :         return py_netr_DatabaseSync2_ndr_print(py_obj, "netr_DatabaseSync2_out", NDR_OUT);
   40212             : }
   40213             : 
   40214             : static PyMethodDef py_netr_DatabaseSync2_methods[] = {
   40215             :         { "opnum", (PyCFunction)py_netr_DatabaseSync2_ndr_opnum, METH_NOARGS|METH_CLASS,
   40216             :                 "netlogon.netr_DatabaseSync2.opnum() -> 16 (0x10) " },
   40217             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   40218             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   40219             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   40220             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   40221             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   40222             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   40223             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseSync2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   40224             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   40225             :         { "__ndr_print_in__", (PyCFunction)py_netr_DatabaseSync2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   40226             :         { "__ndr_print_out__", (PyCFunction)py_netr_DatabaseSync2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   40227             :         { NULL, NULL, 0, NULL }
   40228             : };
   40229             : 
   40230             : 
   40231             : static PyTypeObject netr_DatabaseSync2_Type = {
   40232             :         PyVarObject_HEAD_INIT(NULL, 0)
   40233             :         .tp_name = "netlogon.netr_DatabaseSync2",
   40234             :         .tp_getset = py_netr_DatabaseSync2_getsetters,
   40235             :         .tp_methods = py_netr_DatabaseSync2_methods,
   40236             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   40237             :         .tp_new = py_netr_DatabaseSync2_new,
   40238             : };
   40239             : 
   40240           0 : static bool pack_py_netr_DatabaseSync2_args_in(PyObject *args, PyObject *kwargs, struct netr_DatabaseSync2 *r)
   40241             : {
   40242             :         PyObject *py_logon_server;
   40243             :         PyObject *py_computername;
   40244             :         PyObject *py_credential;
   40245             :         PyObject *py_return_authenticator;
   40246             :         PyObject *py_database_id;
   40247             :         PyObject *py_restart_state;
   40248             :         PyObject *py_sync_context;
   40249             :         PyObject *py_preferredmaximumlength;
   40250           0 :         const char *kwnames[] = {
   40251             :                 "logon_server", "computername", "credential", "return_authenticator", "database_id", "restart_state", "sync_context", "preferredmaximumlength", NULL
   40252             :         };
   40253             : 
   40254           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)) {
   40255           0 :                 return false;
   40256             :         }
   40257             : 
   40258           0 :         if (py_logon_server == NULL) {
   40259           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_server");
   40260           0 :                 return false;
   40261             :         }
   40262           0 :         r->in.logon_server = talloc_ptrtype(r, r->in.logon_server);
   40263           0 :         if (r->in.logon_server == NULL) {
   40264           0 :                 PyErr_NoMemory();
   40265           0 :                 return false;
   40266             :         }
   40267             :         {
   40268             :                 const char *test_str;
   40269             :                 const char *talloc_str;
   40270           0 :                 PyObject *unicode = NULL;
   40271           0 :                 if (PyUnicode_Check(py_logon_server)) {
   40272           0 :                         unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   40273           0 :                         if (unicode == NULL) {
   40274           0 :                                 PyErr_NoMemory();
   40275           0 :                                 return false;
   40276             :                         }
   40277           0 :                         test_str = PyBytes_AS_STRING(unicode);
   40278           0 :                 } else if (PyBytes_Check(py_logon_server)) {
   40279           0 :                         test_str = PyBytes_AS_STRING(py_logon_server);
   40280             :                 } else {
   40281           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   40282           0 :                         return false;
   40283             :                 }
   40284           0 :                 talloc_str = talloc_strdup(r, test_str);
   40285           0 :                 if (unicode != NULL) {
   40286           0 :                         Py_DECREF(unicode);
   40287             :                 }
   40288           0 :                 if (talloc_str == NULL) {
   40289           0 :                         PyErr_NoMemory();
   40290           0 :                         return false;
   40291             :                 }
   40292           0 :                 r->in.logon_server = talloc_str;
   40293             :         }
   40294           0 :         if (py_computername == NULL) {
   40295           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computername");
   40296           0 :                 return false;
   40297             :         }
   40298           0 :         r->in.computername = talloc_ptrtype(r, r->in.computername);
   40299           0 :         if (r->in.computername == NULL) {
   40300           0 :                 PyErr_NoMemory();
   40301           0 :                 return false;
   40302             :         }
   40303             :         {
   40304             :                 const char *test_str;
   40305             :                 const char *talloc_str;
   40306           0 :                 PyObject *unicode = NULL;
   40307           0 :                 if (PyUnicode_Check(py_computername)) {
   40308           0 :                         unicode = PyUnicode_AsEncodedString(py_computername, "utf-8", "ignore");
   40309           0 :                         if (unicode == NULL) {
   40310           0 :                                 PyErr_NoMemory();
   40311           0 :                                 return false;
   40312             :                         }
   40313           0 :                         test_str = PyBytes_AS_STRING(unicode);
   40314           0 :                 } else if (PyBytes_Check(py_computername)) {
   40315           0 :                         test_str = PyBytes_AS_STRING(py_computername);
   40316             :                 } else {
   40317           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computername)->tp_name);
   40318           0 :                         return false;
   40319             :                 }
   40320           0 :                 talloc_str = talloc_strdup(r, test_str);
   40321           0 :                 if (unicode != NULL) {
   40322           0 :                         Py_DECREF(unicode);
   40323             :                 }
   40324           0 :                 if (talloc_str == NULL) {
   40325           0 :                         PyErr_NoMemory();
   40326           0 :                         return false;
   40327             :                 }
   40328           0 :                 r->in.computername = talloc_str;
   40329             :         }
   40330           0 :         if (py_credential == NULL) {
   40331           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   40332           0 :                 return false;
   40333             :         }
   40334           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   40335           0 :         if (r->in.credential == NULL) {
   40336           0 :                 PyErr_NoMemory();
   40337           0 :                 return false;
   40338             :         }
   40339           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   40340           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   40341           0 :                 PyErr_NoMemory();
   40342           0 :                 return false;
   40343             :         }
   40344           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   40345           0 :         if (py_return_authenticator == NULL) {
   40346           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.return_authenticator");
   40347           0 :                 return false;
   40348             :         }
   40349           0 :         r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
   40350           0 :         if (r->in.return_authenticator == NULL) {
   40351           0 :                 PyErr_NoMemory();
   40352           0 :                 return false;
   40353             :         }
   40354           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   40355           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   40356           0 :                 PyErr_NoMemory();
   40357           0 :                 return false;
   40358             :         }
   40359           0 :         r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   40360           0 :         if (py_database_id == NULL) {
   40361           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.database_id");
   40362           0 :                 return false;
   40363             :         }
   40364             :         {
   40365           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.database_id));
   40366           0 :                 if (PyLong_Check(py_database_id)) {
   40367             :                         unsigned long long test_var;
   40368           0 :                         test_var = PyLong_AsUnsignedLongLong(py_database_id);
   40369           0 :                         if (PyErr_Occurred() != NULL) {
   40370           0 :                                 return false;
   40371             :                         }
   40372           0 :                         if (test_var > uint_max) {
   40373           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   40374             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40375           0 :                                 return false;
   40376             :                         }
   40377           0 :                         r->in.database_id = test_var;
   40378             :                 } else {
   40379           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   40380             :                           PyLong_Type.tp_name);
   40381           0 :                         return false;
   40382             :                 }
   40383             :         }
   40384           0 :         if (py_restart_state == NULL) {
   40385           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.restart_state");
   40386           0 :                 return false;
   40387             :         }
   40388             :         {
   40389           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.restart_state));
   40390           0 :                 if (PyLong_Check(py_restart_state)) {
   40391             :                         unsigned long long test_var;
   40392           0 :                         test_var = PyLong_AsUnsignedLongLong(py_restart_state);
   40393           0 :                         if (PyErr_Occurred() != NULL) {
   40394           0 :                                 return false;
   40395             :                         }
   40396           0 :                         if (test_var > uint_max) {
   40397           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   40398             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40399           0 :                                 return false;
   40400             :                         }
   40401           0 :                         r->in.restart_state = test_var;
   40402             :                 } else {
   40403           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   40404             :                           PyLong_Type.tp_name);
   40405           0 :                         return false;
   40406             :                 }
   40407             :         }
   40408           0 :         if (py_sync_context == NULL) {
   40409           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.sync_context");
   40410           0 :                 return false;
   40411             :         }
   40412           0 :         r->in.sync_context = talloc_ptrtype(r, r->in.sync_context);
   40413           0 :         if (r->in.sync_context == NULL) {
   40414           0 :                 PyErr_NoMemory();
   40415           0 :                 return false;
   40416             :         }
   40417             :         {
   40418           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.sync_context));
   40419           0 :                 if (PyLong_Check(py_sync_context)) {
   40420             :                         unsigned long long test_var;
   40421           0 :                         test_var = PyLong_AsUnsignedLongLong(py_sync_context);
   40422           0 :                         if (PyErr_Occurred() != NULL) {
   40423           0 :                                 return false;
   40424             :                         }
   40425           0 :                         if (test_var > uint_max) {
   40426           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   40427             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40428           0 :                                 return false;
   40429             :                         }
   40430           0 :                         *r->in.sync_context = test_var;
   40431             :                 } else {
   40432           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   40433             :                           PyLong_Type.tp_name);
   40434           0 :                         return false;
   40435             :                 }
   40436             :         }
   40437           0 :         if (py_preferredmaximumlength == NULL) {
   40438           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.preferredmaximumlength");
   40439           0 :                 return false;
   40440             :         }
   40441             :         {
   40442           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.preferredmaximumlength));
   40443           0 :                 if (PyLong_Check(py_preferredmaximumlength)) {
   40444             :                         unsigned long long test_var;
   40445           0 :                         test_var = PyLong_AsUnsignedLongLong(py_preferredmaximumlength);
   40446           0 :                         if (PyErr_Occurred() != NULL) {
   40447           0 :                                 return false;
   40448             :                         }
   40449           0 :                         if (test_var > uint_max) {
   40450           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   40451             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40452           0 :                                 return false;
   40453             :                         }
   40454           0 :                         r->in.preferredmaximumlength = test_var;
   40455             :                 } else {
   40456           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   40457             :                           PyLong_Type.tp_name);
   40458           0 :                         return false;
   40459             :                 }
   40460             :         }
   40461           0 :         return true;
   40462             : }
   40463             : 
   40464           0 : static PyObject *unpack_py_netr_DatabaseSync2_args_out(struct netr_DatabaseSync2 *r)
   40465             : {
   40466             :         PyObject *result;
   40467             :         PyObject *py_return_authenticator;
   40468             :         PyObject *py_sync_context;
   40469             :         PyObject *py_delta_enum_array;
   40470           0 :         result = PyTuple_New(3);
   40471           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   40472           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   40473           0 :         py_sync_context = PyLong_FromUnsignedLongLong((uint32_t)*r->out.sync_context);
   40474           0 :         PyTuple_SetItem(result, 1, py_sync_context);
   40475           0 :         if (*r->out.delta_enum_array == NULL) {
   40476           0 :                 py_delta_enum_array = Py_None;
   40477           0 :                 Py_INCREF(py_delta_enum_array);
   40478             :         } else {
   40479           0 :                 py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *r->out.delta_enum_array, *r->out.delta_enum_array);
   40480             :         }
   40481           0 :         PyTuple_SetItem(result, 2, py_delta_enum_array);
   40482           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   40483           0 :                 PyErr_SetNTSTATUS(r->out.result);
   40484           0 :                 return NULL;
   40485             :         }
   40486             : 
   40487           0 :         return result;
   40488             : }
   40489             : 
   40490             : 
   40491           0 : static PyObject *py_netr_DatabaseRedo_in_get_logon_server(PyObject *obj, void *closure)
   40492             : {
   40493           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(obj);
   40494             :         PyObject *py_logon_server;
   40495           0 :         if (object->in.logon_server == NULL) {
   40496           0 :                 Py_RETURN_NONE;
   40497             :         }
   40498           0 :         if (object->in.logon_server == NULL) {
   40499           0 :                 py_logon_server = Py_None;
   40500           0 :                 Py_INCREF(py_logon_server);
   40501             :         } else {
   40502           0 :                 py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   40503             :         }
   40504           0 :         return py_logon_server;
   40505             : }
   40506             : 
   40507           0 : static int py_netr_DatabaseRedo_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   40508             : {
   40509           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(py_obj);
   40510           0 :         if (value == NULL) {
   40511           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_server");
   40512           0 :                 return -1;
   40513             :         }
   40514           0 :         object->in.logon_server = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon_server);
   40515           0 :         if (object->in.logon_server == NULL) {
   40516           0 :                 PyErr_NoMemory();
   40517           0 :                 return -1;
   40518             :         }
   40519             :         {
   40520             :                 const char *test_str;
   40521             :                 const char *talloc_str;
   40522           0 :                 PyObject *unicode = NULL;
   40523           0 :                 if (PyUnicode_Check(value)) {
   40524           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   40525           0 :                         if (unicode == NULL) {
   40526           0 :                                 PyErr_NoMemory();
   40527           0 :                                 return -1;
   40528             :                         }
   40529           0 :                         test_str = PyBytes_AS_STRING(unicode);
   40530           0 :                 } else if (PyBytes_Check(value)) {
   40531           0 :                         test_str = PyBytes_AS_STRING(value);
   40532             :                 } else {
   40533           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   40534           0 :                         return -1;
   40535             :                 }
   40536           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   40537           0 :                 if (unicode != NULL) {
   40538           0 :                         Py_DECREF(unicode);
   40539             :                 }
   40540           0 :                 if (talloc_str == NULL) {
   40541           0 :                         PyErr_NoMemory();
   40542           0 :                         return -1;
   40543             :                 }
   40544           0 :                 object->in.logon_server = talloc_str;
   40545             :         }
   40546           0 :         return 0;
   40547             : }
   40548             : 
   40549           0 : static PyObject *py_netr_DatabaseRedo_in_get_computername(PyObject *obj, void *closure)
   40550             : {
   40551           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(obj);
   40552             :         PyObject *py_computername;
   40553           0 :         if (object->in.computername == NULL) {
   40554           0 :                 Py_RETURN_NONE;
   40555             :         }
   40556           0 :         if (object->in.computername == NULL) {
   40557           0 :                 py_computername = Py_None;
   40558           0 :                 Py_INCREF(py_computername);
   40559             :         } else {
   40560           0 :                 py_computername = PyUnicode_Decode(object->in.computername, strlen(object->in.computername), "utf-8", "ignore");
   40561             :         }
   40562           0 :         return py_computername;
   40563             : }
   40564             : 
   40565           0 : static int py_netr_DatabaseRedo_in_set_computername(PyObject *py_obj, PyObject *value, void *closure)
   40566             : {
   40567           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(py_obj);
   40568           0 :         if (value == NULL) {
   40569           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computername");
   40570           0 :                 return -1;
   40571             :         }
   40572           0 :         object->in.computername = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computername);
   40573           0 :         if (object->in.computername == NULL) {
   40574           0 :                 PyErr_NoMemory();
   40575           0 :                 return -1;
   40576             :         }
   40577             :         {
   40578             :                 const char *test_str;
   40579             :                 const char *talloc_str;
   40580           0 :                 PyObject *unicode = NULL;
   40581           0 :                 if (PyUnicode_Check(value)) {
   40582           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   40583           0 :                         if (unicode == NULL) {
   40584           0 :                                 PyErr_NoMemory();
   40585           0 :                                 return -1;
   40586             :                         }
   40587           0 :                         test_str = PyBytes_AS_STRING(unicode);
   40588           0 :                 } else if (PyBytes_Check(value)) {
   40589           0 :                         test_str = PyBytes_AS_STRING(value);
   40590             :                 } else {
   40591           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   40592           0 :                         return -1;
   40593             :                 }
   40594           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   40595           0 :                 if (unicode != NULL) {
   40596           0 :                         Py_DECREF(unicode);
   40597             :                 }
   40598           0 :                 if (talloc_str == NULL) {
   40599           0 :                         PyErr_NoMemory();
   40600           0 :                         return -1;
   40601             :                 }
   40602           0 :                 object->in.computername = talloc_str;
   40603             :         }
   40604           0 :         return 0;
   40605             : }
   40606             : 
   40607           0 : static PyObject *py_netr_DatabaseRedo_in_get_credential(PyObject *obj, void *closure)
   40608             : {
   40609           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(obj);
   40610             :         PyObject *py_credential;
   40611           0 :         if (object->in.credential == NULL) {
   40612           0 :                 Py_RETURN_NONE;
   40613             :         }
   40614           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   40615           0 :         return py_credential;
   40616             : }
   40617             : 
   40618           0 : static int py_netr_DatabaseRedo_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   40619             : {
   40620           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(py_obj);
   40621           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   40622           0 :         if (value == NULL) {
   40623           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   40624           0 :                 return -1;
   40625             :         }
   40626           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   40627           0 :         if (object->in.credential == NULL) {
   40628           0 :                 PyErr_NoMemory();
   40629           0 :                 return -1;
   40630             :         }
   40631           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   40632           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   40633           0 :                 PyErr_NoMemory();
   40634           0 :                 return -1;
   40635             :         }
   40636           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   40637           0 :         return 0;
   40638             : }
   40639             : 
   40640           0 : static PyObject *py_netr_DatabaseRedo_in_get_return_authenticator(PyObject *obj, void *closure)
   40641             : {
   40642           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(obj);
   40643             :         PyObject *py_return_authenticator;
   40644           0 :         if (object->in.return_authenticator == NULL) {
   40645           0 :                 Py_RETURN_NONE;
   40646             :         }
   40647           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   40648           0 :         return py_return_authenticator;
   40649             : }
   40650             : 
   40651           0 : static int py_netr_DatabaseRedo_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   40652             : {
   40653           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(py_obj);
   40654           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   40655           0 :         if (value == NULL) {
   40656           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.return_authenticator");
   40657           0 :                 return -1;
   40658             :         }
   40659           0 :         object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
   40660           0 :         if (object->in.return_authenticator == NULL) {
   40661           0 :                 PyErr_NoMemory();
   40662           0 :                 return -1;
   40663             :         }
   40664           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   40665           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   40666           0 :                 PyErr_NoMemory();
   40667           0 :                 return -1;
   40668             :         }
   40669           0 :         object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   40670           0 :         return 0;
   40671             : }
   40672             : 
   40673           0 : static PyObject *py_netr_DatabaseRedo_out_get_return_authenticator(PyObject *obj, void *closure)
   40674             : {
   40675           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(obj);
   40676             :         PyObject *py_return_authenticator;
   40677           0 :         if (object->out.return_authenticator == NULL) {
   40678           0 :                 Py_RETURN_NONE;
   40679             :         }
   40680           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   40681           0 :         return py_return_authenticator;
   40682             : }
   40683             : 
   40684           0 : static int py_netr_DatabaseRedo_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   40685             : {
   40686           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(py_obj);
   40687           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   40688           0 :         if (value == NULL) {
   40689           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   40690           0 :                 return -1;
   40691             :         }
   40692           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   40693           0 :         if (object->out.return_authenticator == NULL) {
   40694           0 :                 PyErr_NoMemory();
   40695           0 :                 return -1;
   40696             :         }
   40697           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   40698           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   40699           0 :                 PyErr_NoMemory();
   40700           0 :                 return -1;
   40701             :         }
   40702           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   40703           0 :         return 0;
   40704             : }
   40705             : 
   40706           0 : static PyObject *py_netr_DatabaseRedo_in_get_change_log_entry(PyObject *obj, void *closure)
   40707             : {
   40708           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(obj);
   40709             :         PyObject *py_change_log_entry;
   40710           0 :         py_change_log_entry = pytalloc_reference_ex(&netr_ChangeLogEntry_Type, pytalloc_get_mem_ctx(obj), &object->in.change_log_entry);
   40711           0 :         return py_change_log_entry;
   40712             : }
   40713             : 
   40714           0 : static int py_netr_DatabaseRedo_in_set_change_log_entry(PyObject *py_obj, PyObject *value, void *closure)
   40715             : {
   40716           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(py_obj);
   40717           0 :         if (value == NULL) {
   40718           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.change_log_entry");
   40719           0 :                 return -1;
   40720             :         }
   40721           0 :         PY_CHECK_TYPE(&netr_ChangeLogEntry_Type, value, return -1;);
   40722           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   40723           0 :                 PyErr_NoMemory();
   40724           0 :                 return -1;
   40725             :         }
   40726           0 :         object->in.change_log_entry = *(struct netr_ChangeLogEntry *)pytalloc_get_ptr(value);
   40727           0 :         return 0;
   40728             : }
   40729             : 
   40730           0 : static PyObject *py_netr_DatabaseRedo_in_get_change_log_entry_size(PyObject *obj, void *closure)
   40731             : {
   40732           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(obj);
   40733             :         PyObject *py_change_log_entry_size;
   40734           0 :         py_change_log_entry_size = PyLong_FromUnsignedLongLong((uint32_t)object->in.change_log_entry_size);
   40735           0 :         return py_change_log_entry_size;
   40736             : }
   40737             : 
   40738           0 : static int py_netr_DatabaseRedo_in_set_change_log_entry_size(PyObject *py_obj, PyObject *value, void *closure)
   40739             : {
   40740           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(py_obj);
   40741           0 :         if (value == NULL) {
   40742           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.change_log_entry_size");
   40743           0 :                 return -1;
   40744             :         }
   40745             :         {
   40746           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.change_log_entry_size));
   40747           0 :                 if (PyLong_Check(value)) {
   40748             :                         unsigned long long test_var;
   40749           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   40750           0 :                         if (PyErr_Occurred() != NULL) {
   40751           0 :                                 return -1;
   40752             :                         }
   40753           0 :                         if (test_var > uint_max) {
   40754           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   40755             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40756           0 :                                 return -1;
   40757             :                         }
   40758           0 :                         object->in.change_log_entry_size = test_var;
   40759             :                 } else {
   40760           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   40761             :                           PyLong_Type.tp_name);
   40762           0 :                         return -1;
   40763             :                 }
   40764             :         }
   40765           0 :         return 0;
   40766             : }
   40767             : 
   40768           0 : static PyObject *py_netr_DatabaseRedo_out_get_delta_enum_array(PyObject *obj, void *closure)
   40769             : {
   40770           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(obj);
   40771             :         PyObject *py_delta_enum_array;
   40772           0 :         if (object->out.delta_enum_array == NULL) {
   40773           0 :                 Py_RETURN_NONE;
   40774             :         }
   40775           0 :         if (*object->out.delta_enum_array == NULL) {
   40776           0 :                 py_delta_enum_array = Py_None;
   40777           0 :                 Py_INCREF(py_delta_enum_array);
   40778             :         } else {
   40779           0 :                 py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *object->out.delta_enum_array, *object->out.delta_enum_array);
   40780             :         }
   40781           0 :         return py_delta_enum_array;
   40782             : }
   40783             : 
   40784           0 : static int py_netr_DatabaseRedo_out_set_delta_enum_array(PyObject *py_obj, PyObject *value, void *closure)
   40785             : {
   40786           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(py_obj);
   40787           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.delta_enum_array));
   40788           0 :         if (value == NULL) {
   40789           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.delta_enum_array");
   40790           0 :                 return -1;
   40791             :         }
   40792           0 :         object->out.delta_enum_array = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.delta_enum_array);
   40793           0 :         if (object->out.delta_enum_array == NULL) {
   40794           0 :                 PyErr_NoMemory();
   40795           0 :                 return -1;
   40796             :         }
   40797           0 :         if (value == Py_None) {
   40798           0 :                 *object->out.delta_enum_array = NULL;
   40799             :         } else {
   40800           0 :                 *object->out.delta_enum_array = NULL;
   40801           0 :                 PY_CHECK_TYPE(&netr_DELTA_ENUM_ARRAY_Type, value, return -1;);
   40802           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   40803           0 :                         PyErr_NoMemory();
   40804           0 :                         return -1;
   40805             :                 }
   40806           0 :                 *object->out.delta_enum_array = (struct netr_DELTA_ENUM_ARRAY *)pytalloc_get_ptr(value);
   40807             :         }
   40808           0 :         return 0;
   40809             : }
   40810             : 
   40811           0 : static PyObject *py_netr_DatabaseRedo_get_result(PyObject *obj, void *closure)
   40812             : {
   40813           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(obj);
   40814             :         PyObject *py_result;
   40815           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   40816           0 :         return py_result;
   40817             : }
   40818             : 
   40819           0 : static int py_netr_DatabaseRedo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   40820             : {
   40821           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(py_obj);
   40822           0 :         if (value == NULL) {
   40823           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   40824           0 :                 return -1;
   40825             :         }
   40826           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   40827           0 :         return 0;
   40828             : }
   40829             : 
   40830             : static PyGetSetDef py_netr_DatabaseRedo_getsetters[] = {
   40831             :         {
   40832             :                 .name = discard_const_p(char, "in_logon_server"),
   40833             :                 .get = py_netr_DatabaseRedo_in_get_logon_server,
   40834             :                 .set = py_netr_DatabaseRedo_in_set_logon_server,
   40835             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   40836             :         },
   40837             :         {
   40838             :                 .name = discard_const_p(char, "in_computername"),
   40839             :                 .get = py_netr_DatabaseRedo_in_get_computername,
   40840             :                 .set = py_netr_DatabaseRedo_in_set_computername,
   40841             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   40842             :         },
   40843             :         {
   40844             :                 .name = discard_const_p(char, "in_credential"),
   40845             :                 .get = py_netr_DatabaseRedo_in_get_credential,
   40846             :                 .set = py_netr_DatabaseRedo_in_set_credential,
   40847             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   40848             :         },
   40849             :         {
   40850             :                 .name = discard_const_p(char, "in_return_authenticator"),
   40851             :                 .get = py_netr_DatabaseRedo_in_get_return_authenticator,
   40852             :                 .set = py_netr_DatabaseRedo_in_set_return_authenticator,
   40853             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   40854             :         },
   40855             :         {
   40856             :                 .name = discard_const_p(char, "out_return_authenticator"),
   40857             :                 .get = py_netr_DatabaseRedo_out_get_return_authenticator,
   40858             :                 .set = py_netr_DatabaseRedo_out_set_return_authenticator,
   40859             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   40860             :         },
   40861             :         {
   40862             :                 .name = discard_const_p(char, "in_change_log_entry"),
   40863             :                 .get = py_netr_DatabaseRedo_in_get_change_log_entry,
   40864             :                 .set = py_netr_DatabaseRedo_in_set_change_log_entry,
   40865             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_ChangeLogEntry")
   40866             :         },
   40867             :         {
   40868             :                 .name = discard_const_p(char, "in_change_log_entry_size"),
   40869             :                 .get = py_netr_DatabaseRedo_in_get_change_log_entry_size,
   40870             :                 .set = py_netr_DatabaseRedo_in_set_change_log_entry_size,
   40871             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   40872             :         },
   40873             :         {
   40874             :                 .name = discard_const_p(char, "out_delta_enum_array"),
   40875             :                 .get = py_netr_DatabaseRedo_out_get_delta_enum_array,
   40876             :                 .set = py_netr_DatabaseRedo_out_set_delta_enum_array,
   40877             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DELTA_ENUM_ARRAY")
   40878             :         },
   40879             :         {
   40880             :                 .name = discard_const_p(char, "result"),
   40881             :                 .get = py_netr_DatabaseRedo_get_result,
   40882             :                 .set = py_netr_DatabaseRedo_set_result,
   40883             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   40884             :         },
   40885             :         { .name = NULL }
   40886             : };
   40887             : 
   40888           0 : static PyObject *py_netr_DatabaseRedo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   40889             : {
   40890           0 :         PyObject *self = pytalloc_new(struct netr_DatabaseRedo, type);
   40891           0 :         struct netr_DatabaseRedo *_self = (struct netr_DatabaseRedo *)pytalloc_get_ptr(self);
   40892           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   40893           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   40894           0 :         _self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   40895           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   40896             :         /* a pointer to a NULL pointer */
   40897           0 :         _self->out.delta_enum_array = talloc_zero(mem_ctx, struct netr_DELTA_ENUM_ARRAY *);
   40898           0 :         return self;
   40899             : }
   40900             : 
   40901           0 : static PyObject *py_netr_DatabaseRedo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   40902             : {
   40903             : 
   40904             : 
   40905           0 :         return PyLong_FromLong(17);
   40906             : }
   40907             : 
   40908           0 : static PyObject *py_netr_DatabaseRedo_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   40909             : {
   40910           0 :         const struct ndr_interface_call *call = NULL;
   40911           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(py_obj);
   40912           0 :         PyObject *ret = NULL;
   40913           0 :         struct ndr_push *push = NULL;
   40914             :         DATA_BLOB blob;
   40915             :         enum ndr_err_code err;
   40916             : 
   40917           0 :         if (ndr_table_netlogon.num_calls < 18) {
   40918           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseRedo_ndr_pack");
   40919           0 :                 return NULL;
   40920             :         }
   40921           0 :         call = &ndr_table_netlogon.calls[17];
   40922             : 
   40923           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   40924           0 :         if (push == NULL) {
   40925           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   40926           0 :                 return NULL;
   40927             :         }
   40928             : 
   40929           0 :         push->flags |= ndr_push_flags;
   40930             : 
   40931           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   40932           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   40933           0 :                 TALLOC_FREE(push);
   40934           0 :                 PyErr_SetNdrError(err);
   40935           0 :                 return NULL;
   40936             :         }
   40937           0 :         blob = ndr_push_blob(push);
   40938           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   40939           0 :         TALLOC_FREE(push);
   40940           0 :         return ret;
   40941             : }
   40942             : 
   40943           0 : static PyObject *py_netr_DatabaseRedo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40944             : {
   40945           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   40946           0 :         PyObject *bigendian_obj = NULL;
   40947           0 :         PyObject *ndr64_obj = NULL;
   40948           0 :         uint32_t ndr_push_flags = 0;
   40949             : 
   40950           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   40951             :                 discard_const_p(char *, kwnames),
   40952             :                 &bigendian_obj,
   40953             :                 &ndr64_obj)) {
   40954           0 :                 return NULL;
   40955             :         }
   40956             : 
   40957           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40958           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   40959             :         }
   40960           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40961           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   40962             :         }
   40963             : 
   40964           0 :         return py_netr_DatabaseRedo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   40965             : }
   40966             : 
   40967           0 : static PyObject *py_netr_DatabaseRedo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40968             : {
   40969           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   40970           0 :         PyObject *bigendian_obj = NULL;
   40971           0 :         PyObject *ndr64_obj = NULL;
   40972           0 :         uint32_t ndr_push_flags = 0;
   40973             : 
   40974           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   40975             :                 discard_const_p(char *, kwnames),
   40976             :                 &bigendian_obj,
   40977             :                 &ndr64_obj)) {
   40978           0 :                 return NULL;
   40979             :         }
   40980             : 
   40981           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40982           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   40983             :         }
   40984           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40985           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   40986             :         }
   40987             : 
   40988           0 :         return py_netr_DatabaseRedo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   40989             : }
   40990             : 
   40991           0 : static PyObject *py_netr_DatabaseRedo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   40992             : {
   40993           0 :         const struct ndr_interface_call *call = NULL;
   40994           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(py_obj);
   40995           0 :         struct ndr_pull *pull = NULL;
   40996             :         enum ndr_err_code err;
   40997             : 
   40998           0 :         if (ndr_table_netlogon.num_calls < 18) {
   40999           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseRedo_ndr_unpack");
   41000           0 :                 return NULL;
   41001             :         }
   41002           0 :         call = &ndr_table_netlogon.calls[17];
   41003             : 
   41004           0 :         pull = ndr_pull_init_blob(blob, object);
   41005           0 :         if (pull == NULL) {
   41006           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   41007           0 :                 return NULL;
   41008             :         }
   41009             : 
   41010           0 :         pull->flags |= ndr_pull_flags;
   41011             : 
   41012           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   41013           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   41014           0 :                 TALLOC_FREE(pull);
   41015           0 :                 PyErr_SetNdrError(err);
   41016           0 :                 return NULL;
   41017             :         }
   41018           0 :         if (!allow_remaining) {
   41019             :                 uint32_t highest_ofs;
   41020             : 
   41021           0 :                 if (pull->offset > pull->relative_highest_offset) {
   41022           0 :                         highest_ofs = pull->offset;
   41023             :                 } else {
   41024           0 :                         highest_ofs = pull->relative_highest_offset;
   41025             :                 }
   41026           0 :                 if (highest_ofs < pull->data_size) {
   41027           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   41028             :                                 "not all bytes consumed ofs[%u] size[%u]",
   41029             :                                 highest_ofs, pull->data_size);
   41030           0 :                         TALLOC_FREE(pull);
   41031           0 :                         PyErr_SetNdrError(err);
   41032           0 :                         return NULL;
   41033             :                 }
   41034             :         }
   41035             : 
   41036           0 :         TALLOC_FREE(pull);
   41037           0 :         Py_RETURN_NONE;
   41038             : }
   41039             : 
   41040           0 : static PyObject *py_netr_DatabaseRedo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41041             : {
   41042             :         DATA_BLOB blob;
   41043           0 :         Py_ssize_t blob_length = 0;
   41044           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   41045           0 :         PyObject *bigendian_obj = NULL;
   41046           0 :         PyObject *ndr64_obj = NULL;
   41047           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   41048           0 :         PyObject *allow_remaining_obj = NULL;
   41049           0 :         bool allow_remaining = false;
   41050             : 
   41051           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   41052             :                 discard_const_p(char *, kwnames),
   41053             :                 &blob.data, &blob_length,
   41054             :                 &bigendian_obj,
   41055             :                 &ndr64_obj,
   41056             :                 &allow_remaining_obj)) {
   41057           0 :                 return NULL;
   41058             :         }
   41059           0 :         blob.length = blob_length;
   41060             : 
   41061           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41062           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   41063             :         }
   41064           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41065           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   41066             :         }
   41067             : 
   41068           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   41069           0 :                 allow_remaining = true;
   41070             :         }
   41071             : 
   41072           0 :         return py_netr_DatabaseRedo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   41073             : }
   41074             : 
   41075           0 : static PyObject *py_netr_DatabaseRedo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41076             : {
   41077             :         DATA_BLOB blob;
   41078           0 :         Py_ssize_t blob_length = 0;
   41079           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   41080           0 :         PyObject *bigendian_obj = NULL;
   41081           0 :         PyObject *ndr64_obj = NULL;
   41082           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   41083           0 :         PyObject *allow_remaining_obj = NULL;
   41084           0 :         bool allow_remaining = false;
   41085             : 
   41086           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   41087             :                 discard_const_p(char *, kwnames),
   41088             :                 &blob.data, &blob_length,
   41089             :                 &bigendian_obj,
   41090             :                 &ndr64_obj,
   41091             :                 &allow_remaining_obj)) {
   41092           0 :                 return NULL;
   41093             :         }
   41094           0 :         blob.length = blob_length;
   41095             : 
   41096           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41097           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   41098             :         }
   41099           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41100           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   41101             :         }
   41102             : 
   41103           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   41104           0 :                 allow_remaining = true;
   41105             :         }
   41106             : 
   41107           0 :         return py_netr_DatabaseRedo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   41108             : }
   41109             : 
   41110           0 : static PyObject *py_netr_DatabaseRedo_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   41111             : {
   41112           0 :         const struct ndr_interface_call *call = NULL;
   41113           0 :         struct netr_DatabaseRedo *object = (struct netr_DatabaseRedo *)pytalloc_get_ptr(py_obj);
   41114             :         PyObject *ret;
   41115             :         char *retstr;
   41116             : 
   41117           0 :         if (ndr_table_netlogon.num_calls < 18) {
   41118           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DatabaseRedo_ndr_print");
   41119           0 :                 return NULL;
   41120             :         }
   41121           0 :         call = &ndr_table_netlogon.calls[17];
   41122             : 
   41123           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   41124           0 :         ret = PyUnicode_FromString(retstr);
   41125           0 :         TALLOC_FREE(retstr);
   41126             : 
   41127           0 :         return ret;
   41128             : }
   41129             : 
   41130           0 : static PyObject *py_netr_DatabaseRedo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   41131             : {
   41132           0 :         return py_netr_DatabaseRedo_ndr_print(py_obj, "netr_DatabaseRedo_in", NDR_IN);
   41133             : }
   41134             : 
   41135           0 : static PyObject *py_netr_DatabaseRedo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   41136             : {
   41137           0 :         return py_netr_DatabaseRedo_ndr_print(py_obj, "netr_DatabaseRedo_out", NDR_OUT);
   41138             : }
   41139             : 
   41140             : static PyMethodDef py_netr_DatabaseRedo_methods[] = {
   41141             :         { "opnum", (PyCFunction)py_netr_DatabaseRedo_ndr_opnum, METH_NOARGS|METH_CLASS,
   41142             :                 "netlogon.netr_DatabaseRedo.opnum() -> 17 (0x11) " },
   41143             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseRedo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   41144             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   41145             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseRedo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   41146             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   41147             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseRedo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   41148             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   41149             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DatabaseRedo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   41150             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   41151             :         { "__ndr_print_in__", (PyCFunction)py_netr_DatabaseRedo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   41152             :         { "__ndr_print_out__", (PyCFunction)py_netr_DatabaseRedo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   41153             :         { NULL, NULL, 0, NULL }
   41154             : };
   41155             : 
   41156             : 
   41157             : static PyTypeObject netr_DatabaseRedo_Type = {
   41158             :         PyVarObject_HEAD_INIT(NULL, 0)
   41159             :         .tp_name = "netlogon.netr_DatabaseRedo",
   41160             :         .tp_getset = py_netr_DatabaseRedo_getsetters,
   41161             :         .tp_methods = py_netr_DatabaseRedo_methods,
   41162             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   41163             :         .tp_new = py_netr_DatabaseRedo_new,
   41164             : };
   41165             : 
   41166           0 : static bool pack_py_netr_DatabaseRedo_args_in(PyObject *args, PyObject *kwargs, struct netr_DatabaseRedo *r)
   41167             : {
   41168             :         PyObject *py_logon_server;
   41169             :         PyObject *py_computername;
   41170             :         PyObject *py_credential;
   41171             :         PyObject *py_return_authenticator;
   41172             :         PyObject *py_change_log_entry;
   41173             :         PyObject *py_change_log_entry_size;
   41174           0 :         const char *kwnames[] = {
   41175             :                 "logon_server", "computername", "credential", "return_authenticator", "change_log_entry", "change_log_entry_size", NULL
   41176             :         };
   41177             : 
   41178           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)) {
   41179           0 :                 return false;
   41180             :         }
   41181             : 
   41182           0 :         if (py_logon_server == NULL) {
   41183           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_server");
   41184           0 :                 return false;
   41185             :         }
   41186           0 :         r->in.logon_server = talloc_ptrtype(r, r->in.logon_server);
   41187           0 :         if (r->in.logon_server == NULL) {
   41188           0 :                 PyErr_NoMemory();
   41189           0 :                 return false;
   41190             :         }
   41191             :         {
   41192             :                 const char *test_str;
   41193             :                 const char *talloc_str;
   41194           0 :                 PyObject *unicode = NULL;
   41195           0 :                 if (PyUnicode_Check(py_logon_server)) {
   41196           0 :                         unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   41197           0 :                         if (unicode == NULL) {
   41198           0 :                                 PyErr_NoMemory();
   41199           0 :                                 return false;
   41200             :                         }
   41201           0 :                         test_str = PyBytes_AS_STRING(unicode);
   41202           0 :                 } else if (PyBytes_Check(py_logon_server)) {
   41203           0 :                         test_str = PyBytes_AS_STRING(py_logon_server);
   41204             :                 } else {
   41205           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   41206           0 :                         return false;
   41207             :                 }
   41208           0 :                 talloc_str = talloc_strdup(r, test_str);
   41209           0 :                 if (unicode != NULL) {
   41210           0 :                         Py_DECREF(unicode);
   41211             :                 }
   41212           0 :                 if (talloc_str == NULL) {
   41213           0 :                         PyErr_NoMemory();
   41214           0 :                         return false;
   41215             :                 }
   41216           0 :                 r->in.logon_server = talloc_str;
   41217             :         }
   41218           0 :         if (py_computername == NULL) {
   41219           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computername");
   41220           0 :                 return false;
   41221             :         }
   41222           0 :         r->in.computername = talloc_ptrtype(r, r->in.computername);
   41223           0 :         if (r->in.computername == NULL) {
   41224           0 :                 PyErr_NoMemory();
   41225           0 :                 return false;
   41226             :         }
   41227             :         {
   41228             :                 const char *test_str;
   41229             :                 const char *talloc_str;
   41230           0 :                 PyObject *unicode = NULL;
   41231           0 :                 if (PyUnicode_Check(py_computername)) {
   41232           0 :                         unicode = PyUnicode_AsEncodedString(py_computername, "utf-8", "ignore");
   41233           0 :                         if (unicode == NULL) {
   41234           0 :                                 PyErr_NoMemory();
   41235           0 :                                 return false;
   41236             :                         }
   41237           0 :                         test_str = PyBytes_AS_STRING(unicode);
   41238           0 :                 } else if (PyBytes_Check(py_computername)) {
   41239           0 :                         test_str = PyBytes_AS_STRING(py_computername);
   41240             :                 } else {
   41241           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computername)->tp_name);
   41242           0 :                         return false;
   41243             :                 }
   41244           0 :                 talloc_str = talloc_strdup(r, test_str);
   41245           0 :                 if (unicode != NULL) {
   41246           0 :                         Py_DECREF(unicode);
   41247             :                 }
   41248           0 :                 if (talloc_str == NULL) {
   41249           0 :                         PyErr_NoMemory();
   41250           0 :                         return false;
   41251             :                 }
   41252           0 :                 r->in.computername = talloc_str;
   41253             :         }
   41254           0 :         if (py_credential == NULL) {
   41255           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   41256           0 :                 return false;
   41257             :         }
   41258           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   41259           0 :         if (r->in.credential == NULL) {
   41260           0 :                 PyErr_NoMemory();
   41261           0 :                 return false;
   41262             :         }
   41263           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   41264           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   41265           0 :                 PyErr_NoMemory();
   41266           0 :                 return false;
   41267             :         }
   41268           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   41269           0 :         if (py_return_authenticator == NULL) {
   41270           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.return_authenticator");
   41271           0 :                 return false;
   41272             :         }
   41273           0 :         r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
   41274           0 :         if (r->in.return_authenticator == NULL) {
   41275           0 :                 PyErr_NoMemory();
   41276           0 :                 return false;
   41277             :         }
   41278           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   41279           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   41280           0 :                 PyErr_NoMemory();
   41281           0 :                 return false;
   41282             :         }
   41283           0 :         r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   41284           0 :         if (py_change_log_entry == NULL) {
   41285           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.change_log_entry");
   41286           0 :                 return false;
   41287             :         }
   41288           0 :         PY_CHECK_TYPE(&netr_ChangeLogEntry_Type, py_change_log_entry, return false;);
   41289           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_change_log_entry)) == NULL) {
   41290           0 :                 PyErr_NoMemory();
   41291           0 :                 return false;
   41292             :         }
   41293           0 :         r->in.change_log_entry = *(struct netr_ChangeLogEntry *)pytalloc_get_ptr(py_change_log_entry);
   41294           0 :         if (py_change_log_entry_size == NULL) {
   41295           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.change_log_entry_size");
   41296           0 :                 return false;
   41297             :         }
   41298             :         {
   41299           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.change_log_entry_size));
   41300           0 :                 if (PyLong_Check(py_change_log_entry_size)) {
   41301             :                         unsigned long long test_var;
   41302           0 :                         test_var = PyLong_AsUnsignedLongLong(py_change_log_entry_size);
   41303           0 :                         if (PyErr_Occurred() != NULL) {
   41304           0 :                                 return false;
   41305             :                         }
   41306           0 :                         if (test_var > uint_max) {
   41307           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   41308             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41309           0 :                                 return false;
   41310             :                         }
   41311           0 :                         r->in.change_log_entry_size = test_var;
   41312             :                 } else {
   41313           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   41314             :                           PyLong_Type.tp_name);
   41315           0 :                         return false;
   41316             :                 }
   41317             :         }
   41318           0 :         return true;
   41319             : }
   41320             : 
   41321           0 : static PyObject *unpack_py_netr_DatabaseRedo_args_out(struct netr_DatabaseRedo *r)
   41322             : {
   41323             :         PyObject *result;
   41324             :         PyObject *py_return_authenticator;
   41325             :         PyObject *py_delta_enum_array;
   41326           0 :         result = PyTuple_New(2);
   41327           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   41328           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   41329           0 :         if (*r->out.delta_enum_array == NULL) {
   41330           0 :                 py_delta_enum_array = Py_None;
   41331           0 :                 Py_INCREF(py_delta_enum_array);
   41332             :         } else {
   41333           0 :                 py_delta_enum_array = pytalloc_reference_ex(&netr_DELTA_ENUM_ARRAY_Type, *r->out.delta_enum_array, *r->out.delta_enum_array);
   41334             :         }
   41335           0 :         PyTuple_SetItem(result, 1, py_delta_enum_array);
   41336           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   41337           0 :                 PyErr_SetNTSTATUS(r->out.result);
   41338           0 :                 return NULL;
   41339             :         }
   41340             : 
   41341           0 :         return result;
   41342             : }
   41343             : 
   41344             : 
   41345           0 : static PyObject *py_netr_LogonControl2Ex_in_get_logon_server(PyObject *obj, void *closure)
   41346             : {
   41347           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(obj);
   41348             :         PyObject *py_logon_server;
   41349           0 :         if (object->in.logon_server == NULL) {
   41350           0 :                 Py_RETURN_NONE;
   41351             :         }
   41352           0 :         if (object->in.logon_server == NULL) {
   41353           0 :                 py_logon_server = Py_None;
   41354           0 :                 Py_INCREF(py_logon_server);
   41355             :         } else {
   41356           0 :                 if (object->in.logon_server == NULL) {
   41357           0 :                         py_logon_server = Py_None;
   41358           0 :                         Py_INCREF(py_logon_server);
   41359             :                 } else {
   41360           0 :                         py_logon_server = PyUnicode_Decode(object->in.logon_server, strlen(object->in.logon_server), "utf-8", "ignore");
   41361             :                 }
   41362             :         }
   41363           0 :         return py_logon_server;
   41364             : }
   41365             : 
   41366           0 : static int py_netr_LogonControl2Ex_in_set_logon_server(PyObject *py_obj, PyObject *value, void *closure)
   41367             : {
   41368           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(py_obj);
   41369           0 :         if (value == NULL) {
   41370           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_server");
   41371           0 :                 return -1;
   41372             :         }
   41373           0 :         if (value == Py_None) {
   41374           0 :                 object->in.logon_server = NULL;
   41375             :         } else {
   41376           0 :                 object->in.logon_server = NULL;
   41377             :                 {
   41378             :                         const char *test_str;
   41379             :                         const char *talloc_str;
   41380           0 :                         PyObject *unicode = NULL;
   41381           0 :                         if (PyUnicode_Check(value)) {
   41382           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   41383           0 :                                 if (unicode == NULL) {
   41384           0 :                                         PyErr_NoMemory();
   41385           0 :                                         return -1;
   41386             :                                 }
   41387           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   41388           0 :                         } else if (PyBytes_Check(value)) {
   41389           0 :                                 test_str = PyBytes_AS_STRING(value);
   41390             :                         } else {
   41391           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   41392           0 :                                 return -1;
   41393             :                         }
   41394           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   41395           0 :                         if (unicode != NULL) {
   41396           0 :                                 Py_DECREF(unicode);
   41397             :                         }
   41398           0 :                         if (talloc_str == NULL) {
   41399           0 :                                 PyErr_NoMemory();
   41400           0 :                                 return -1;
   41401             :                         }
   41402           0 :                         object->in.logon_server = talloc_str;
   41403             :                 }
   41404             :         }
   41405           0 :         return 0;
   41406             : }
   41407             : 
   41408           0 : static PyObject *py_netr_LogonControl2Ex_in_get_function_code(PyObject *obj, void *closure)
   41409             : {
   41410           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(obj);
   41411             :         PyObject *py_function_code;
   41412           0 :         py_function_code = PyLong_FromUnsignedLongLong((uint32_t)object->in.function_code);
   41413           0 :         return py_function_code;
   41414             : }
   41415             : 
   41416           0 : static int py_netr_LogonControl2Ex_in_set_function_code(PyObject *py_obj, PyObject *value, void *closure)
   41417             : {
   41418           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(py_obj);
   41419           0 :         if (value == NULL) {
   41420           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.function_code");
   41421           0 :                 return -1;
   41422             :         }
   41423             :         {
   41424           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.function_code));
   41425           0 :                 if (PyLong_Check(value)) {
   41426             :                         unsigned long long test_var;
   41427           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   41428           0 :                         if (PyErr_Occurred() != NULL) {
   41429           0 :                                 return -1;
   41430             :                         }
   41431           0 :                         if (test_var > uint_max) {
   41432           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   41433             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41434           0 :                                 return -1;
   41435             :                         }
   41436           0 :                         object->in.function_code = test_var;
   41437             :                 } else {
   41438           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   41439             :                           PyLong_Type.tp_name);
   41440           0 :                         return -1;
   41441             :                 }
   41442             :         }
   41443           0 :         return 0;
   41444             : }
   41445             : 
   41446           0 : static PyObject *py_netr_LogonControl2Ex_in_get_level(PyObject *obj, void *closure)
   41447             : {
   41448           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(obj);
   41449             :         PyObject *py_level;
   41450           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   41451           0 :         return py_level;
   41452             : }
   41453             : 
   41454           0 : static int py_netr_LogonControl2Ex_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   41455             : {
   41456           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(py_obj);
   41457           0 :         if (value == NULL) {
   41458           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   41459           0 :                 return -1;
   41460             :         }
   41461             :         {
   41462           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   41463           0 :                 if (PyLong_Check(value)) {
   41464             :                         unsigned long long test_var;
   41465           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   41466           0 :                         if (PyErr_Occurred() != NULL) {
   41467           0 :                                 return -1;
   41468             :                         }
   41469           0 :                         if (test_var > uint_max) {
   41470           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   41471             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41472           0 :                                 return -1;
   41473             :                         }
   41474           0 :                         object->in.level = test_var;
   41475             :                 } else {
   41476           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   41477             :                           PyLong_Type.tp_name);
   41478           0 :                         return -1;
   41479             :                 }
   41480             :         }
   41481           0 :         return 0;
   41482             : }
   41483             : 
   41484           0 : static PyObject *py_netr_LogonControl2Ex_in_get_data(PyObject *obj, void *closure)
   41485             : {
   41486           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(obj);
   41487             :         PyObject *py_data;
   41488           0 :         if (object->in.data == NULL) {
   41489           0 :                 Py_RETURN_NONE;
   41490             :         }
   41491           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");
   41492           0 :         if (py_data == NULL) {
   41493           0 :                 return NULL;
   41494             :         }
   41495           0 :         return py_data;
   41496             : }
   41497             : 
   41498           0 : static int py_netr_LogonControl2Ex_in_set_data(PyObject *py_obj, PyObject *value, void *closure)
   41499             : {
   41500           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(py_obj);
   41501           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.data));
   41502           0 :         if (value == NULL) {
   41503           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.data");
   41504           0 :                 return -1;
   41505             :         }
   41506           0 :         object->in.data = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.data);
   41507           0 :         if (object->in.data == NULL) {
   41508           0 :                 PyErr_NoMemory();
   41509           0 :                 return -1;
   41510             :         }
   41511             :         {
   41512             :                 union netr_CONTROL_DATA_INFORMATION *data_switch_1;
   41513           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");
   41514           0 :                 if (data_switch_1 == NULL) {
   41515           0 :                         return -1;
   41516             :                 }
   41517           0 :                 object->in.data = data_switch_1;
   41518             :         }
   41519           0 :         return 0;
   41520             : }
   41521             : 
   41522           0 : static PyObject *py_netr_LogonControl2Ex_out_get_query(PyObject *obj, void *closure)
   41523             : {
   41524           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(obj);
   41525             :         PyObject *py_query;
   41526           0 :         if (object->out.query == NULL) {
   41527           0 :                 Py_RETURN_NONE;
   41528             :         }
   41529           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");
   41530           0 :         if (py_query == NULL) {
   41531           0 :                 return NULL;
   41532             :         }
   41533           0 :         return py_query;
   41534             : }
   41535             : 
   41536           0 : static int py_netr_LogonControl2Ex_out_set_query(PyObject *py_obj, PyObject *value, void *closure)
   41537             : {
   41538           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(py_obj);
   41539           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.query));
   41540           0 :         if (value == NULL) {
   41541           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.query");
   41542           0 :                 return -1;
   41543             :         }
   41544           0 :         object->out.query = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.query);
   41545           0 :         if (object->out.query == NULL) {
   41546           0 :                 PyErr_NoMemory();
   41547           0 :                 return -1;
   41548             :         }
   41549             :         {
   41550             :                 union netr_CONTROL_QUERY_INFORMATION *query_switch_1;
   41551           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");
   41552           0 :                 if (query_switch_1 == NULL) {
   41553           0 :                         return -1;
   41554             :                 }
   41555           0 :                 object->out.query = query_switch_1;
   41556             :         }
   41557           0 :         return 0;
   41558             : }
   41559             : 
   41560           0 : static PyObject *py_netr_LogonControl2Ex_get_result(PyObject *obj, void *closure)
   41561             : {
   41562           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(obj);
   41563             :         PyObject *py_result;
   41564           0 :         py_result = PyErr_FromWERROR(object->out.result);
   41565           0 :         return py_result;
   41566             : }
   41567             : 
   41568           0 : static int py_netr_LogonControl2Ex_set_result(PyObject *py_obj, PyObject *value, void *closure)
   41569             : {
   41570           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(py_obj);
   41571           0 :         if (value == NULL) {
   41572           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   41573           0 :                 return -1;
   41574             :         }
   41575           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   41576           0 :         return 0;
   41577             : }
   41578             : 
   41579             : static PyGetSetDef py_netr_LogonControl2Ex_getsetters[] = {
   41580             :         {
   41581             :                 .name = discard_const_p(char, "in_logon_server"),
   41582             :                 .get = py_netr_LogonControl2Ex_in_get_logon_server,
   41583             :                 .set = py_netr_LogonControl2Ex_in_set_logon_server,
   41584             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   41585             :         },
   41586             :         {
   41587             :                 .name = discard_const_p(char, "in_function_code"),
   41588             :                 .get = py_netr_LogonControl2Ex_in_get_function_code,
   41589             :                 .set = py_netr_LogonControl2Ex_in_set_function_code,
   41590             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonControlCode")
   41591             :         },
   41592             :         {
   41593             :                 .name = discard_const_p(char, "in_level"),
   41594             :                 .get = py_netr_LogonControl2Ex_in_get_level,
   41595             :                 .set = py_netr_LogonControl2Ex_in_set_level,
   41596             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   41597             :         },
   41598             :         {
   41599             :                 .name = discard_const_p(char, "in_data"),
   41600             :                 .get = py_netr_LogonControl2Ex_in_get_data,
   41601             :                 .set = py_netr_LogonControl2Ex_in_set_data,
   41602             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CONTROL_DATA_INFORMATION")
   41603             :         },
   41604             :         {
   41605             :                 .name = discard_const_p(char, "out_query"),
   41606             :                 .get = py_netr_LogonControl2Ex_out_get_query,
   41607             :                 .set = py_netr_LogonControl2Ex_out_set_query,
   41608             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CONTROL_QUERY_INFORMATION")
   41609             :         },
   41610             :         {
   41611             :                 .name = discard_const_p(char, "result"),
   41612             :                 .get = py_netr_LogonControl2Ex_get_result,
   41613             :                 .set = py_netr_LogonControl2Ex_set_result,
   41614             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   41615             :         },
   41616             :         { .name = NULL }
   41617             : };
   41618             : 
   41619           0 : static PyObject *py_netr_LogonControl2Ex_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   41620             : {
   41621           0 :         PyObject *self = pytalloc_new(struct netr_LogonControl2Ex, type);
   41622           0 :         struct netr_LogonControl2Ex *_self = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(self);
   41623           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   41624           0 :         _self->in.data = talloc_zero(mem_ctx, union netr_CONTROL_DATA_INFORMATION);
   41625           0 :         _self->out.query = talloc_zero(mem_ctx, union netr_CONTROL_QUERY_INFORMATION);
   41626           0 :         return self;
   41627             : }
   41628             : 
   41629           0 : static PyObject *py_netr_LogonControl2Ex_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   41630             : {
   41631             : 
   41632             : 
   41633           0 :         return PyLong_FromLong(18);
   41634             : }
   41635             : 
   41636           0 : static PyObject *py_netr_LogonControl2Ex_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   41637             : {
   41638           0 :         const struct ndr_interface_call *call = NULL;
   41639           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(py_obj);
   41640           0 :         PyObject *ret = NULL;
   41641           0 :         struct ndr_push *push = NULL;
   41642             :         DATA_BLOB blob;
   41643             :         enum ndr_err_code err;
   41644             : 
   41645           0 :         if (ndr_table_netlogon.num_calls < 19) {
   41646           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl2Ex_ndr_pack");
   41647           0 :                 return NULL;
   41648             :         }
   41649           0 :         call = &ndr_table_netlogon.calls[18];
   41650             : 
   41651           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   41652           0 :         if (push == NULL) {
   41653           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   41654           0 :                 return NULL;
   41655             :         }
   41656             : 
   41657           0 :         push->flags |= ndr_push_flags;
   41658             : 
   41659           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   41660           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   41661           0 :                 TALLOC_FREE(push);
   41662           0 :                 PyErr_SetNdrError(err);
   41663           0 :                 return NULL;
   41664             :         }
   41665           0 :         blob = ndr_push_blob(push);
   41666           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   41667           0 :         TALLOC_FREE(push);
   41668           0 :         return ret;
   41669             : }
   41670             : 
   41671           0 : static PyObject *py_netr_LogonControl2Ex_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41672             : {
   41673           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   41674           0 :         PyObject *bigendian_obj = NULL;
   41675           0 :         PyObject *ndr64_obj = NULL;
   41676           0 :         uint32_t ndr_push_flags = 0;
   41677             : 
   41678           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   41679             :                 discard_const_p(char *, kwnames),
   41680             :                 &bigendian_obj,
   41681             :                 &ndr64_obj)) {
   41682           0 :                 return NULL;
   41683             :         }
   41684             : 
   41685           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41686           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   41687             :         }
   41688           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41689           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   41690             :         }
   41691             : 
   41692           0 :         return py_netr_LogonControl2Ex_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   41693             : }
   41694             : 
   41695           0 : static PyObject *py_netr_LogonControl2Ex_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41696             : {
   41697           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   41698           0 :         PyObject *bigendian_obj = NULL;
   41699           0 :         PyObject *ndr64_obj = NULL;
   41700           0 :         uint32_t ndr_push_flags = 0;
   41701             : 
   41702           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   41703             :                 discard_const_p(char *, kwnames),
   41704             :                 &bigendian_obj,
   41705             :                 &ndr64_obj)) {
   41706           0 :                 return NULL;
   41707             :         }
   41708             : 
   41709           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41710           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   41711             :         }
   41712           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41713           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   41714             :         }
   41715             : 
   41716           0 :         return py_netr_LogonControl2Ex_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   41717             : }
   41718             : 
   41719           0 : static PyObject *py_netr_LogonControl2Ex_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   41720             : {
   41721           0 :         const struct ndr_interface_call *call = NULL;
   41722           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(py_obj);
   41723           0 :         struct ndr_pull *pull = NULL;
   41724             :         enum ndr_err_code err;
   41725             : 
   41726           0 :         if (ndr_table_netlogon.num_calls < 19) {
   41727           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl2Ex_ndr_unpack");
   41728           0 :                 return NULL;
   41729             :         }
   41730           0 :         call = &ndr_table_netlogon.calls[18];
   41731             : 
   41732           0 :         pull = ndr_pull_init_blob(blob, object);
   41733           0 :         if (pull == NULL) {
   41734           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   41735           0 :                 return NULL;
   41736             :         }
   41737             : 
   41738           0 :         pull->flags |= ndr_pull_flags;
   41739             : 
   41740           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   41741           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   41742           0 :                 TALLOC_FREE(pull);
   41743           0 :                 PyErr_SetNdrError(err);
   41744           0 :                 return NULL;
   41745             :         }
   41746           0 :         if (!allow_remaining) {
   41747             :                 uint32_t highest_ofs;
   41748             : 
   41749           0 :                 if (pull->offset > pull->relative_highest_offset) {
   41750           0 :                         highest_ofs = pull->offset;
   41751             :                 } else {
   41752           0 :                         highest_ofs = pull->relative_highest_offset;
   41753             :                 }
   41754           0 :                 if (highest_ofs < pull->data_size) {
   41755           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   41756             :                                 "not all bytes consumed ofs[%u] size[%u]",
   41757             :                                 highest_ofs, pull->data_size);
   41758           0 :                         TALLOC_FREE(pull);
   41759           0 :                         PyErr_SetNdrError(err);
   41760           0 :                         return NULL;
   41761             :                 }
   41762             :         }
   41763             : 
   41764           0 :         TALLOC_FREE(pull);
   41765           0 :         Py_RETURN_NONE;
   41766             : }
   41767             : 
   41768           0 : static PyObject *py_netr_LogonControl2Ex_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41769             : {
   41770             :         DATA_BLOB blob;
   41771           0 :         Py_ssize_t blob_length = 0;
   41772           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   41773           0 :         PyObject *bigendian_obj = NULL;
   41774           0 :         PyObject *ndr64_obj = NULL;
   41775           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   41776           0 :         PyObject *allow_remaining_obj = NULL;
   41777           0 :         bool allow_remaining = false;
   41778             : 
   41779           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   41780             :                 discard_const_p(char *, kwnames),
   41781             :                 &blob.data, &blob_length,
   41782             :                 &bigendian_obj,
   41783             :                 &ndr64_obj,
   41784             :                 &allow_remaining_obj)) {
   41785           0 :                 return NULL;
   41786             :         }
   41787           0 :         blob.length = blob_length;
   41788             : 
   41789           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41790           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   41791             :         }
   41792           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41793           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   41794             :         }
   41795             : 
   41796           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   41797           0 :                 allow_remaining = true;
   41798             :         }
   41799             : 
   41800           0 :         return py_netr_LogonControl2Ex_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   41801             : }
   41802             : 
   41803           0 : static PyObject *py_netr_LogonControl2Ex_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41804             : {
   41805             :         DATA_BLOB blob;
   41806           0 :         Py_ssize_t blob_length = 0;
   41807           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   41808           0 :         PyObject *bigendian_obj = NULL;
   41809           0 :         PyObject *ndr64_obj = NULL;
   41810           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   41811           0 :         PyObject *allow_remaining_obj = NULL;
   41812           0 :         bool allow_remaining = false;
   41813             : 
   41814           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   41815             :                 discard_const_p(char *, kwnames),
   41816             :                 &blob.data, &blob_length,
   41817             :                 &bigendian_obj,
   41818             :                 &ndr64_obj,
   41819             :                 &allow_remaining_obj)) {
   41820           0 :                 return NULL;
   41821             :         }
   41822           0 :         blob.length = blob_length;
   41823             : 
   41824           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41825           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   41826             :         }
   41827           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41828           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   41829             :         }
   41830             : 
   41831           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   41832           0 :                 allow_remaining = true;
   41833             :         }
   41834             : 
   41835           0 :         return py_netr_LogonControl2Ex_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   41836             : }
   41837             : 
   41838           0 : static PyObject *py_netr_LogonControl2Ex_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   41839             : {
   41840           0 :         const struct ndr_interface_call *call = NULL;
   41841           0 :         struct netr_LogonControl2Ex *object = (struct netr_LogonControl2Ex *)pytalloc_get_ptr(py_obj);
   41842             :         PyObject *ret;
   41843             :         char *retstr;
   41844             : 
   41845           0 :         if (ndr_table_netlogon.num_calls < 19) {
   41846           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonControl2Ex_ndr_print");
   41847           0 :                 return NULL;
   41848             :         }
   41849           0 :         call = &ndr_table_netlogon.calls[18];
   41850             : 
   41851           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   41852           0 :         ret = PyUnicode_FromString(retstr);
   41853           0 :         TALLOC_FREE(retstr);
   41854             : 
   41855           0 :         return ret;
   41856             : }
   41857             : 
   41858           0 : static PyObject *py_netr_LogonControl2Ex_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   41859             : {
   41860           0 :         return py_netr_LogonControl2Ex_ndr_print(py_obj, "netr_LogonControl2Ex_in", NDR_IN);
   41861             : }
   41862             : 
   41863           0 : static PyObject *py_netr_LogonControl2Ex_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   41864             : {
   41865           0 :         return py_netr_LogonControl2Ex_ndr_print(py_obj, "netr_LogonControl2Ex_out", NDR_OUT);
   41866             : }
   41867             : 
   41868             : static PyMethodDef py_netr_LogonControl2Ex_methods[] = {
   41869             :         { "opnum", (PyCFunction)py_netr_LogonControl2Ex_ndr_opnum, METH_NOARGS|METH_CLASS,
   41870             :                 "netlogon.netr_LogonControl2Ex.opnum() -> 18 (0x12) " },
   41871             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2Ex_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   41872             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   41873             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2Ex_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   41874             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   41875             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2Ex_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   41876             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   41877             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonControl2Ex_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   41878             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   41879             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonControl2Ex_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   41880             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonControl2Ex_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   41881             :         { NULL, NULL, 0, NULL }
   41882             : };
   41883             : 
   41884             : 
   41885             : static PyTypeObject netr_LogonControl2Ex_Type = {
   41886             :         PyVarObject_HEAD_INIT(NULL, 0)
   41887             :         .tp_name = "netlogon.netr_LogonControl2Ex",
   41888             :         .tp_getset = py_netr_LogonControl2Ex_getsetters,
   41889             :         .tp_methods = py_netr_LogonControl2Ex_methods,
   41890             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   41891             :         .tp_new = py_netr_LogonControl2Ex_new,
   41892             : };
   41893             : 
   41894          81 : static bool pack_py_netr_LogonControl2Ex_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonControl2Ex *r)
   41895             : {
   41896             :         PyObject *py_logon_server;
   41897             :         PyObject *py_function_code;
   41898             :         PyObject *py_level;
   41899             :         PyObject *py_data;
   41900          81 :         const char *kwnames[] = {
   41901             :                 "logon_server", "function_code", "level", "data", NULL
   41902             :         };
   41903             : 
   41904          81 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:netr_LogonControl2Ex", discard_const_p(char *, kwnames), &py_logon_server, &py_function_code, &py_level, &py_data)) {
   41905           0 :                 return false;
   41906             :         }
   41907             : 
   41908          81 :         if (py_logon_server == NULL) {
   41909           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_server");
   41910           0 :                 return false;
   41911             :         }
   41912          81 :         if (py_logon_server == Py_None) {
   41913           0 :                 r->in.logon_server = NULL;
   41914             :         } else {
   41915          81 :                 r->in.logon_server = NULL;
   41916             :                 {
   41917             :                         const char *test_str;
   41918             :                         const char *talloc_str;
   41919          81 :                         PyObject *unicode = NULL;
   41920          81 :                         if (PyUnicode_Check(py_logon_server)) {
   41921          81 :                                 unicode = PyUnicode_AsEncodedString(py_logon_server, "utf-8", "ignore");
   41922          81 :                                 if (unicode == NULL) {
   41923           0 :                                         PyErr_NoMemory();
   41924           0 :                                         return false;
   41925             :                                 }
   41926          81 :                                 test_str = PyBytes_AS_STRING(unicode);
   41927           0 :                         } else if (PyBytes_Check(py_logon_server)) {
   41928           0 :                                 test_str = PyBytes_AS_STRING(py_logon_server);
   41929             :                         } else {
   41930           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_logon_server)->tp_name);
   41931           0 :                                 return false;
   41932             :                         }
   41933          81 :                         talloc_str = talloc_strdup(r, test_str);
   41934          81 :                         if (unicode != NULL) {
   41935          81 :                                 Py_DECREF(unicode);
   41936             :                         }
   41937          81 :                         if (talloc_str == NULL) {
   41938           0 :                                 PyErr_NoMemory();
   41939           0 :                                 return false;
   41940             :                         }
   41941          81 :                         r->in.logon_server = talloc_str;
   41942             :                 }
   41943             :         }
   41944          81 :         if (py_function_code == NULL) {
   41945           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.function_code");
   41946           0 :                 return false;
   41947             :         }
   41948             :         {
   41949          81 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.function_code));
   41950          81 :                 if (PyLong_Check(py_function_code)) {
   41951             :                         unsigned long long test_var;
   41952          81 :                         test_var = PyLong_AsUnsignedLongLong(py_function_code);
   41953          81 :                         if (PyErr_Occurred() != NULL) {
   41954           0 :                                 return false;
   41955             :                         }
   41956          81 :                         if (test_var > uint_max) {
   41957           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   41958             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41959           0 :                                 return false;
   41960             :                         }
   41961          81 :                         r->in.function_code = test_var;
   41962             :                 } else {
   41963           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   41964             :                           PyLong_Type.tp_name);
   41965           0 :                         return false;
   41966             :                 }
   41967             :         }
   41968          81 :         if (py_level == NULL) {
   41969           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   41970           0 :                 return false;
   41971             :         }
   41972             :         {
   41973          81 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   41974          81 :                 if (PyLong_Check(py_level)) {
   41975             :                         unsigned long long test_var;
   41976          81 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   41977          81 :                         if (PyErr_Occurred() != NULL) {
   41978           0 :                                 return false;
   41979             :                         }
   41980          81 :                         if (test_var > uint_max) {
   41981           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   41982             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41983           0 :                                 return false;
   41984             :                         }
   41985          81 :                         r->in.level = test_var;
   41986             :                 } else {
   41987           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   41988             :                           PyLong_Type.tp_name);
   41989           0 :                         return false;
   41990             :                 }
   41991             :         }
   41992          81 :         if (py_data == NULL) {
   41993           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.data");
   41994           0 :                 return false;
   41995             :         }
   41996          81 :         r->in.data = talloc_ptrtype(r, r->in.data);
   41997          81 :         if (r->in.data == NULL) {
   41998           0 :                 PyErr_NoMemory();
   41999           0 :                 return false;
   42000             :         }
   42001             :         {
   42002             :                 union netr_CONTROL_DATA_INFORMATION *data_switch_1;
   42003          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");
   42004          81 :                 if (data_switch_1 == NULL) {
   42005           0 :                         return false;
   42006             :                 }
   42007          81 :                 r->in.data = data_switch_1;
   42008             :         }
   42009          81 :         return true;
   42010             : }
   42011             : 
   42012          81 : static PyObject *unpack_py_netr_LogonControl2Ex_args_out(struct netr_LogonControl2Ex *r)
   42013             : {
   42014             :         PyObject *result;
   42015             :         PyObject *py_query;
   42016          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");
   42017          81 :         if (py_query == NULL) {
   42018           0 :                 return NULL;
   42019             :         }
   42020          81 :         result = py_query;
   42021          81 :         if (!W_ERROR_IS_OK(r->out.result)) {
   42022           0 :                 PyErr_SetWERROR(r->out.result);
   42023           0 :                 return NULL;
   42024             :         }
   42025             : 
   42026          81 :         return result;
   42027             : }
   42028             : 
   42029             : 
   42030           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_in_get_server_name(PyObject *obj, void *closure)
   42031             : {
   42032           0 :         struct netr_NetrEnumerateTrustedDomains *object = (struct netr_NetrEnumerateTrustedDomains *)pytalloc_get_ptr(obj);
   42033             :         PyObject *py_server_name;
   42034           0 :         if (object->in.server_name == NULL) {
   42035           0 :                 Py_RETURN_NONE;
   42036             :         }
   42037           0 :         if (object->in.server_name == NULL) {
   42038           0 :                 py_server_name = Py_None;
   42039           0 :                 Py_INCREF(py_server_name);
   42040             :         } else {
   42041           0 :                 if (object->in.server_name == NULL) {
   42042           0 :                         py_server_name = Py_None;
   42043           0 :                         Py_INCREF(py_server_name);
   42044             :                 } else {
   42045           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   42046             :                 }
   42047             :         }
   42048           0 :         return py_server_name;
   42049             : }
   42050             : 
   42051           0 : static int py_netr_NetrEnumerateTrustedDomains_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   42052             : {
   42053           0 :         struct netr_NetrEnumerateTrustedDomains *object = (struct netr_NetrEnumerateTrustedDomains *)pytalloc_get_ptr(py_obj);
   42054           0 :         if (value == NULL) {
   42055           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   42056           0 :                 return -1;
   42057             :         }
   42058           0 :         if (value == Py_None) {
   42059           0 :                 object->in.server_name = NULL;
   42060             :         } else {
   42061           0 :                 object->in.server_name = NULL;
   42062             :                 {
   42063             :                         const char *test_str;
   42064             :                         const char *talloc_str;
   42065           0 :                         PyObject *unicode = NULL;
   42066           0 :                         if (PyUnicode_Check(value)) {
   42067           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   42068           0 :                                 if (unicode == NULL) {
   42069           0 :                                         PyErr_NoMemory();
   42070           0 :                                         return -1;
   42071             :                                 }
   42072           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   42073           0 :                         } else if (PyBytes_Check(value)) {
   42074           0 :                                 test_str = PyBytes_AS_STRING(value);
   42075             :                         } else {
   42076           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   42077           0 :                                 return -1;
   42078             :                         }
   42079           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   42080           0 :                         if (unicode != NULL) {
   42081           0 :                                 Py_DECREF(unicode);
   42082             :                         }
   42083           0 :                         if (talloc_str == NULL) {
   42084           0 :                                 PyErr_NoMemory();
   42085           0 :                                 return -1;
   42086             :                         }
   42087           0 :                         object->in.server_name = talloc_str;
   42088             :                 }
   42089             :         }
   42090           0 :         return 0;
   42091             : }
   42092             : 
   42093           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_out_get_trusted_domains_blob(PyObject *obj, void *closure)
   42094             : {
   42095           0 :         struct netr_NetrEnumerateTrustedDomains *object = (struct netr_NetrEnumerateTrustedDomains *)pytalloc_get_ptr(obj);
   42096             :         PyObject *py_trusted_domains_blob;
   42097           0 :         if (object->out.trusted_domains_blob == NULL) {
   42098           0 :                 Py_RETURN_NONE;
   42099             :         }
   42100           0 :         py_trusted_domains_blob = pytalloc_reference_ex(&netr_Blob_Type, object->out.trusted_domains_blob, object->out.trusted_domains_blob);
   42101           0 :         return py_trusted_domains_blob;
   42102             : }
   42103             : 
   42104           0 : static int py_netr_NetrEnumerateTrustedDomains_out_set_trusted_domains_blob(PyObject *py_obj, PyObject *value, void *closure)
   42105             : {
   42106           0 :         struct netr_NetrEnumerateTrustedDomains *object = (struct netr_NetrEnumerateTrustedDomains *)pytalloc_get_ptr(py_obj);
   42107           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.trusted_domains_blob));
   42108           0 :         if (value == NULL) {
   42109           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.trusted_domains_blob");
   42110           0 :                 return -1;
   42111             :         }
   42112           0 :         object->out.trusted_domains_blob = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.trusted_domains_blob);
   42113           0 :         if (object->out.trusted_domains_blob == NULL) {
   42114           0 :                 PyErr_NoMemory();
   42115           0 :                 return -1;
   42116             :         }
   42117           0 :         PY_CHECK_TYPE(&netr_Blob_Type, value, return -1;);
   42118           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   42119           0 :                 PyErr_NoMemory();
   42120           0 :                 return -1;
   42121             :         }
   42122           0 :         object->out.trusted_domains_blob = (struct netr_Blob *)pytalloc_get_ptr(value);
   42123           0 :         return 0;
   42124             : }
   42125             : 
   42126           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_get_result(PyObject *obj, void *closure)
   42127             : {
   42128           0 :         struct netr_NetrEnumerateTrustedDomains *object = (struct netr_NetrEnumerateTrustedDomains *)pytalloc_get_ptr(obj);
   42129             :         PyObject *py_result;
   42130           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   42131           0 :         return py_result;
   42132             : }
   42133             : 
   42134           0 : static int py_netr_NetrEnumerateTrustedDomains_set_result(PyObject *py_obj, PyObject *value, void *closure)
   42135             : {
   42136           0 :         struct netr_NetrEnumerateTrustedDomains *object = (struct netr_NetrEnumerateTrustedDomains *)pytalloc_get_ptr(py_obj);
   42137           0 :         if (value == NULL) {
   42138           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   42139           0 :                 return -1;
   42140             :         }
   42141           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   42142           0 :         return 0;
   42143             : }
   42144             : 
   42145             : static PyGetSetDef py_netr_NetrEnumerateTrustedDomains_getsetters[] = {
   42146             :         {
   42147             :                 .name = discard_const_p(char, "in_server_name"),
   42148             :                 .get = py_netr_NetrEnumerateTrustedDomains_in_get_server_name,
   42149             :                 .set = py_netr_NetrEnumerateTrustedDomains_in_set_server_name,
   42150             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   42151             :         },
   42152             :         {
   42153             :                 .name = discard_const_p(char, "out_trusted_domains_blob"),
   42154             :                 .get = py_netr_NetrEnumerateTrustedDomains_out_get_trusted_domains_blob,
   42155             :                 .set = py_netr_NetrEnumerateTrustedDomains_out_set_trusted_domains_blob,
   42156             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Blob")
   42157             :         },
   42158             :         {
   42159             :                 .name = discard_const_p(char, "result"),
   42160             :                 .get = py_netr_NetrEnumerateTrustedDomains_get_result,
   42161             :                 .set = py_netr_NetrEnumerateTrustedDomains_set_result,
   42162             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   42163             :         },
   42164             :         { .name = NULL }
   42165             : };
   42166             : 
   42167           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   42168             : {
   42169           0 :         PyObject *self = pytalloc_new(struct netr_NetrEnumerateTrustedDomains, type);
   42170           0 :         struct netr_NetrEnumerateTrustedDomains *_self = (struct netr_NetrEnumerateTrustedDomains *)pytalloc_get_ptr(self);
   42171           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   42172           0 :         _self->out.trusted_domains_blob = talloc_zero(mem_ctx, struct netr_Blob);
   42173           0 :         return self;
   42174             : }
   42175             : 
   42176           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   42177             : {
   42178             : 
   42179             : 
   42180           0 :         return PyLong_FromLong(19);
   42181             : }
   42182             : 
   42183           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   42184             : {
   42185           0 :         const struct ndr_interface_call *call = NULL;
   42186           0 :         struct netr_NetrEnumerateTrustedDomains *object = (struct netr_NetrEnumerateTrustedDomains *)pytalloc_get_ptr(py_obj);
   42187           0 :         PyObject *ret = NULL;
   42188           0 :         struct ndr_push *push = NULL;
   42189             :         DATA_BLOB blob;
   42190             :         enum ndr_err_code err;
   42191             : 
   42192           0 :         if (ndr_table_netlogon.num_calls < 20) {
   42193           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrEnumerateTrustedDomains_ndr_pack");
   42194           0 :                 return NULL;
   42195             :         }
   42196           0 :         call = &ndr_table_netlogon.calls[19];
   42197             : 
   42198           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   42199           0 :         if (push == NULL) {
   42200           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   42201           0 :                 return NULL;
   42202             :         }
   42203             : 
   42204           0 :         push->flags |= ndr_push_flags;
   42205             : 
   42206           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   42207           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   42208           0 :                 TALLOC_FREE(push);
   42209           0 :                 PyErr_SetNdrError(err);
   42210           0 :                 return NULL;
   42211             :         }
   42212           0 :         blob = ndr_push_blob(push);
   42213           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   42214           0 :         TALLOC_FREE(push);
   42215           0 :         return ret;
   42216             : }
   42217             : 
   42218           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42219             : {
   42220           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   42221           0 :         PyObject *bigendian_obj = NULL;
   42222           0 :         PyObject *ndr64_obj = NULL;
   42223           0 :         uint32_t ndr_push_flags = 0;
   42224             : 
   42225           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   42226             :                 discard_const_p(char *, kwnames),
   42227             :                 &bigendian_obj,
   42228             :                 &ndr64_obj)) {
   42229           0 :                 return NULL;
   42230             :         }
   42231             : 
   42232           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42233           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   42234             :         }
   42235           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42236           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   42237             :         }
   42238             : 
   42239           0 :         return py_netr_NetrEnumerateTrustedDomains_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   42240             : }
   42241             : 
   42242           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42243             : {
   42244           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   42245           0 :         PyObject *bigendian_obj = NULL;
   42246           0 :         PyObject *ndr64_obj = NULL;
   42247           0 :         uint32_t ndr_push_flags = 0;
   42248             : 
   42249           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   42250             :                 discard_const_p(char *, kwnames),
   42251             :                 &bigendian_obj,
   42252             :                 &ndr64_obj)) {
   42253           0 :                 return NULL;
   42254             :         }
   42255             : 
   42256           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42257           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   42258             :         }
   42259           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42260           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   42261             :         }
   42262             : 
   42263           0 :         return py_netr_NetrEnumerateTrustedDomains_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   42264             : }
   42265             : 
   42266           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   42267             : {
   42268           0 :         const struct ndr_interface_call *call = NULL;
   42269           0 :         struct netr_NetrEnumerateTrustedDomains *object = (struct netr_NetrEnumerateTrustedDomains *)pytalloc_get_ptr(py_obj);
   42270           0 :         struct ndr_pull *pull = NULL;
   42271             :         enum ndr_err_code err;
   42272             : 
   42273           0 :         if (ndr_table_netlogon.num_calls < 20) {
   42274           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrEnumerateTrustedDomains_ndr_unpack");
   42275           0 :                 return NULL;
   42276             :         }
   42277           0 :         call = &ndr_table_netlogon.calls[19];
   42278             : 
   42279           0 :         pull = ndr_pull_init_blob(blob, object);
   42280           0 :         if (pull == NULL) {
   42281           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   42282           0 :                 return NULL;
   42283             :         }
   42284             : 
   42285           0 :         pull->flags |= ndr_pull_flags;
   42286             : 
   42287           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   42288           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   42289           0 :                 TALLOC_FREE(pull);
   42290           0 :                 PyErr_SetNdrError(err);
   42291           0 :                 return NULL;
   42292             :         }
   42293           0 :         if (!allow_remaining) {
   42294             :                 uint32_t highest_ofs;
   42295             : 
   42296           0 :                 if (pull->offset > pull->relative_highest_offset) {
   42297           0 :                         highest_ofs = pull->offset;
   42298             :                 } else {
   42299           0 :                         highest_ofs = pull->relative_highest_offset;
   42300             :                 }
   42301           0 :                 if (highest_ofs < pull->data_size) {
   42302           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   42303             :                                 "not all bytes consumed ofs[%u] size[%u]",
   42304             :                                 highest_ofs, pull->data_size);
   42305           0 :                         TALLOC_FREE(pull);
   42306           0 :                         PyErr_SetNdrError(err);
   42307           0 :                         return NULL;
   42308             :                 }
   42309             :         }
   42310             : 
   42311           0 :         TALLOC_FREE(pull);
   42312           0 :         Py_RETURN_NONE;
   42313             : }
   42314             : 
   42315           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42316             : {
   42317             :         DATA_BLOB blob;
   42318           0 :         Py_ssize_t blob_length = 0;
   42319           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   42320           0 :         PyObject *bigendian_obj = NULL;
   42321           0 :         PyObject *ndr64_obj = NULL;
   42322           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   42323           0 :         PyObject *allow_remaining_obj = NULL;
   42324           0 :         bool allow_remaining = false;
   42325             : 
   42326           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   42327             :                 discard_const_p(char *, kwnames),
   42328             :                 &blob.data, &blob_length,
   42329             :                 &bigendian_obj,
   42330             :                 &ndr64_obj,
   42331             :                 &allow_remaining_obj)) {
   42332           0 :                 return NULL;
   42333             :         }
   42334           0 :         blob.length = blob_length;
   42335             : 
   42336           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42337           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   42338             :         }
   42339           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42340           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   42341             :         }
   42342             : 
   42343           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   42344           0 :                 allow_remaining = true;
   42345             :         }
   42346             : 
   42347           0 :         return py_netr_NetrEnumerateTrustedDomains_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   42348             : }
   42349             : 
   42350           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42351             : {
   42352             :         DATA_BLOB blob;
   42353           0 :         Py_ssize_t blob_length = 0;
   42354           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   42355           0 :         PyObject *bigendian_obj = NULL;
   42356           0 :         PyObject *ndr64_obj = NULL;
   42357           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   42358           0 :         PyObject *allow_remaining_obj = NULL;
   42359           0 :         bool allow_remaining = false;
   42360             : 
   42361           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   42362             :                 discard_const_p(char *, kwnames),
   42363             :                 &blob.data, &blob_length,
   42364             :                 &bigendian_obj,
   42365             :                 &ndr64_obj,
   42366             :                 &allow_remaining_obj)) {
   42367           0 :                 return NULL;
   42368             :         }
   42369           0 :         blob.length = blob_length;
   42370             : 
   42371           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42372           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   42373             :         }
   42374           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42375           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   42376             :         }
   42377             : 
   42378           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   42379           0 :                 allow_remaining = true;
   42380             :         }
   42381             : 
   42382           0 :         return py_netr_NetrEnumerateTrustedDomains_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   42383             : }
   42384             : 
   42385           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   42386             : {
   42387           0 :         const struct ndr_interface_call *call = NULL;
   42388           0 :         struct netr_NetrEnumerateTrustedDomains *object = (struct netr_NetrEnumerateTrustedDomains *)pytalloc_get_ptr(py_obj);
   42389             :         PyObject *ret;
   42390             :         char *retstr;
   42391             : 
   42392           0 :         if (ndr_table_netlogon.num_calls < 20) {
   42393           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrEnumerateTrustedDomains_ndr_print");
   42394           0 :                 return NULL;
   42395             :         }
   42396           0 :         call = &ndr_table_netlogon.calls[19];
   42397             : 
   42398           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   42399           0 :         ret = PyUnicode_FromString(retstr);
   42400           0 :         TALLOC_FREE(retstr);
   42401             : 
   42402           0 :         return ret;
   42403             : }
   42404             : 
   42405           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   42406             : {
   42407           0 :         return py_netr_NetrEnumerateTrustedDomains_ndr_print(py_obj, "netr_NetrEnumerateTrustedDomains_in", NDR_IN);
   42408             : }
   42409             : 
   42410           0 : static PyObject *py_netr_NetrEnumerateTrustedDomains_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   42411             : {
   42412           0 :         return py_netr_NetrEnumerateTrustedDomains_ndr_print(py_obj, "netr_NetrEnumerateTrustedDomains_out", NDR_OUT);
   42413             : }
   42414             : 
   42415             : static PyMethodDef py_netr_NetrEnumerateTrustedDomains_methods[] = {
   42416             :         { "opnum", (PyCFunction)py_netr_NetrEnumerateTrustedDomains_ndr_opnum, METH_NOARGS|METH_CLASS,
   42417             :                 "netlogon.netr_NetrEnumerateTrustedDomains.opnum() -> 19 (0x13) " },
   42418             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomains_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   42419             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   42420             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomains_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   42421             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   42422             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomains_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   42423             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   42424             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomains_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   42425             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   42426             :         { "__ndr_print_in__", (PyCFunction)py_netr_NetrEnumerateTrustedDomains_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   42427             :         { "__ndr_print_out__", (PyCFunction)py_netr_NetrEnumerateTrustedDomains_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   42428             :         { NULL, NULL, 0, NULL }
   42429             : };
   42430             : 
   42431             : 
   42432             : static PyTypeObject netr_NetrEnumerateTrustedDomains_Type = {
   42433             :         PyVarObject_HEAD_INIT(NULL, 0)
   42434             :         .tp_name = "netlogon.netr_NetrEnumerateTrustedDomains",
   42435             :         .tp_getset = py_netr_NetrEnumerateTrustedDomains_getsetters,
   42436             :         .tp_methods = py_netr_NetrEnumerateTrustedDomains_methods,
   42437             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   42438             :         .tp_new = py_netr_NetrEnumerateTrustedDomains_new,
   42439             : };
   42440             : 
   42441           0 : static bool pack_py_netr_NetrEnumerateTrustedDomains_args_in(PyObject *args, PyObject *kwargs, struct netr_NetrEnumerateTrustedDomains *r)
   42442             : {
   42443             :         PyObject *py_server_name;
   42444           0 :         const char *kwnames[] = {
   42445             :                 "server_name", NULL
   42446             :         };
   42447             : 
   42448           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:netr_NetrEnumerateTrustedDomains", discard_const_p(char *, kwnames), &py_server_name)) {
   42449           0 :                 return false;
   42450             :         }
   42451             : 
   42452           0 :         if (py_server_name == NULL) {
   42453           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   42454           0 :                 return false;
   42455             :         }
   42456           0 :         if (py_server_name == Py_None) {
   42457           0 :                 r->in.server_name = NULL;
   42458             :         } else {
   42459           0 :                 r->in.server_name = NULL;
   42460             :                 {
   42461             :                         const char *test_str;
   42462             :                         const char *talloc_str;
   42463           0 :                         PyObject *unicode = NULL;
   42464           0 :                         if (PyUnicode_Check(py_server_name)) {
   42465           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   42466           0 :                                 if (unicode == NULL) {
   42467           0 :                                         PyErr_NoMemory();
   42468           0 :                                         return false;
   42469             :                                 }
   42470           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   42471           0 :                         } else if (PyBytes_Check(py_server_name)) {
   42472           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   42473             :                         } else {
   42474           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   42475           0 :                                 return false;
   42476             :                         }
   42477           0 :                         talloc_str = talloc_strdup(r, test_str);
   42478           0 :                         if (unicode != NULL) {
   42479           0 :                                 Py_DECREF(unicode);
   42480             :                         }
   42481           0 :                         if (talloc_str == NULL) {
   42482           0 :                                 PyErr_NoMemory();
   42483           0 :                                 return false;
   42484             :                         }
   42485           0 :                         r->in.server_name = talloc_str;
   42486             :                 }
   42487             :         }
   42488           0 :         return true;
   42489             : }
   42490             : 
   42491           0 : static PyObject *unpack_py_netr_NetrEnumerateTrustedDomains_args_out(struct netr_NetrEnumerateTrustedDomains *r)
   42492             : {
   42493             :         PyObject *result;
   42494             :         PyObject *py_trusted_domains_blob;
   42495           0 :         py_trusted_domains_blob = pytalloc_reference_ex(&netr_Blob_Type, r->out.trusted_domains_blob, r->out.trusted_domains_blob);
   42496           0 :         result = py_trusted_domains_blob;
   42497           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   42498           0 :                 PyErr_SetNTSTATUS(r->out.result);
   42499           0 :                 return NULL;
   42500             :         }
   42501             : 
   42502           0 :         return result;
   42503             : }
   42504             : 
   42505             : 
   42506           0 : static PyObject *py_netr_DsRGetDCName_in_get_server_unc(PyObject *obj, void *closure)
   42507             : {
   42508           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(obj);
   42509             :         PyObject *py_server_unc;
   42510           0 :         if (object->in.server_unc == NULL) {
   42511           0 :                 Py_RETURN_NONE;
   42512             :         }
   42513           0 :         if (object->in.server_unc == NULL) {
   42514           0 :                 py_server_unc = Py_None;
   42515           0 :                 Py_INCREF(py_server_unc);
   42516             :         } else {
   42517           0 :                 if (object->in.server_unc == NULL) {
   42518           0 :                         py_server_unc = Py_None;
   42519           0 :                         Py_INCREF(py_server_unc);
   42520             :                 } else {
   42521           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   42522             :                 }
   42523             :         }
   42524           0 :         return py_server_unc;
   42525             : }
   42526             : 
   42527           0 : static int py_netr_DsRGetDCName_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   42528             : {
   42529           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(py_obj);
   42530           0 :         if (value == NULL) {
   42531           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   42532           0 :                 return -1;
   42533             :         }
   42534           0 :         if (value == Py_None) {
   42535           0 :                 object->in.server_unc = NULL;
   42536             :         } else {
   42537           0 :                 object->in.server_unc = NULL;
   42538             :                 {
   42539             :                         const char *test_str;
   42540             :                         const char *talloc_str;
   42541           0 :                         PyObject *unicode = NULL;
   42542           0 :                         if (PyUnicode_Check(value)) {
   42543           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   42544           0 :                                 if (unicode == NULL) {
   42545           0 :                                         PyErr_NoMemory();
   42546           0 :                                         return -1;
   42547             :                                 }
   42548           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   42549           0 :                         } else if (PyBytes_Check(value)) {
   42550           0 :                                 test_str = PyBytes_AS_STRING(value);
   42551             :                         } else {
   42552           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   42553           0 :                                 return -1;
   42554             :                         }
   42555           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   42556           0 :                         if (unicode != NULL) {
   42557           0 :                                 Py_DECREF(unicode);
   42558             :                         }
   42559           0 :                         if (talloc_str == NULL) {
   42560           0 :                                 PyErr_NoMemory();
   42561           0 :                                 return -1;
   42562             :                         }
   42563           0 :                         object->in.server_unc = talloc_str;
   42564             :                 }
   42565             :         }
   42566           0 :         return 0;
   42567             : }
   42568             : 
   42569           0 : static PyObject *py_netr_DsRGetDCName_in_get_domain_name(PyObject *obj, void *closure)
   42570             : {
   42571           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(obj);
   42572             :         PyObject *py_domain_name;
   42573           0 :         if (object->in.domain_name == NULL) {
   42574           0 :                 Py_RETURN_NONE;
   42575             :         }
   42576           0 :         if (object->in.domain_name == NULL) {
   42577           0 :                 py_domain_name = Py_None;
   42578           0 :                 Py_INCREF(py_domain_name);
   42579             :         } else {
   42580           0 :                 if (object->in.domain_name == NULL) {
   42581           0 :                         py_domain_name = Py_None;
   42582           0 :                         Py_INCREF(py_domain_name);
   42583             :                 } else {
   42584           0 :                         py_domain_name = PyUnicode_Decode(object->in.domain_name, strlen(object->in.domain_name), "utf-8", "ignore");
   42585             :                 }
   42586             :         }
   42587           0 :         return py_domain_name;
   42588             : }
   42589             : 
   42590           0 : static int py_netr_DsRGetDCName_in_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   42591             : {
   42592           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(py_obj);
   42593           0 :         if (value == NULL) {
   42594           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_name");
   42595           0 :                 return -1;
   42596             :         }
   42597           0 :         if (value == Py_None) {
   42598           0 :                 object->in.domain_name = NULL;
   42599             :         } else {
   42600           0 :                 object->in.domain_name = NULL;
   42601             :                 {
   42602             :                         const char *test_str;
   42603             :                         const char *talloc_str;
   42604           0 :                         PyObject *unicode = NULL;
   42605           0 :                         if (PyUnicode_Check(value)) {
   42606           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   42607           0 :                                 if (unicode == NULL) {
   42608           0 :                                         PyErr_NoMemory();
   42609           0 :                                         return -1;
   42610             :                                 }
   42611           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   42612           0 :                         } else if (PyBytes_Check(value)) {
   42613           0 :                                 test_str = PyBytes_AS_STRING(value);
   42614             :                         } else {
   42615           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   42616           0 :                                 return -1;
   42617             :                         }
   42618           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   42619           0 :                         if (unicode != NULL) {
   42620           0 :                                 Py_DECREF(unicode);
   42621             :                         }
   42622           0 :                         if (talloc_str == NULL) {
   42623           0 :                                 PyErr_NoMemory();
   42624           0 :                                 return -1;
   42625             :                         }
   42626           0 :                         object->in.domain_name = talloc_str;
   42627             :                 }
   42628             :         }
   42629           0 :         return 0;
   42630             : }
   42631             : 
   42632           0 : static PyObject *py_netr_DsRGetDCName_in_get_domain_guid(PyObject *obj, void *closure)
   42633             : {
   42634           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(obj);
   42635             :         PyObject *py_domain_guid;
   42636           0 :         if (object->in.domain_guid == NULL) {
   42637           0 :                 Py_RETURN_NONE;
   42638             :         }
   42639           0 :         if (object->in.domain_guid == NULL) {
   42640           0 :                 py_domain_guid = Py_None;
   42641           0 :                 Py_INCREF(py_domain_guid);
   42642             :         } else {
   42643           0 :                 py_domain_guid = pytalloc_reference_ex(GUID_Type, object->in.domain_guid, object->in.domain_guid);
   42644             :         }
   42645           0 :         return py_domain_guid;
   42646             : }
   42647             : 
   42648           0 : static int py_netr_DsRGetDCName_in_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
   42649             : {
   42650           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(py_obj);
   42651           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.domain_guid));
   42652           0 :         if (value == NULL) {
   42653           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_guid");
   42654           0 :                 return -1;
   42655             :         }
   42656           0 :         if (value == Py_None) {
   42657           0 :                 object->in.domain_guid = NULL;
   42658             :         } else {
   42659           0 :                 object->in.domain_guid = NULL;
   42660           0 :                 PY_CHECK_TYPE(GUID_Type, value, return -1;);
   42661           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   42662           0 :                         PyErr_NoMemory();
   42663           0 :                         return -1;
   42664             :                 }
   42665           0 :                 object->in.domain_guid = (struct GUID *)pytalloc_get_ptr(value);
   42666             :         }
   42667           0 :         return 0;
   42668             : }
   42669             : 
   42670           0 : static PyObject *py_netr_DsRGetDCName_in_get_site_guid(PyObject *obj, void *closure)
   42671             : {
   42672           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(obj);
   42673             :         PyObject *py_site_guid;
   42674           0 :         if (object->in.site_guid == NULL) {
   42675           0 :                 Py_RETURN_NONE;
   42676             :         }
   42677           0 :         if (object->in.site_guid == NULL) {
   42678           0 :                 py_site_guid = Py_None;
   42679           0 :                 Py_INCREF(py_site_guid);
   42680             :         } else {
   42681           0 :                 py_site_guid = pytalloc_reference_ex(GUID_Type, object->in.site_guid, object->in.site_guid);
   42682             :         }
   42683           0 :         return py_site_guid;
   42684             : }
   42685             : 
   42686           0 : static int py_netr_DsRGetDCName_in_set_site_guid(PyObject *py_obj, PyObject *value, void *closure)
   42687             : {
   42688           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(py_obj);
   42689           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.site_guid));
   42690           0 :         if (value == NULL) {
   42691           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.site_guid");
   42692           0 :                 return -1;
   42693             :         }
   42694           0 :         if (value == Py_None) {
   42695           0 :                 object->in.site_guid = NULL;
   42696             :         } else {
   42697           0 :                 object->in.site_guid = NULL;
   42698           0 :                 PY_CHECK_TYPE(GUID_Type, value, return -1;);
   42699           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   42700           0 :                         PyErr_NoMemory();
   42701           0 :                         return -1;
   42702             :                 }
   42703           0 :                 object->in.site_guid = (struct GUID *)pytalloc_get_ptr(value);
   42704             :         }
   42705           0 :         return 0;
   42706             : }
   42707             : 
   42708           0 : static PyObject *py_netr_DsRGetDCName_in_get_flags(PyObject *obj, void *closure)
   42709             : {
   42710           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(obj);
   42711             :         PyObject *py_flags;
   42712           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
   42713           0 :         return py_flags;
   42714             : }
   42715             : 
   42716           0 : static int py_netr_DsRGetDCName_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   42717             : {
   42718           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(py_obj);
   42719           0 :         if (value == NULL) {
   42720           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   42721           0 :                 return -1;
   42722             :         }
   42723             :         {
   42724           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   42725           0 :                 if (PyLong_Check(value)) {
   42726             :                         unsigned long long test_var;
   42727           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   42728           0 :                         if (PyErr_Occurred() != NULL) {
   42729           0 :                                 return -1;
   42730             :                         }
   42731           0 :                         if (test_var > uint_max) {
   42732           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   42733             :                                   PyLong_Type.tp_name, uint_max, test_var);
   42734           0 :                                 return -1;
   42735             :                         }
   42736           0 :                         object->in.flags = test_var;
   42737             :                 } else {
   42738           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   42739             :                           PyLong_Type.tp_name);
   42740           0 :                         return -1;
   42741             :                 }
   42742             :         }
   42743           0 :         return 0;
   42744             : }
   42745             : 
   42746           0 : static PyObject *py_netr_DsRGetDCName_out_get_info(PyObject *obj, void *closure)
   42747             : {
   42748           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(obj);
   42749             :         PyObject *py_info;
   42750           0 :         if (object->out.info == NULL) {
   42751           0 :                 Py_RETURN_NONE;
   42752             :         }
   42753           0 :         if (*object->out.info == NULL) {
   42754           0 :                 py_info = Py_None;
   42755           0 :                 Py_INCREF(py_info);
   42756             :         } else {
   42757           0 :                 py_info = pytalloc_reference_ex(&netr_DsRGetDCNameInfo_Type, *object->out.info, *object->out.info);
   42758             :         }
   42759           0 :         return py_info;
   42760             : }
   42761             : 
   42762           0 : static int py_netr_DsRGetDCName_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   42763             : {
   42764           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(py_obj);
   42765           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   42766           0 :         if (value == NULL) {
   42767           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
   42768           0 :                 return -1;
   42769             :         }
   42770           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   42771           0 :         if (object->out.info == NULL) {
   42772           0 :                 PyErr_NoMemory();
   42773           0 :                 return -1;
   42774             :         }
   42775           0 :         if (value == Py_None) {
   42776           0 :                 *object->out.info = NULL;
   42777             :         } else {
   42778           0 :                 *object->out.info = NULL;
   42779           0 :                 PY_CHECK_TYPE(&netr_DsRGetDCNameInfo_Type, value, return -1;);
   42780           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   42781           0 :                         PyErr_NoMemory();
   42782           0 :                         return -1;
   42783             :                 }
   42784           0 :                 *object->out.info = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(value);
   42785             :         }
   42786           0 :         return 0;
   42787             : }
   42788             : 
   42789           0 : static PyObject *py_netr_DsRGetDCName_get_result(PyObject *obj, void *closure)
   42790             : {
   42791           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(obj);
   42792             :         PyObject *py_result;
   42793           0 :         py_result = PyErr_FromWERROR(object->out.result);
   42794           0 :         return py_result;
   42795             : }
   42796             : 
   42797           0 : static int py_netr_DsRGetDCName_set_result(PyObject *py_obj, PyObject *value, void *closure)
   42798             : {
   42799           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(py_obj);
   42800           0 :         if (value == NULL) {
   42801           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   42802           0 :                 return -1;
   42803             :         }
   42804           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   42805           0 :         return 0;
   42806             : }
   42807             : 
   42808             : static PyGetSetDef py_netr_DsRGetDCName_getsetters[] = {
   42809             :         {
   42810             :                 .name = discard_const_p(char, "in_server_unc"),
   42811             :                 .get = py_netr_DsRGetDCName_in_get_server_unc,
   42812             :                 .set = py_netr_DsRGetDCName_in_set_server_unc,
   42813             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   42814             :         },
   42815             :         {
   42816             :                 .name = discard_const_p(char, "in_domain_name"),
   42817             :                 .get = py_netr_DsRGetDCName_in_get_domain_name,
   42818             :                 .set = py_netr_DsRGetDCName_in_set_domain_name,
   42819             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   42820             :         },
   42821             :         {
   42822             :                 .name = discard_const_p(char, "in_domain_guid"),
   42823             :                 .get = py_netr_DsRGetDCName_in_get_domain_guid,
   42824             :                 .set = py_netr_DsRGetDCName_in_set_domain_guid,
   42825             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   42826             :         },
   42827             :         {
   42828             :                 .name = discard_const_p(char, "in_site_guid"),
   42829             :                 .get = py_netr_DsRGetDCName_in_get_site_guid,
   42830             :                 .set = py_netr_DsRGetDCName_in_set_site_guid,
   42831             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   42832             :         },
   42833             :         {
   42834             :                 .name = discard_const_p(char, "in_flags"),
   42835             :                 .get = py_netr_DsRGetDCName_in_get_flags,
   42836             :                 .set = py_netr_DsRGetDCName_in_set_flags,
   42837             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCName_flags")
   42838             :         },
   42839             :         {
   42840             :                 .name = discard_const_p(char, "out_info"),
   42841             :                 .get = py_netr_DsRGetDCName_out_get_info,
   42842             :                 .set = py_netr_DsRGetDCName_out_set_info,
   42843             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCNameInfo")
   42844             :         },
   42845             :         {
   42846             :                 .name = discard_const_p(char, "result"),
   42847             :                 .get = py_netr_DsRGetDCName_get_result,
   42848             :                 .set = py_netr_DsRGetDCName_set_result,
   42849             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   42850             :         },
   42851             :         { .name = NULL }
   42852             : };
   42853             : 
   42854           0 : static PyObject *py_netr_DsRGetDCName_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   42855             : {
   42856           0 :         PyObject *self = pytalloc_new(struct netr_DsRGetDCName, type);
   42857           0 :         struct netr_DsRGetDCName *_self = (struct netr_DsRGetDCName *)pytalloc_get_ptr(self);
   42858           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   42859             :         /* a pointer to a NULL pointer */
   42860           0 :         _self->out.info = talloc_zero(mem_ctx, struct netr_DsRGetDCNameInfo *);
   42861           0 :         return self;
   42862             : }
   42863             : 
   42864           0 : static PyObject *py_netr_DsRGetDCName_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   42865             : {
   42866             : 
   42867             : 
   42868           0 :         return PyLong_FromLong(20);
   42869             : }
   42870             : 
   42871           0 : static PyObject *py_netr_DsRGetDCName_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   42872             : {
   42873           0 :         const struct ndr_interface_call *call = NULL;
   42874           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(py_obj);
   42875           0 :         PyObject *ret = NULL;
   42876           0 :         struct ndr_push *push = NULL;
   42877             :         DATA_BLOB blob;
   42878             :         enum ndr_err_code err;
   42879             : 
   42880           0 :         if (ndr_table_netlogon.num_calls < 21) {
   42881           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCName_ndr_pack");
   42882           0 :                 return NULL;
   42883             :         }
   42884           0 :         call = &ndr_table_netlogon.calls[20];
   42885             : 
   42886           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   42887           0 :         if (push == NULL) {
   42888           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   42889           0 :                 return NULL;
   42890             :         }
   42891             : 
   42892           0 :         push->flags |= ndr_push_flags;
   42893             : 
   42894           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   42895           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   42896           0 :                 TALLOC_FREE(push);
   42897           0 :                 PyErr_SetNdrError(err);
   42898           0 :                 return NULL;
   42899             :         }
   42900           0 :         blob = ndr_push_blob(push);
   42901           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   42902           0 :         TALLOC_FREE(push);
   42903           0 :         return ret;
   42904             : }
   42905             : 
   42906           0 : static PyObject *py_netr_DsRGetDCName_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42907             : {
   42908           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   42909           0 :         PyObject *bigendian_obj = NULL;
   42910           0 :         PyObject *ndr64_obj = NULL;
   42911           0 :         uint32_t ndr_push_flags = 0;
   42912             : 
   42913           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   42914             :                 discard_const_p(char *, kwnames),
   42915             :                 &bigendian_obj,
   42916             :                 &ndr64_obj)) {
   42917           0 :                 return NULL;
   42918             :         }
   42919             : 
   42920           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42921           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   42922             :         }
   42923           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42924           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   42925             :         }
   42926             : 
   42927           0 :         return py_netr_DsRGetDCName_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   42928             : }
   42929             : 
   42930           0 : static PyObject *py_netr_DsRGetDCName_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42931             : {
   42932           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   42933           0 :         PyObject *bigendian_obj = NULL;
   42934           0 :         PyObject *ndr64_obj = NULL;
   42935           0 :         uint32_t ndr_push_flags = 0;
   42936             : 
   42937           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   42938             :                 discard_const_p(char *, kwnames),
   42939             :                 &bigendian_obj,
   42940             :                 &ndr64_obj)) {
   42941           0 :                 return NULL;
   42942             :         }
   42943             : 
   42944           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42945           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   42946             :         }
   42947           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42948           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   42949             :         }
   42950             : 
   42951           0 :         return py_netr_DsRGetDCName_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   42952             : }
   42953             : 
   42954           0 : static PyObject *py_netr_DsRGetDCName_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   42955             : {
   42956           0 :         const struct ndr_interface_call *call = NULL;
   42957           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(py_obj);
   42958           0 :         struct ndr_pull *pull = NULL;
   42959             :         enum ndr_err_code err;
   42960             : 
   42961           0 :         if (ndr_table_netlogon.num_calls < 21) {
   42962           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCName_ndr_unpack");
   42963           0 :                 return NULL;
   42964             :         }
   42965           0 :         call = &ndr_table_netlogon.calls[20];
   42966             : 
   42967           0 :         pull = ndr_pull_init_blob(blob, object);
   42968           0 :         if (pull == NULL) {
   42969           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   42970           0 :                 return NULL;
   42971             :         }
   42972             : 
   42973           0 :         pull->flags |= ndr_pull_flags;
   42974             : 
   42975           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   42976           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   42977           0 :                 TALLOC_FREE(pull);
   42978           0 :                 PyErr_SetNdrError(err);
   42979           0 :                 return NULL;
   42980             :         }
   42981           0 :         if (!allow_remaining) {
   42982             :                 uint32_t highest_ofs;
   42983             : 
   42984           0 :                 if (pull->offset > pull->relative_highest_offset) {
   42985           0 :                         highest_ofs = pull->offset;
   42986             :                 } else {
   42987           0 :                         highest_ofs = pull->relative_highest_offset;
   42988             :                 }
   42989           0 :                 if (highest_ofs < pull->data_size) {
   42990           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   42991             :                                 "not all bytes consumed ofs[%u] size[%u]",
   42992             :                                 highest_ofs, pull->data_size);
   42993           0 :                         TALLOC_FREE(pull);
   42994           0 :                         PyErr_SetNdrError(err);
   42995           0 :                         return NULL;
   42996             :                 }
   42997             :         }
   42998             : 
   42999           0 :         TALLOC_FREE(pull);
   43000           0 :         Py_RETURN_NONE;
   43001             : }
   43002             : 
   43003           0 : static PyObject *py_netr_DsRGetDCName_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43004             : {
   43005             :         DATA_BLOB blob;
   43006           0 :         Py_ssize_t blob_length = 0;
   43007           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   43008           0 :         PyObject *bigendian_obj = NULL;
   43009           0 :         PyObject *ndr64_obj = NULL;
   43010           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   43011           0 :         PyObject *allow_remaining_obj = NULL;
   43012           0 :         bool allow_remaining = false;
   43013             : 
   43014           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   43015             :                 discard_const_p(char *, kwnames),
   43016             :                 &blob.data, &blob_length,
   43017             :                 &bigendian_obj,
   43018             :                 &ndr64_obj,
   43019             :                 &allow_remaining_obj)) {
   43020           0 :                 return NULL;
   43021             :         }
   43022           0 :         blob.length = blob_length;
   43023             : 
   43024           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43025           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   43026             :         }
   43027           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43028           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   43029             :         }
   43030             : 
   43031           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   43032           0 :                 allow_remaining = true;
   43033             :         }
   43034             : 
   43035           0 :         return py_netr_DsRGetDCName_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   43036             : }
   43037             : 
   43038           0 : static PyObject *py_netr_DsRGetDCName_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43039             : {
   43040             :         DATA_BLOB blob;
   43041           0 :         Py_ssize_t blob_length = 0;
   43042           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   43043           0 :         PyObject *bigendian_obj = NULL;
   43044           0 :         PyObject *ndr64_obj = NULL;
   43045           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   43046           0 :         PyObject *allow_remaining_obj = NULL;
   43047           0 :         bool allow_remaining = false;
   43048             : 
   43049           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   43050             :                 discard_const_p(char *, kwnames),
   43051             :                 &blob.data, &blob_length,
   43052             :                 &bigendian_obj,
   43053             :                 &ndr64_obj,
   43054             :                 &allow_remaining_obj)) {
   43055           0 :                 return NULL;
   43056             :         }
   43057           0 :         blob.length = blob_length;
   43058             : 
   43059           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43060           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   43061             :         }
   43062           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43063           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   43064             :         }
   43065             : 
   43066           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   43067           0 :                 allow_remaining = true;
   43068             :         }
   43069             : 
   43070           0 :         return py_netr_DsRGetDCName_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   43071             : }
   43072             : 
   43073           0 : static PyObject *py_netr_DsRGetDCName_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   43074             : {
   43075           0 :         const struct ndr_interface_call *call = NULL;
   43076           0 :         struct netr_DsRGetDCName *object = (struct netr_DsRGetDCName *)pytalloc_get_ptr(py_obj);
   43077             :         PyObject *ret;
   43078             :         char *retstr;
   43079             : 
   43080           0 :         if (ndr_table_netlogon.num_calls < 21) {
   43081           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCName_ndr_print");
   43082           0 :                 return NULL;
   43083             :         }
   43084           0 :         call = &ndr_table_netlogon.calls[20];
   43085             : 
   43086           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   43087           0 :         ret = PyUnicode_FromString(retstr);
   43088           0 :         TALLOC_FREE(retstr);
   43089             : 
   43090           0 :         return ret;
   43091             : }
   43092             : 
   43093           0 : static PyObject *py_netr_DsRGetDCName_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   43094             : {
   43095           0 :         return py_netr_DsRGetDCName_ndr_print(py_obj, "netr_DsRGetDCName_in", NDR_IN);
   43096             : }
   43097             : 
   43098           0 : static PyObject *py_netr_DsRGetDCName_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   43099             : {
   43100           0 :         return py_netr_DsRGetDCName_ndr_print(py_obj, "netr_DsRGetDCName_out", NDR_OUT);
   43101             : }
   43102             : 
   43103             : static PyMethodDef py_netr_DsRGetDCName_methods[] = {
   43104             :         { "opnum", (PyCFunction)py_netr_DsRGetDCName_ndr_opnum, METH_NOARGS|METH_CLASS,
   43105             :                 "netlogon.netr_DsRGetDCName.opnum() -> 20 (0x14) " },
   43106             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCName_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   43107             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   43108             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCName_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   43109             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   43110             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCName_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   43111             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   43112             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCName_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   43113             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   43114             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsRGetDCName_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   43115             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsRGetDCName_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   43116             :         { NULL, NULL, 0, NULL }
   43117             : };
   43118             : 
   43119             : 
   43120             : static PyTypeObject netr_DsRGetDCName_Type = {
   43121             :         PyVarObject_HEAD_INIT(NULL, 0)
   43122             :         .tp_name = "netlogon.netr_DsRGetDCName",
   43123             :         .tp_getset = py_netr_DsRGetDCName_getsetters,
   43124             :         .tp_methods = py_netr_DsRGetDCName_methods,
   43125             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   43126             :         .tp_new = py_netr_DsRGetDCName_new,
   43127             : };
   43128             : 
   43129           0 : static bool pack_py_netr_DsRGetDCName_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRGetDCName *r)
   43130             : {
   43131             :         PyObject *py_server_unc;
   43132             :         PyObject *py_domain_name;
   43133             :         PyObject *py_domain_guid;
   43134             :         PyObject *py_site_guid;
   43135             :         PyObject *py_flags;
   43136           0 :         const char *kwnames[] = {
   43137             :                 "server_unc", "domain_name", "domain_guid", "site_guid", "flags", NULL
   43138             :         };
   43139             : 
   43140           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)) {
   43141           0 :                 return false;
   43142             :         }
   43143             : 
   43144           0 :         if (py_server_unc == NULL) {
   43145           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   43146           0 :                 return false;
   43147             :         }
   43148           0 :         if (py_server_unc == Py_None) {
   43149           0 :                 r->in.server_unc = NULL;
   43150             :         } else {
   43151           0 :                 r->in.server_unc = NULL;
   43152             :                 {
   43153             :                         const char *test_str;
   43154             :                         const char *talloc_str;
   43155           0 :                         PyObject *unicode = NULL;
   43156           0 :                         if (PyUnicode_Check(py_server_unc)) {
   43157           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   43158           0 :                                 if (unicode == NULL) {
   43159           0 :                                         PyErr_NoMemory();
   43160           0 :                                         return false;
   43161             :                                 }
   43162           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   43163           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   43164           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   43165             :                         } else {
   43166           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   43167           0 :                                 return false;
   43168             :                         }
   43169           0 :                         talloc_str = talloc_strdup(r, test_str);
   43170           0 :                         if (unicode != NULL) {
   43171           0 :                                 Py_DECREF(unicode);
   43172             :                         }
   43173           0 :                         if (talloc_str == NULL) {
   43174           0 :                                 PyErr_NoMemory();
   43175           0 :                                 return false;
   43176             :                         }
   43177           0 :                         r->in.server_unc = talloc_str;
   43178             :                 }
   43179             :         }
   43180           0 :         if (py_domain_name == NULL) {
   43181           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_name");
   43182           0 :                 return false;
   43183             :         }
   43184           0 :         if (py_domain_name == Py_None) {
   43185           0 :                 r->in.domain_name = NULL;
   43186             :         } else {
   43187           0 :                 r->in.domain_name = NULL;
   43188             :                 {
   43189             :                         const char *test_str;
   43190             :                         const char *talloc_str;
   43191           0 :                         PyObject *unicode = NULL;
   43192           0 :                         if (PyUnicode_Check(py_domain_name)) {
   43193           0 :                                 unicode = PyUnicode_AsEncodedString(py_domain_name, "utf-8", "ignore");
   43194           0 :                                 if (unicode == NULL) {
   43195           0 :                                         PyErr_NoMemory();
   43196           0 :                                         return false;
   43197             :                                 }
   43198           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   43199           0 :                         } else if (PyBytes_Check(py_domain_name)) {
   43200           0 :                                 test_str = PyBytes_AS_STRING(py_domain_name);
   43201             :                         } else {
   43202           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain_name)->tp_name);
   43203           0 :                                 return false;
   43204             :                         }
   43205           0 :                         talloc_str = talloc_strdup(r, test_str);
   43206           0 :                         if (unicode != NULL) {
   43207           0 :                                 Py_DECREF(unicode);
   43208             :                         }
   43209           0 :                         if (talloc_str == NULL) {
   43210           0 :                                 PyErr_NoMemory();
   43211           0 :                                 return false;
   43212             :                         }
   43213           0 :                         r->in.domain_name = talloc_str;
   43214             :                 }
   43215             :         }
   43216           0 :         if (py_domain_guid == NULL) {
   43217           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_guid");
   43218           0 :                 return false;
   43219             :         }
   43220           0 :         if (py_domain_guid == Py_None) {
   43221           0 :                 r->in.domain_guid = NULL;
   43222             :         } else {
   43223           0 :                 r->in.domain_guid = NULL;
   43224           0 :                 PY_CHECK_TYPE(GUID_Type, py_domain_guid, return false;);
   43225           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_domain_guid)) == NULL) {
   43226           0 :                         PyErr_NoMemory();
   43227           0 :                         return false;
   43228             :                 }
   43229           0 :                 r->in.domain_guid = (struct GUID *)pytalloc_get_ptr(py_domain_guid);
   43230             :         }
   43231           0 :         if (py_site_guid == NULL) {
   43232           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.site_guid");
   43233           0 :                 return false;
   43234             :         }
   43235           0 :         if (py_site_guid == Py_None) {
   43236           0 :                 r->in.site_guid = NULL;
   43237             :         } else {
   43238           0 :                 r->in.site_guid = NULL;
   43239           0 :                 PY_CHECK_TYPE(GUID_Type, py_site_guid, return false;);
   43240           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_site_guid)) == NULL) {
   43241           0 :                         PyErr_NoMemory();
   43242           0 :                         return false;
   43243             :                 }
   43244           0 :                 r->in.site_guid = (struct GUID *)pytalloc_get_ptr(py_site_guid);
   43245             :         }
   43246           0 :         if (py_flags == NULL) {
   43247           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   43248           0 :                 return false;
   43249             :         }
   43250             :         {
   43251           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   43252           0 :                 if (PyLong_Check(py_flags)) {
   43253             :                         unsigned long long test_var;
   43254           0 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   43255           0 :                         if (PyErr_Occurred() != NULL) {
   43256           0 :                                 return false;
   43257             :                         }
   43258           0 :                         if (test_var > uint_max) {
   43259           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   43260             :                                   PyLong_Type.tp_name, uint_max, test_var);
   43261           0 :                                 return false;
   43262             :                         }
   43263           0 :                         r->in.flags = test_var;
   43264             :                 } else {
   43265           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   43266             :                           PyLong_Type.tp_name);
   43267           0 :                         return false;
   43268             :                 }
   43269             :         }
   43270           0 :         return true;
   43271             : }
   43272             : 
   43273           0 : static PyObject *unpack_py_netr_DsRGetDCName_args_out(struct netr_DsRGetDCName *r)
   43274             : {
   43275             :         PyObject *result;
   43276             :         PyObject *py_info;
   43277           0 :         if (*r->out.info == NULL) {
   43278           0 :                 py_info = Py_None;
   43279           0 :                 Py_INCREF(py_info);
   43280             :         } else {
   43281           0 :                 py_info = pytalloc_reference_ex(&netr_DsRGetDCNameInfo_Type, *r->out.info, *r->out.info);
   43282             :         }
   43283           0 :         result = py_info;
   43284           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   43285           0 :                 PyErr_SetWERROR(r->out.result);
   43286           0 :                 return NULL;
   43287             :         }
   43288             : 
   43289           0 :         return result;
   43290             : }
   43291             : 
   43292             : 
   43293           0 : static PyObject *py_netr_LogonGetCapabilities_in_get_server_name(PyObject *obj, void *closure)
   43294             : {
   43295           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(obj);
   43296             :         PyObject *py_server_name;
   43297           0 :         if (object->in.server_name == NULL) {
   43298           0 :                 Py_RETURN_NONE;
   43299             :         }
   43300           0 :         if (object->in.server_name == NULL) {
   43301           0 :                 py_server_name = Py_None;
   43302           0 :                 Py_INCREF(py_server_name);
   43303             :         } else {
   43304           0 :                 py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   43305             :         }
   43306           0 :         return py_server_name;
   43307             : }
   43308             : 
   43309           0 : static int py_netr_LogonGetCapabilities_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   43310             : {
   43311           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(py_obj);
   43312           0 :         if (value == NULL) {
   43313           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   43314           0 :                 return -1;
   43315             :         }
   43316           0 :         object->in.server_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.server_name);
   43317           0 :         if (object->in.server_name == NULL) {
   43318           0 :                 PyErr_NoMemory();
   43319           0 :                 return -1;
   43320             :         }
   43321             :         {
   43322             :                 const char *test_str;
   43323             :                 const char *talloc_str;
   43324           0 :                 PyObject *unicode = NULL;
   43325           0 :                 if (PyUnicode_Check(value)) {
   43326           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   43327           0 :                         if (unicode == NULL) {
   43328           0 :                                 PyErr_NoMemory();
   43329           0 :                                 return -1;
   43330             :                         }
   43331           0 :                         test_str = PyBytes_AS_STRING(unicode);
   43332           0 :                 } else if (PyBytes_Check(value)) {
   43333           0 :                         test_str = PyBytes_AS_STRING(value);
   43334             :                 } else {
   43335           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   43336           0 :                         return -1;
   43337             :                 }
   43338           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   43339           0 :                 if (unicode != NULL) {
   43340           0 :                         Py_DECREF(unicode);
   43341             :                 }
   43342           0 :                 if (talloc_str == NULL) {
   43343           0 :                         PyErr_NoMemory();
   43344           0 :                         return -1;
   43345             :                 }
   43346           0 :                 object->in.server_name = talloc_str;
   43347             :         }
   43348           0 :         return 0;
   43349             : }
   43350             : 
   43351           0 : static PyObject *py_netr_LogonGetCapabilities_in_get_computer_name(PyObject *obj, void *closure)
   43352             : {
   43353           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(obj);
   43354             :         PyObject *py_computer_name;
   43355           0 :         if (object->in.computer_name == NULL) {
   43356           0 :                 Py_RETURN_NONE;
   43357             :         }
   43358           0 :         if (object->in.computer_name == NULL) {
   43359           0 :                 py_computer_name = Py_None;
   43360           0 :                 Py_INCREF(py_computer_name);
   43361             :         } else {
   43362           0 :                 if (object->in.computer_name == NULL) {
   43363           0 :                         py_computer_name = Py_None;
   43364           0 :                         Py_INCREF(py_computer_name);
   43365             :                 } else {
   43366           0 :                         py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   43367             :                 }
   43368             :         }
   43369           0 :         return py_computer_name;
   43370             : }
   43371             : 
   43372           0 : static int py_netr_LogonGetCapabilities_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   43373             : {
   43374           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(py_obj);
   43375           0 :         if (value == NULL) {
   43376           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   43377           0 :                 return -1;
   43378             :         }
   43379           0 :         if (value == Py_None) {
   43380           0 :                 object->in.computer_name = NULL;
   43381             :         } else {
   43382           0 :                 object->in.computer_name = NULL;
   43383             :                 {
   43384             :                         const char *test_str;
   43385             :                         const char *talloc_str;
   43386           0 :                         PyObject *unicode = NULL;
   43387           0 :                         if (PyUnicode_Check(value)) {
   43388           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   43389           0 :                                 if (unicode == NULL) {
   43390           0 :                                         PyErr_NoMemory();
   43391           0 :                                         return -1;
   43392             :                                 }
   43393           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   43394           0 :                         } else if (PyBytes_Check(value)) {
   43395           0 :                                 test_str = PyBytes_AS_STRING(value);
   43396             :                         } else {
   43397           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   43398           0 :                                 return -1;
   43399             :                         }
   43400           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   43401           0 :                         if (unicode != NULL) {
   43402           0 :                                 Py_DECREF(unicode);
   43403             :                         }
   43404           0 :                         if (talloc_str == NULL) {
   43405           0 :                                 PyErr_NoMemory();
   43406           0 :                                 return -1;
   43407             :                         }
   43408           0 :                         object->in.computer_name = talloc_str;
   43409             :                 }
   43410             :         }
   43411           0 :         return 0;
   43412             : }
   43413             : 
   43414           0 : static PyObject *py_netr_LogonGetCapabilities_in_get_credential(PyObject *obj, void *closure)
   43415             : {
   43416           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(obj);
   43417             :         PyObject *py_credential;
   43418           0 :         if (object->in.credential == NULL) {
   43419           0 :                 Py_RETURN_NONE;
   43420             :         }
   43421           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   43422           0 :         return py_credential;
   43423             : }
   43424             : 
   43425           0 : static int py_netr_LogonGetCapabilities_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   43426             : {
   43427           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(py_obj);
   43428           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   43429           0 :         if (value == NULL) {
   43430           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   43431           0 :                 return -1;
   43432             :         }
   43433           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   43434           0 :         if (object->in.credential == NULL) {
   43435           0 :                 PyErr_NoMemory();
   43436           0 :                 return -1;
   43437             :         }
   43438           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   43439           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   43440           0 :                 PyErr_NoMemory();
   43441           0 :                 return -1;
   43442             :         }
   43443           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   43444           0 :         return 0;
   43445             : }
   43446             : 
   43447           0 : static PyObject *py_netr_LogonGetCapabilities_in_get_return_authenticator(PyObject *obj, void *closure)
   43448             : {
   43449           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(obj);
   43450             :         PyObject *py_return_authenticator;
   43451           0 :         if (object->in.return_authenticator == NULL) {
   43452           0 :                 Py_RETURN_NONE;
   43453             :         }
   43454           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   43455           0 :         return py_return_authenticator;
   43456             : }
   43457             : 
   43458           0 : static int py_netr_LogonGetCapabilities_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   43459             : {
   43460           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(py_obj);
   43461           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   43462           0 :         if (value == NULL) {
   43463           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.return_authenticator");
   43464           0 :                 return -1;
   43465             :         }
   43466           0 :         object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
   43467           0 :         if (object->in.return_authenticator == NULL) {
   43468           0 :                 PyErr_NoMemory();
   43469           0 :                 return -1;
   43470             :         }
   43471           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   43472           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   43473           0 :                 PyErr_NoMemory();
   43474           0 :                 return -1;
   43475             :         }
   43476           0 :         object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   43477           0 :         return 0;
   43478             : }
   43479             : 
   43480           0 : static PyObject *py_netr_LogonGetCapabilities_out_get_return_authenticator(PyObject *obj, void *closure)
   43481             : {
   43482           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(obj);
   43483             :         PyObject *py_return_authenticator;
   43484           0 :         if (object->out.return_authenticator == NULL) {
   43485           0 :                 Py_RETURN_NONE;
   43486             :         }
   43487           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   43488           0 :         return py_return_authenticator;
   43489             : }
   43490             : 
   43491           0 : static int py_netr_LogonGetCapabilities_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   43492             : {
   43493           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(py_obj);
   43494           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   43495           0 :         if (value == NULL) {
   43496           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   43497           0 :                 return -1;
   43498             :         }
   43499           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   43500           0 :         if (object->out.return_authenticator == NULL) {
   43501           0 :                 PyErr_NoMemory();
   43502           0 :                 return -1;
   43503             :         }
   43504           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   43505           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   43506           0 :                 PyErr_NoMemory();
   43507           0 :                 return -1;
   43508             :         }
   43509           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   43510           0 :         return 0;
   43511             : }
   43512             : 
   43513           0 : static PyObject *py_netr_LogonGetCapabilities_in_get_query_level(PyObject *obj, void *closure)
   43514             : {
   43515           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(obj);
   43516             :         PyObject *py_query_level;
   43517           0 :         py_query_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.query_level);
   43518           0 :         return py_query_level;
   43519             : }
   43520             : 
   43521           0 : static int py_netr_LogonGetCapabilities_in_set_query_level(PyObject *py_obj, PyObject *value, void *closure)
   43522             : {
   43523           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(py_obj);
   43524           0 :         if (value == NULL) {
   43525           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.query_level");
   43526           0 :                 return -1;
   43527             :         }
   43528             :         {
   43529           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.query_level));
   43530           0 :                 if (PyLong_Check(value)) {
   43531             :                         unsigned long long test_var;
   43532           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   43533           0 :                         if (PyErr_Occurred() != NULL) {
   43534           0 :                                 return -1;
   43535             :                         }
   43536           0 :                         if (test_var > uint_max) {
   43537           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   43538             :                                   PyLong_Type.tp_name, uint_max, test_var);
   43539           0 :                                 return -1;
   43540             :                         }
   43541           0 :                         object->in.query_level = test_var;
   43542             :                 } else {
   43543           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   43544             :                           PyLong_Type.tp_name);
   43545           0 :                         return -1;
   43546             :                 }
   43547             :         }
   43548           0 :         return 0;
   43549             : }
   43550             : 
   43551           0 : static PyObject *py_netr_LogonGetCapabilities_out_get_capabilities(PyObject *obj, void *closure)
   43552             : {
   43553           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(obj);
   43554             :         PyObject *py_capabilities;
   43555           0 :         if (object->out.capabilities == NULL) {
   43556           0 :                 Py_RETURN_NONE;
   43557             :         }
   43558           0 :         py_capabilities = pyrpc_import_union(&netr_Capabilities_Type, object->out.capabilities, object->in.query_level, object->out.capabilities, "union netr_Capabilities");
   43559           0 :         if (py_capabilities == NULL) {
   43560           0 :                 return NULL;
   43561             :         }
   43562           0 :         return py_capabilities;
   43563             : }
   43564             : 
   43565           0 : static int py_netr_LogonGetCapabilities_out_set_capabilities(PyObject *py_obj, PyObject *value, void *closure)
   43566             : {
   43567           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(py_obj);
   43568           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.capabilities));
   43569           0 :         if (value == NULL) {
   43570           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.capabilities");
   43571           0 :                 return -1;
   43572             :         }
   43573           0 :         object->out.capabilities = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.capabilities);
   43574           0 :         if (object->out.capabilities == NULL) {
   43575           0 :                 PyErr_NoMemory();
   43576           0 :                 return -1;
   43577             :         }
   43578             :         {
   43579             :                 union netr_Capabilities *capabilities_switch_1;
   43580           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");
   43581           0 :                 if (capabilities_switch_1 == NULL) {
   43582           0 :                         return -1;
   43583             :                 }
   43584           0 :                 object->out.capabilities = capabilities_switch_1;
   43585             :         }
   43586           0 :         return 0;
   43587             : }
   43588             : 
   43589           0 : static PyObject *py_netr_LogonGetCapabilities_get_result(PyObject *obj, void *closure)
   43590             : {
   43591           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(obj);
   43592             :         PyObject *py_result;
   43593           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   43594           0 :         return py_result;
   43595             : }
   43596             : 
   43597           0 : static int py_netr_LogonGetCapabilities_set_result(PyObject *py_obj, PyObject *value, void *closure)
   43598             : {
   43599           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(py_obj);
   43600           0 :         if (value == NULL) {
   43601           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   43602           0 :                 return -1;
   43603             :         }
   43604           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   43605           0 :         return 0;
   43606             : }
   43607             : 
   43608             : static PyGetSetDef py_netr_LogonGetCapabilities_getsetters[] = {
   43609             :         {
   43610             :                 .name = discard_const_p(char, "in_server_name"),
   43611             :                 .get = py_netr_LogonGetCapabilities_in_get_server_name,
   43612             :                 .set = py_netr_LogonGetCapabilities_in_set_server_name,
   43613             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   43614             :         },
   43615             :         {
   43616             :                 .name = discard_const_p(char, "in_computer_name"),
   43617             :                 .get = py_netr_LogonGetCapabilities_in_get_computer_name,
   43618             :                 .set = py_netr_LogonGetCapabilities_in_set_computer_name,
   43619             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   43620             :         },
   43621             :         {
   43622             :                 .name = discard_const_p(char, "in_credential"),
   43623             :                 .get = py_netr_LogonGetCapabilities_in_get_credential,
   43624             :                 .set = py_netr_LogonGetCapabilities_in_set_credential,
   43625             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   43626             :         },
   43627             :         {
   43628             :                 .name = discard_const_p(char, "in_return_authenticator"),
   43629             :                 .get = py_netr_LogonGetCapabilities_in_get_return_authenticator,
   43630             :                 .set = py_netr_LogonGetCapabilities_in_set_return_authenticator,
   43631             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   43632             :         },
   43633             :         {
   43634             :                 .name = discard_const_p(char, "out_return_authenticator"),
   43635             :                 .get = py_netr_LogonGetCapabilities_out_get_return_authenticator,
   43636             :                 .set = py_netr_LogonGetCapabilities_out_set_return_authenticator,
   43637             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   43638             :         },
   43639             :         {
   43640             :                 .name = discard_const_p(char, "in_query_level"),
   43641             :                 .get = py_netr_LogonGetCapabilities_in_get_query_level,
   43642             :                 .set = py_netr_LogonGetCapabilities_in_set_query_level,
   43643             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   43644             :         },
   43645             :         {
   43646             :                 .name = discard_const_p(char, "out_capabilities"),
   43647             :                 .get = py_netr_LogonGetCapabilities_out_get_capabilities,
   43648             :                 .set = py_netr_LogonGetCapabilities_out_set_capabilities,
   43649             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Capabilities")
   43650             :         },
   43651             :         {
   43652             :                 .name = discard_const_p(char, "result"),
   43653             :                 .get = py_netr_LogonGetCapabilities_get_result,
   43654             :                 .set = py_netr_LogonGetCapabilities_set_result,
   43655             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   43656             :         },
   43657             :         { .name = NULL }
   43658             : };
   43659             : 
   43660           0 : static PyObject *py_netr_LogonGetCapabilities_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   43661             : {
   43662           0 :         PyObject *self = pytalloc_new(struct netr_LogonGetCapabilities, type);
   43663           0 :         struct netr_LogonGetCapabilities *_self = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(self);
   43664           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   43665           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   43666           0 :         _self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   43667           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   43668           0 :         _self->out.capabilities = talloc_zero(mem_ctx, union netr_Capabilities);
   43669           0 :         return self;
   43670             : }
   43671             : 
   43672           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   43673             : {
   43674             : 
   43675             : 
   43676           0 :         return PyLong_FromLong(21);
   43677             : }
   43678             : 
   43679           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   43680             : {
   43681           0 :         const struct ndr_interface_call *call = NULL;
   43682           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(py_obj);
   43683           0 :         PyObject *ret = NULL;
   43684           0 :         struct ndr_push *push = NULL;
   43685             :         DATA_BLOB blob;
   43686             :         enum ndr_err_code err;
   43687             : 
   43688           0 :         if (ndr_table_netlogon.num_calls < 22) {
   43689           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetCapabilities_ndr_pack");
   43690           0 :                 return NULL;
   43691             :         }
   43692           0 :         call = &ndr_table_netlogon.calls[21];
   43693             : 
   43694           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   43695           0 :         if (push == NULL) {
   43696           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   43697           0 :                 return NULL;
   43698             :         }
   43699             : 
   43700           0 :         push->flags |= ndr_push_flags;
   43701             : 
   43702           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   43703           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   43704           0 :                 TALLOC_FREE(push);
   43705           0 :                 PyErr_SetNdrError(err);
   43706           0 :                 return NULL;
   43707             :         }
   43708           0 :         blob = ndr_push_blob(push);
   43709           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   43710           0 :         TALLOC_FREE(push);
   43711           0 :         return ret;
   43712             : }
   43713             : 
   43714           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43715             : {
   43716           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   43717           0 :         PyObject *bigendian_obj = NULL;
   43718           0 :         PyObject *ndr64_obj = NULL;
   43719           0 :         uint32_t ndr_push_flags = 0;
   43720             : 
   43721           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   43722             :                 discard_const_p(char *, kwnames),
   43723             :                 &bigendian_obj,
   43724             :                 &ndr64_obj)) {
   43725           0 :                 return NULL;
   43726             :         }
   43727             : 
   43728           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43729           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   43730             :         }
   43731           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43732           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   43733             :         }
   43734             : 
   43735           0 :         return py_netr_LogonGetCapabilities_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   43736             : }
   43737             : 
   43738           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43739             : {
   43740           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   43741           0 :         PyObject *bigendian_obj = NULL;
   43742           0 :         PyObject *ndr64_obj = NULL;
   43743           0 :         uint32_t ndr_push_flags = 0;
   43744             : 
   43745           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   43746             :                 discard_const_p(char *, kwnames),
   43747             :                 &bigendian_obj,
   43748             :                 &ndr64_obj)) {
   43749           0 :                 return NULL;
   43750             :         }
   43751             : 
   43752           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43753           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   43754             :         }
   43755           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43756           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   43757             :         }
   43758             : 
   43759           0 :         return py_netr_LogonGetCapabilities_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   43760             : }
   43761             : 
   43762           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   43763             : {
   43764           0 :         const struct ndr_interface_call *call = NULL;
   43765           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(py_obj);
   43766           0 :         struct ndr_pull *pull = NULL;
   43767             :         enum ndr_err_code err;
   43768             : 
   43769           0 :         if (ndr_table_netlogon.num_calls < 22) {
   43770           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetCapabilities_ndr_unpack");
   43771           0 :                 return NULL;
   43772             :         }
   43773           0 :         call = &ndr_table_netlogon.calls[21];
   43774             : 
   43775           0 :         pull = ndr_pull_init_blob(blob, object);
   43776           0 :         if (pull == NULL) {
   43777           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   43778           0 :                 return NULL;
   43779             :         }
   43780             : 
   43781           0 :         pull->flags |= ndr_pull_flags;
   43782             : 
   43783           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   43784           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   43785           0 :                 TALLOC_FREE(pull);
   43786           0 :                 PyErr_SetNdrError(err);
   43787           0 :                 return NULL;
   43788             :         }
   43789           0 :         if (!allow_remaining) {
   43790             :                 uint32_t highest_ofs;
   43791             : 
   43792           0 :                 if (pull->offset > pull->relative_highest_offset) {
   43793           0 :                         highest_ofs = pull->offset;
   43794             :                 } else {
   43795           0 :                         highest_ofs = pull->relative_highest_offset;
   43796             :                 }
   43797           0 :                 if (highest_ofs < pull->data_size) {
   43798           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   43799             :                                 "not all bytes consumed ofs[%u] size[%u]",
   43800             :                                 highest_ofs, pull->data_size);
   43801           0 :                         TALLOC_FREE(pull);
   43802           0 :                         PyErr_SetNdrError(err);
   43803           0 :                         return NULL;
   43804             :                 }
   43805             :         }
   43806             : 
   43807           0 :         TALLOC_FREE(pull);
   43808           0 :         Py_RETURN_NONE;
   43809             : }
   43810             : 
   43811           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43812             : {
   43813             :         DATA_BLOB blob;
   43814           0 :         Py_ssize_t blob_length = 0;
   43815           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   43816           0 :         PyObject *bigendian_obj = NULL;
   43817           0 :         PyObject *ndr64_obj = NULL;
   43818           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   43819           0 :         PyObject *allow_remaining_obj = NULL;
   43820           0 :         bool allow_remaining = false;
   43821             : 
   43822           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   43823             :                 discard_const_p(char *, kwnames),
   43824             :                 &blob.data, &blob_length,
   43825             :                 &bigendian_obj,
   43826             :                 &ndr64_obj,
   43827             :                 &allow_remaining_obj)) {
   43828           0 :                 return NULL;
   43829             :         }
   43830           0 :         blob.length = blob_length;
   43831             : 
   43832           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43833           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   43834             :         }
   43835           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43836           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   43837             :         }
   43838             : 
   43839           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   43840           0 :                 allow_remaining = true;
   43841             :         }
   43842             : 
   43843           0 :         return py_netr_LogonGetCapabilities_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   43844             : }
   43845             : 
   43846           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43847             : {
   43848             :         DATA_BLOB blob;
   43849           0 :         Py_ssize_t blob_length = 0;
   43850           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   43851           0 :         PyObject *bigendian_obj = NULL;
   43852           0 :         PyObject *ndr64_obj = NULL;
   43853           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   43854           0 :         PyObject *allow_remaining_obj = NULL;
   43855           0 :         bool allow_remaining = false;
   43856             : 
   43857           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   43858             :                 discard_const_p(char *, kwnames),
   43859             :                 &blob.data, &blob_length,
   43860             :                 &bigendian_obj,
   43861             :                 &ndr64_obj,
   43862             :                 &allow_remaining_obj)) {
   43863           0 :                 return NULL;
   43864             :         }
   43865           0 :         blob.length = blob_length;
   43866             : 
   43867           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43868           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   43869             :         }
   43870           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43871           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   43872             :         }
   43873             : 
   43874           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   43875           0 :                 allow_remaining = true;
   43876             :         }
   43877             : 
   43878           0 :         return py_netr_LogonGetCapabilities_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   43879             : }
   43880             : 
   43881           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   43882             : {
   43883           0 :         const struct ndr_interface_call *call = NULL;
   43884           0 :         struct netr_LogonGetCapabilities *object = (struct netr_LogonGetCapabilities *)pytalloc_get_ptr(py_obj);
   43885             :         PyObject *ret;
   43886             :         char *retstr;
   43887             : 
   43888           0 :         if (ndr_table_netlogon.num_calls < 22) {
   43889           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetCapabilities_ndr_print");
   43890           0 :                 return NULL;
   43891             :         }
   43892           0 :         call = &ndr_table_netlogon.calls[21];
   43893             : 
   43894           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   43895           0 :         ret = PyUnicode_FromString(retstr);
   43896           0 :         TALLOC_FREE(retstr);
   43897             : 
   43898           0 :         return ret;
   43899             : }
   43900             : 
   43901           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   43902             : {
   43903           0 :         return py_netr_LogonGetCapabilities_ndr_print(py_obj, "netr_LogonGetCapabilities_in", NDR_IN);
   43904             : }
   43905             : 
   43906           0 : static PyObject *py_netr_LogonGetCapabilities_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   43907             : {
   43908           0 :         return py_netr_LogonGetCapabilities_ndr_print(py_obj, "netr_LogonGetCapabilities_out", NDR_OUT);
   43909             : }
   43910             : 
   43911             : static PyMethodDef py_netr_LogonGetCapabilities_methods[] = {
   43912             :         { "opnum", (PyCFunction)py_netr_LogonGetCapabilities_ndr_opnum, METH_NOARGS|METH_CLASS,
   43913             :                 "netlogon.netr_LogonGetCapabilities.opnum() -> 21 (0x15) " },
   43914             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetCapabilities_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   43915             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   43916             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetCapabilities_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   43917             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   43918             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetCapabilities_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   43919             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   43920             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetCapabilities_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   43921             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   43922             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonGetCapabilities_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   43923             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonGetCapabilities_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   43924             :         { NULL, NULL, 0, NULL }
   43925             : };
   43926             : 
   43927             : 
   43928             : static PyTypeObject netr_LogonGetCapabilities_Type = {
   43929             :         PyVarObject_HEAD_INIT(NULL, 0)
   43930             :         .tp_name = "netlogon.netr_LogonGetCapabilities",
   43931             :         .tp_getset = py_netr_LogonGetCapabilities_getsetters,
   43932             :         .tp_methods = py_netr_LogonGetCapabilities_methods,
   43933             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   43934             :         .tp_new = py_netr_LogonGetCapabilities_new,
   43935             : };
   43936             : 
   43937           0 : static bool pack_py_netr_LogonGetCapabilities_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonGetCapabilities *r)
   43938             : {
   43939             :         PyObject *py_server_name;
   43940             :         PyObject *py_computer_name;
   43941             :         PyObject *py_credential;
   43942             :         PyObject *py_return_authenticator;
   43943             :         PyObject *py_query_level;
   43944           0 :         const char *kwnames[] = {
   43945             :                 "server_name", "computer_name", "credential", "return_authenticator", "query_level", NULL
   43946             :         };
   43947             : 
   43948           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)) {
   43949           0 :                 return false;
   43950             :         }
   43951             : 
   43952           0 :         if (py_server_name == NULL) {
   43953           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   43954           0 :                 return false;
   43955             :         }
   43956           0 :         r->in.server_name = talloc_ptrtype(r, r->in.server_name);
   43957           0 :         if (r->in.server_name == NULL) {
   43958           0 :                 PyErr_NoMemory();
   43959           0 :                 return false;
   43960             :         }
   43961             :         {
   43962             :                 const char *test_str;
   43963             :                 const char *talloc_str;
   43964           0 :                 PyObject *unicode = NULL;
   43965           0 :                 if (PyUnicode_Check(py_server_name)) {
   43966           0 :                         unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   43967           0 :                         if (unicode == NULL) {
   43968           0 :                                 PyErr_NoMemory();
   43969           0 :                                 return false;
   43970             :                         }
   43971           0 :                         test_str = PyBytes_AS_STRING(unicode);
   43972           0 :                 } else if (PyBytes_Check(py_server_name)) {
   43973           0 :                         test_str = PyBytes_AS_STRING(py_server_name);
   43974             :                 } else {
   43975           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   43976           0 :                         return false;
   43977             :                 }
   43978           0 :                 talloc_str = talloc_strdup(r, test_str);
   43979           0 :                 if (unicode != NULL) {
   43980           0 :                         Py_DECREF(unicode);
   43981             :                 }
   43982           0 :                 if (talloc_str == NULL) {
   43983           0 :                         PyErr_NoMemory();
   43984           0 :                         return false;
   43985             :                 }
   43986           0 :                 r->in.server_name = talloc_str;
   43987             :         }
   43988           0 :         if (py_computer_name == NULL) {
   43989           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   43990           0 :                 return false;
   43991             :         }
   43992           0 :         if (py_computer_name == Py_None) {
   43993           0 :                 r->in.computer_name = NULL;
   43994             :         } else {
   43995           0 :                 r->in.computer_name = NULL;
   43996             :                 {
   43997             :                         const char *test_str;
   43998             :                         const char *talloc_str;
   43999           0 :                         PyObject *unicode = NULL;
   44000           0 :                         if (PyUnicode_Check(py_computer_name)) {
   44001           0 :                                 unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   44002           0 :                                 if (unicode == NULL) {
   44003           0 :                                         PyErr_NoMemory();
   44004           0 :                                         return false;
   44005             :                                 }
   44006           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   44007           0 :                         } else if (PyBytes_Check(py_computer_name)) {
   44008           0 :                                 test_str = PyBytes_AS_STRING(py_computer_name);
   44009             :                         } else {
   44010           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   44011           0 :                                 return false;
   44012             :                         }
   44013           0 :                         talloc_str = talloc_strdup(r, test_str);
   44014           0 :                         if (unicode != NULL) {
   44015           0 :                                 Py_DECREF(unicode);
   44016             :                         }
   44017           0 :                         if (talloc_str == NULL) {
   44018           0 :                                 PyErr_NoMemory();
   44019           0 :                                 return false;
   44020             :                         }
   44021           0 :                         r->in.computer_name = talloc_str;
   44022             :                 }
   44023             :         }
   44024           0 :         if (py_credential == NULL) {
   44025           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   44026           0 :                 return false;
   44027             :         }
   44028           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   44029           0 :         if (r->in.credential == NULL) {
   44030           0 :                 PyErr_NoMemory();
   44031           0 :                 return false;
   44032             :         }
   44033           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   44034           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   44035           0 :                 PyErr_NoMemory();
   44036           0 :                 return false;
   44037             :         }
   44038           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   44039           0 :         if (py_return_authenticator == NULL) {
   44040           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.return_authenticator");
   44041           0 :                 return false;
   44042             :         }
   44043           0 :         r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
   44044           0 :         if (r->in.return_authenticator == NULL) {
   44045           0 :                 PyErr_NoMemory();
   44046           0 :                 return false;
   44047             :         }
   44048           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   44049           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   44050           0 :                 PyErr_NoMemory();
   44051           0 :                 return false;
   44052             :         }
   44053           0 :         r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   44054           0 :         if (py_query_level == NULL) {
   44055           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.query_level");
   44056           0 :                 return false;
   44057             :         }
   44058             :         {
   44059           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.query_level));
   44060           0 :                 if (PyLong_Check(py_query_level)) {
   44061             :                         unsigned long long test_var;
   44062           0 :                         test_var = PyLong_AsUnsignedLongLong(py_query_level);
   44063           0 :                         if (PyErr_Occurred() != NULL) {
   44064           0 :                                 return false;
   44065             :                         }
   44066           0 :                         if (test_var > uint_max) {
   44067           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   44068             :                                   PyLong_Type.tp_name, uint_max, test_var);
   44069           0 :                                 return false;
   44070             :                         }
   44071           0 :                         r->in.query_level = test_var;
   44072             :                 } else {
   44073           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   44074             :                           PyLong_Type.tp_name);
   44075           0 :                         return false;
   44076             :                 }
   44077             :         }
   44078           0 :         return true;
   44079             : }
   44080             : 
   44081           0 : static PyObject *unpack_py_netr_LogonGetCapabilities_args_out(struct netr_LogonGetCapabilities *r)
   44082             : {
   44083             :         PyObject *result;
   44084             :         PyObject *py_return_authenticator;
   44085             :         PyObject *py_capabilities;
   44086           0 :         result = PyTuple_New(2);
   44087           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   44088           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   44089           0 :         py_capabilities = pyrpc_import_union(&netr_Capabilities_Type, r->out.capabilities, r->in.query_level, r->out.capabilities, "union netr_Capabilities");
   44090           0 :         if (py_capabilities == NULL) {
   44091           0 :                 return NULL;
   44092             :         }
   44093           0 :         PyTuple_SetItem(result, 1, py_capabilities);
   44094           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   44095           0 :                 PyErr_SetNTSTATUS(r->out.result);
   44096           0 :                 return NULL;
   44097             :         }
   44098             : 
   44099           0 :         return result;
   44100             : }
   44101             : 
   44102             : 
   44103           0 : static PyObject *py_netr_LogonGetTrustRid_in_get_server_name(PyObject *obj, void *closure)
   44104             : {
   44105           0 :         struct netr_LogonGetTrustRid *object = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(obj);
   44106             :         PyObject *py_server_name;
   44107           0 :         if (object->in.server_name == NULL) {
   44108           0 :                 Py_RETURN_NONE;
   44109             :         }
   44110           0 :         if (object->in.server_name == NULL) {
   44111           0 :                 py_server_name = Py_None;
   44112           0 :                 Py_INCREF(py_server_name);
   44113             :         } else {
   44114           0 :                 if (object->in.server_name == NULL) {
   44115           0 :                         py_server_name = Py_None;
   44116           0 :                         Py_INCREF(py_server_name);
   44117             :                 } else {
   44118           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   44119             :                 }
   44120             :         }
   44121           0 :         return py_server_name;
   44122             : }
   44123             : 
   44124           0 : static int py_netr_LogonGetTrustRid_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   44125             : {
   44126           0 :         struct netr_LogonGetTrustRid *object = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(py_obj);
   44127           0 :         if (value == NULL) {
   44128           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   44129           0 :                 return -1;
   44130             :         }
   44131           0 :         if (value == Py_None) {
   44132           0 :                 object->in.server_name = NULL;
   44133             :         } else {
   44134           0 :                 object->in.server_name = NULL;
   44135             :                 {
   44136             :                         const char *test_str;
   44137             :                         const char *talloc_str;
   44138           0 :                         PyObject *unicode = NULL;
   44139           0 :                         if (PyUnicode_Check(value)) {
   44140           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   44141           0 :                                 if (unicode == NULL) {
   44142           0 :                                         PyErr_NoMemory();
   44143           0 :                                         return -1;
   44144             :                                 }
   44145           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   44146           0 :                         } else if (PyBytes_Check(value)) {
   44147           0 :                                 test_str = PyBytes_AS_STRING(value);
   44148             :                         } else {
   44149           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   44150           0 :                                 return -1;
   44151             :                         }
   44152           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   44153           0 :                         if (unicode != NULL) {
   44154           0 :                                 Py_DECREF(unicode);
   44155             :                         }
   44156           0 :                         if (talloc_str == NULL) {
   44157           0 :                                 PyErr_NoMemory();
   44158           0 :                                 return -1;
   44159             :                         }
   44160           0 :                         object->in.server_name = talloc_str;
   44161             :                 }
   44162             :         }
   44163           0 :         return 0;
   44164             : }
   44165             : 
   44166           0 : static PyObject *py_netr_LogonGetTrustRid_in_get_domain_name(PyObject *obj, void *closure)
   44167             : {
   44168           0 :         struct netr_LogonGetTrustRid *object = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(obj);
   44169             :         PyObject *py_domain_name;
   44170           0 :         if (object->in.domain_name == NULL) {
   44171           0 :                 Py_RETURN_NONE;
   44172             :         }
   44173           0 :         if (object->in.domain_name == NULL) {
   44174           0 :                 py_domain_name = Py_None;
   44175           0 :                 Py_INCREF(py_domain_name);
   44176             :         } else {
   44177           0 :                 if (object->in.domain_name == NULL) {
   44178           0 :                         py_domain_name = Py_None;
   44179           0 :                         Py_INCREF(py_domain_name);
   44180             :                 } else {
   44181           0 :                         py_domain_name = PyUnicode_Decode(object->in.domain_name, strlen(object->in.domain_name), "utf-8", "ignore");
   44182             :                 }
   44183             :         }
   44184           0 :         return py_domain_name;
   44185             : }
   44186             : 
   44187           0 : static int py_netr_LogonGetTrustRid_in_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   44188             : {
   44189           0 :         struct netr_LogonGetTrustRid *object = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(py_obj);
   44190           0 :         if (value == NULL) {
   44191           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_name");
   44192           0 :                 return -1;
   44193             :         }
   44194           0 :         if (value == Py_None) {
   44195           0 :                 object->in.domain_name = NULL;
   44196             :         } else {
   44197           0 :                 object->in.domain_name = NULL;
   44198             :                 {
   44199             :                         const char *test_str;
   44200             :                         const char *talloc_str;
   44201           0 :                         PyObject *unicode = NULL;
   44202           0 :                         if (PyUnicode_Check(value)) {
   44203           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   44204           0 :                                 if (unicode == NULL) {
   44205           0 :                                         PyErr_NoMemory();
   44206           0 :                                         return -1;
   44207             :                                 }
   44208           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   44209           0 :                         } else if (PyBytes_Check(value)) {
   44210           0 :                                 test_str = PyBytes_AS_STRING(value);
   44211             :                         } else {
   44212           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   44213           0 :                                 return -1;
   44214             :                         }
   44215           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   44216           0 :                         if (unicode != NULL) {
   44217           0 :                                 Py_DECREF(unicode);
   44218             :                         }
   44219           0 :                         if (talloc_str == NULL) {
   44220           0 :                                 PyErr_NoMemory();
   44221           0 :                                 return -1;
   44222             :                         }
   44223           0 :                         object->in.domain_name = talloc_str;
   44224             :                 }
   44225             :         }
   44226           0 :         return 0;
   44227             : }
   44228             : 
   44229           0 : static PyObject *py_netr_LogonGetTrustRid_out_get_rid(PyObject *obj, void *closure)
   44230             : {
   44231           0 :         struct netr_LogonGetTrustRid *object = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(obj);
   44232             :         PyObject *py_rid;
   44233           0 :         if (object->out.rid == NULL) {
   44234           0 :                 Py_RETURN_NONE;
   44235             :         }
   44236           0 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)*object->out.rid);
   44237           0 :         return py_rid;
   44238             : }
   44239             : 
   44240           0 : static int py_netr_LogonGetTrustRid_out_set_rid(PyObject *py_obj, PyObject *value, void *closure)
   44241             : {
   44242           0 :         struct netr_LogonGetTrustRid *object = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(py_obj);
   44243           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.rid));
   44244           0 :         if (value == NULL) {
   44245           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.rid");
   44246           0 :                 return -1;
   44247             :         }
   44248           0 :         object->out.rid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.rid);
   44249           0 :         if (object->out.rid == NULL) {
   44250           0 :                 PyErr_NoMemory();
   44251           0 :                 return -1;
   44252             :         }
   44253             :         {
   44254           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.rid));
   44255           0 :                 if (PyLong_Check(value)) {
   44256             :                         unsigned long long test_var;
   44257           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   44258           0 :                         if (PyErr_Occurred() != NULL) {
   44259           0 :                                 return -1;
   44260             :                         }
   44261           0 :                         if (test_var > uint_max) {
   44262           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   44263             :                                   PyLong_Type.tp_name, uint_max, test_var);
   44264           0 :                                 return -1;
   44265             :                         }
   44266           0 :                         *object->out.rid = test_var;
   44267             :                 } else {
   44268           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   44269             :                           PyLong_Type.tp_name);
   44270           0 :                         return -1;
   44271             :                 }
   44272             :         }
   44273           0 :         return 0;
   44274             : }
   44275             : 
   44276           0 : static PyObject *py_netr_LogonGetTrustRid_get_result(PyObject *obj, void *closure)
   44277             : {
   44278           0 :         struct netr_LogonGetTrustRid *object = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(obj);
   44279             :         PyObject *py_result;
   44280           0 :         py_result = PyErr_FromWERROR(object->out.result);
   44281           0 :         return py_result;
   44282             : }
   44283             : 
   44284           0 : static int py_netr_LogonGetTrustRid_set_result(PyObject *py_obj, PyObject *value, void *closure)
   44285             : {
   44286           0 :         struct netr_LogonGetTrustRid *object = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(py_obj);
   44287           0 :         if (value == NULL) {
   44288           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   44289           0 :                 return -1;
   44290             :         }
   44291           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   44292           0 :         return 0;
   44293             : }
   44294             : 
   44295             : static PyGetSetDef py_netr_LogonGetTrustRid_getsetters[] = {
   44296             :         {
   44297             :                 .name = discard_const_p(char, "in_server_name"),
   44298             :                 .get = py_netr_LogonGetTrustRid_in_get_server_name,
   44299             :                 .set = py_netr_LogonGetTrustRid_in_set_server_name,
   44300             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   44301             :         },
   44302             :         {
   44303             :                 .name = discard_const_p(char, "in_domain_name"),
   44304             :                 .get = py_netr_LogonGetTrustRid_in_get_domain_name,
   44305             :                 .set = py_netr_LogonGetTrustRid_in_set_domain_name,
   44306             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   44307             :         },
   44308             :         {
   44309             :                 .name = discard_const_p(char, "out_rid"),
   44310             :                 .get = py_netr_LogonGetTrustRid_out_get_rid,
   44311             :                 .set = py_netr_LogonGetTrustRid_out_set_rid,
   44312             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   44313             :         },
   44314             :         {
   44315             :                 .name = discard_const_p(char, "result"),
   44316             :                 .get = py_netr_LogonGetTrustRid_get_result,
   44317             :                 .set = py_netr_LogonGetTrustRid_set_result,
   44318             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   44319             :         },
   44320             :         { .name = NULL }
   44321             : };
   44322             : 
   44323           0 : static PyObject *py_netr_LogonGetTrustRid_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   44324             : {
   44325           0 :         PyObject *self = pytalloc_new(struct netr_LogonGetTrustRid, type);
   44326           0 :         struct netr_LogonGetTrustRid *_self = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(self);
   44327           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   44328           0 :         _self->out.rid = talloc_zero(mem_ctx, uint32_t);
   44329           0 :         return self;
   44330             : }
   44331             : 
   44332           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   44333             : {
   44334             : 
   44335             : 
   44336           0 :         return PyLong_FromLong(23);
   44337             : }
   44338             : 
   44339           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   44340             : {
   44341           0 :         const struct ndr_interface_call *call = NULL;
   44342           0 :         struct netr_LogonGetTrustRid *object = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(py_obj);
   44343           0 :         PyObject *ret = NULL;
   44344           0 :         struct ndr_push *push = NULL;
   44345             :         DATA_BLOB blob;
   44346             :         enum ndr_err_code err;
   44347             : 
   44348           0 :         if (ndr_table_netlogon.num_calls < 24) {
   44349           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetTrustRid_ndr_pack");
   44350           0 :                 return NULL;
   44351             :         }
   44352           0 :         call = &ndr_table_netlogon.calls[23];
   44353             : 
   44354           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   44355           0 :         if (push == NULL) {
   44356           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   44357           0 :                 return NULL;
   44358             :         }
   44359             : 
   44360           0 :         push->flags |= ndr_push_flags;
   44361             : 
   44362           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   44363           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   44364           0 :                 TALLOC_FREE(push);
   44365           0 :                 PyErr_SetNdrError(err);
   44366           0 :                 return NULL;
   44367             :         }
   44368           0 :         blob = ndr_push_blob(push);
   44369           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   44370           0 :         TALLOC_FREE(push);
   44371           0 :         return ret;
   44372             : }
   44373             : 
   44374           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44375             : {
   44376           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   44377           0 :         PyObject *bigendian_obj = NULL;
   44378           0 :         PyObject *ndr64_obj = NULL;
   44379           0 :         uint32_t ndr_push_flags = 0;
   44380             : 
   44381           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   44382             :                 discard_const_p(char *, kwnames),
   44383             :                 &bigendian_obj,
   44384             :                 &ndr64_obj)) {
   44385           0 :                 return NULL;
   44386             :         }
   44387             : 
   44388           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44389           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   44390             :         }
   44391           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44392           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   44393             :         }
   44394             : 
   44395           0 :         return py_netr_LogonGetTrustRid_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   44396             : }
   44397             : 
   44398           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44399             : {
   44400           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   44401           0 :         PyObject *bigendian_obj = NULL;
   44402           0 :         PyObject *ndr64_obj = NULL;
   44403           0 :         uint32_t ndr_push_flags = 0;
   44404             : 
   44405           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   44406             :                 discard_const_p(char *, kwnames),
   44407             :                 &bigendian_obj,
   44408             :                 &ndr64_obj)) {
   44409           0 :                 return NULL;
   44410             :         }
   44411             : 
   44412           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44413           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   44414             :         }
   44415           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44416           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   44417             :         }
   44418             : 
   44419           0 :         return py_netr_LogonGetTrustRid_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   44420             : }
   44421             : 
   44422           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   44423             : {
   44424           0 :         const struct ndr_interface_call *call = NULL;
   44425           0 :         struct netr_LogonGetTrustRid *object = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(py_obj);
   44426           0 :         struct ndr_pull *pull = NULL;
   44427             :         enum ndr_err_code err;
   44428             : 
   44429           0 :         if (ndr_table_netlogon.num_calls < 24) {
   44430           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetTrustRid_ndr_unpack");
   44431           0 :                 return NULL;
   44432             :         }
   44433           0 :         call = &ndr_table_netlogon.calls[23];
   44434             : 
   44435           0 :         pull = ndr_pull_init_blob(blob, object);
   44436           0 :         if (pull == NULL) {
   44437           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   44438           0 :                 return NULL;
   44439             :         }
   44440             : 
   44441           0 :         pull->flags |= ndr_pull_flags;
   44442             : 
   44443           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   44444           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   44445           0 :                 TALLOC_FREE(pull);
   44446           0 :                 PyErr_SetNdrError(err);
   44447           0 :                 return NULL;
   44448             :         }
   44449           0 :         if (!allow_remaining) {
   44450             :                 uint32_t highest_ofs;
   44451             : 
   44452           0 :                 if (pull->offset > pull->relative_highest_offset) {
   44453           0 :                         highest_ofs = pull->offset;
   44454             :                 } else {
   44455           0 :                         highest_ofs = pull->relative_highest_offset;
   44456             :                 }
   44457           0 :                 if (highest_ofs < pull->data_size) {
   44458           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   44459             :                                 "not all bytes consumed ofs[%u] size[%u]",
   44460             :                                 highest_ofs, pull->data_size);
   44461           0 :                         TALLOC_FREE(pull);
   44462           0 :                         PyErr_SetNdrError(err);
   44463           0 :                         return NULL;
   44464             :                 }
   44465             :         }
   44466             : 
   44467           0 :         TALLOC_FREE(pull);
   44468           0 :         Py_RETURN_NONE;
   44469             : }
   44470             : 
   44471           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44472             : {
   44473             :         DATA_BLOB blob;
   44474           0 :         Py_ssize_t blob_length = 0;
   44475           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   44476           0 :         PyObject *bigendian_obj = NULL;
   44477           0 :         PyObject *ndr64_obj = NULL;
   44478           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   44479           0 :         PyObject *allow_remaining_obj = NULL;
   44480           0 :         bool allow_remaining = false;
   44481             : 
   44482           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   44483             :                 discard_const_p(char *, kwnames),
   44484             :                 &blob.data, &blob_length,
   44485             :                 &bigendian_obj,
   44486             :                 &ndr64_obj,
   44487             :                 &allow_remaining_obj)) {
   44488           0 :                 return NULL;
   44489             :         }
   44490           0 :         blob.length = blob_length;
   44491             : 
   44492           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44493           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   44494             :         }
   44495           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44496           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   44497             :         }
   44498             : 
   44499           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   44500           0 :                 allow_remaining = true;
   44501             :         }
   44502             : 
   44503           0 :         return py_netr_LogonGetTrustRid_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   44504             : }
   44505             : 
   44506           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44507             : {
   44508             :         DATA_BLOB blob;
   44509           0 :         Py_ssize_t blob_length = 0;
   44510           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   44511           0 :         PyObject *bigendian_obj = NULL;
   44512           0 :         PyObject *ndr64_obj = NULL;
   44513           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   44514           0 :         PyObject *allow_remaining_obj = NULL;
   44515           0 :         bool allow_remaining = false;
   44516             : 
   44517           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   44518             :                 discard_const_p(char *, kwnames),
   44519             :                 &blob.data, &blob_length,
   44520             :                 &bigendian_obj,
   44521             :                 &ndr64_obj,
   44522             :                 &allow_remaining_obj)) {
   44523           0 :                 return NULL;
   44524             :         }
   44525           0 :         blob.length = blob_length;
   44526             : 
   44527           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44528           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   44529             :         }
   44530           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44531           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   44532             :         }
   44533             : 
   44534           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   44535           0 :                 allow_remaining = true;
   44536             :         }
   44537             : 
   44538           0 :         return py_netr_LogonGetTrustRid_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   44539             : }
   44540             : 
   44541           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   44542             : {
   44543           0 :         const struct ndr_interface_call *call = NULL;
   44544           0 :         struct netr_LogonGetTrustRid *object = (struct netr_LogonGetTrustRid *)pytalloc_get_ptr(py_obj);
   44545             :         PyObject *ret;
   44546             :         char *retstr;
   44547             : 
   44548           0 :         if (ndr_table_netlogon.num_calls < 24) {
   44549           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetTrustRid_ndr_print");
   44550           0 :                 return NULL;
   44551             :         }
   44552           0 :         call = &ndr_table_netlogon.calls[23];
   44553             : 
   44554           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   44555           0 :         ret = PyUnicode_FromString(retstr);
   44556           0 :         TALLOC_FREE(retstr);
   44557             : 
   44558           0 :         return ret;
   44559             : }
   44560             : 
   44561           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   44562             : {
   44563           0 :         return py_netr_LogonGetTrustRid_ndr_print(py_obj, "netr_LogonGetTrustRid_in", NDR_IN);
   44564             : }
   44565             : 
   44566           0 : static PyObject *py_netr_LogonGetTrustRid_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   44567             : {
   44568           0 :         return py_netr_LogonGetTrustRid_ndr_print(py_obj, "netr_LogonGetTrustRid_out", NDR_OUT);
   44569             : }
   44570             : 
   44571             : static PyMethodDef py_netr_LogonGetTrustRid_methods[] = {
   44572             :         { "opnum", (PyCFunction)py_netr_LogonGetTrustRid_ndr_opnum, METH_NOARGS|METH_CLASS,
   44573             :                 "netlogon.netr_LogonGetTrustRid.opnum() -> 23 (0x17) " },
   44574             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetTrustRid_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   44575             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   44576             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetTrustRid_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   44577             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   44578             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetTrustRid_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   44579             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   44580             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetTrustRid_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   44581             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   44582             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonGetTrustRid_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   44583             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonGetTrustRid_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   44584             :         { NULL, NULL, 0, NULL }
   44585             : };
   44586             : 
   44587             : 
   44588             : static PyTypeObject netr_LogonGetTrustRid_Type = {
   44589             :         PyVarObject_HEAD_INIT(NULL, 0)
   44590             :         .tp_name = "netlogon.netr_LogonGetTrustRid",
   44591             :         .tp_getset = py_netr_LogonGetTrustRid_getsetters,
   44592             :         .tp_methods = py_netr_LogonGetTrustRid_methods,
   44593             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   44594             :         .tp_new = py_netr_LogonGetTrustRid_new,
   44595             : };
   44596             : 
   44597           0 : static bool pack_py_netr_LogonGetTrustRid_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonGetTrustRid *r)
   44598             : {
   44599             :         PyObject *py_server_name;
   44600             :         PyObject *py_domain_name;
   44601           0 :         const char *kwnames[] = {
   44602             :                 "server_name", "domain_name", NULL
   44603             :         };
   44604             : 
   44605           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:netr_LogonGetTrustRid", discard_const_p(char *, kwnames), &py_server_name, &py_domain_name)) {
   44606           0 :                 return false;
   44607             :         }
   44608             : 
   44609           0 :         if (py_server_name == NULL) {
   44610           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   44611           0 :                 return false;
   44612             :         }
   44613           0 :         if (py_server_name == Py_None) {
   44614           0 :                 r->in.server_name = NULL;
   44615             :         } else {
   44616           0 :                 r->in.server_name = NULL;
   44617             :                 {
   44618             :                         const char *test_str;
   44619             :                         const char *talloc_str;
   44620           0 :                         PyObject *unicode = NULL;
   44621           0 :                         if (PyUnicode_Check(py_server_name)) {
   44622           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   44623           0 :                                 if (unicode == NULL) {
   44624           0 :                                         PyErr_NoMemory();
   44625           0 :                                         return false;
   44626             :                                 }
   44627           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   44628           0 :                         } else if (PyBytes_Check(py_server_name)) {
   44629           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   44630             :                         } else {
   44631           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   44632           0 :                                 return false;
   44633             :                         }
   44634           0 :                         talloc_str = talloc_strdup(r, test_str);
   44635           0 :                         if (unicode != NULL) {
   44636           0 :                                 Py_DECREF(unicode);
   44637             :                         }
   44638           0 :                         if (talloc_str == NULL) {
   44639           0 :                                 PyErr_NoMemory();
   44640           0 :                                 return false;
   44641             :                         }
   44642           0 :                         r->in.server_name = talloc_str;
   44643             :                 }
   44644             :         }
   44645           0 :         if (py_domain_name == NULL) {
   44646           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_name");
   44647           0 :                 return false;
   44648             :         }
   44649           0 :         if (py_domain_name == Py_None) {
   44650           0 :                 r->in.domain_name = NULL;
   44651             :         } else {
   44652           0 :                 r->in.domain_name = NULL;
   44653             :                 {
   44654             :                         const char *test_str;
   44655             :                         const char *talloc_str;
   44656           0 :                         PyObject *unicode = NULL;
   44657           0 :                         if (PyUnicode_Check(py_domain_name)) {
   44658           0 :                                 unicode = PyUnicode_AsEncodedString(py_domain_name, "utf-8", "ignore");
   44659           0 :                                 if (unicode == NULL) {
   44660           0 :                                         PyErr_NoMemory();
   44661           0 :                                         return false;
   44662             :                                 }
   44663           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   44664           0 :                         } else if (PyBytes_Check(py_domain_name)) {
   44665           0 :                                 test_str = PyBytes_AS_STRING(py_domain_name);
   44666             :                         } else {
   44667           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain_name)->tp_name);
   44668           0 :                                 return false;
   44669             :                         }
   44670           0 :                         talloc_str = talloc_strdup(r, test_str);
   44671           0 :                         if (unicode != NULL) {
   44672           0 :                                 Py_DECREF(unicode);
   44673             :                         }
   44674           0 :                         if (talloc_str == NULL) {
   44675           0 :                                 PyErr_NoMemory();
   44676           0 :                                 return false;
   44677             :                         }
   44678           0 :                         r->in.domain_name = talloc_str;
   44679             :                 }
   44680             :         }
   44681           0 :         return true;
   44682             : }
   44683             : 
   44684           0 : static PyObject *unpack_py_netr_LogonGetTrustRid_args_out(struct netr_LogonGetTrustRid *r)
   44685             : {
   44686             :         PyObject *result;
   44687             :         PyObject *py_rid;
   44688           0 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)*r->out.rid);
   44689           0 :         result = py_rid;
   44690           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   44691           0 :                 PyErr_SetWERROR(r->out.result);
   44692           0 :                 return NULL;
   44693             :         }
   44694             : 
   44695           0 :         return result;
   44696             : }
   44697             : 
   44698             : 
   44699           0 : static PyObject *py_netr_ServerAuthenticate3_in_get_server_name(PyObject *obj, void *closure)
   44700             : {
   44701           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(obj);
   44702             :         PyObject *py_server_name;
   44703           0 :         if (object->in.server_name == NULL) {
   44704           0 :                 Py_RETURN_NONE;
   44705             :         }
   44706           0 :         if (object->in.server_name == NULL) {
   44707           0 :                 py_server_name = Py_None;
   44708           0 :                 Py_INCREF(py_server_name);
   44709             :         } else {
   44710           0 :                 if (object->in.server_name == NULL) {
   44711           0 :                         py_server_name = Py_None;
   44712           0 :                         Py_INCREF(py_server_name);
   44713             :                 } else {
   44714           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   44715             :                 }
   44716             :         }
   44717           0 :         return py_server_name;
   44718             : }
   44719             : 
   44720           0 : static int py_netr_ServerAuthenticate3_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   44721             : {
   44722           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   44723           0 :         if (value == NULL) {
   44724           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   44725           0 :                 return -1;
   44726             :         }
   44727           0 :         if (value == Py_None) {
   44728           0 :                 object->in.server_name = NULL;
   44729             :         } else {
   44730           0 :                 object->in.server_name = NULL;
   44731             :                 {
   44732             :                         const char *test_str;
   44733             :                         const char *talloc_str;
   44734           0 :                         PyObject *unicode = NULL;
   44735           0 :                         if (PyUnicode_Check(value)) {
   44736           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   44737           0 :                                 if (unicode == NULL) {
   44738           0 :                                         PyErr_NoMemory();
   44739           0 :                                         return -1;
   44740             :                                 }
   44741           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   44742           0 :                         } else if (PyBytes_Check(value)) {
   44743           0 :                                 test_str = PyBytes_AS_STRING(value);
   44744             :                         } else {
   44745           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   44746           0 :                                 return -1;
   44747             :                         }
   44748           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   44749           0 :                         if (unicode != NULL) {
   44750           0 :                                 Py_DECREF(unicode);
   44751             :                         }
   44752           0 :                         if (talloc_str == NULL) {
   44753           0 :                                 PyErr_NoMemory();
   44754           0 :                                 return -1;
   44755             :                         }
   44756           0 :                         object->in.server_name = talloc_str;
   44757             :                 }
   44758             :         }
   44759           0 :         return 0;
   44760             : }
   44761             : 
   44762           0 : static PyObject *py_netr_ServerAuthenticate3_in_get_account_name(PyObject *obj, void *closure)
   44763             : {
   44764           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(obj);
   44765             :         PyObject *py_account_name;
   44766           0 :         if (object->in.account_name == NULL) {
   44767           0 :                 Py_RETURN_NONE;
   44768             :         }
   44769           0 :         if (object->in.account_name == NULL) {
   44770           0 :                 py_account_name = Py_None;
   44771           0 :                 Py_INCREF(py_account_name);
   44772             :         } else {
   44773           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   44774             :         }
   44775           0 :         return py_account_name;
   44776             : }
   44777             : 
   44778           0 : static int py_netr_ServerAuthenticate3_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   44779             : {
   44780           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   44781           0 :         if (value == NULL) {
   44782           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.account_name");
   44783           0 :                 return -1;
   44784             :         }
   44785           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   44786           0 :         if (object->in.account_name == NULL) {
   44787           0 :                 PyErr_NoMemory();
   44788           0 :                 return -1;
   44789             :         }
   44790             :         {
   44791             :                 const char *test_str;
   44792             :                 const char *talloc_str;
   44793           0 :                 PyObject *unicode = NULL;
   44794           0 :                 if (PyUnicode_Check(value)) {
   44795           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   44796           0 :                         if (unicode == NULL) {
   44797           0 :                                 PyErr_NoMemory();
   44798           0 :                                 return -1;
   44799             :                         }
   44800           0 :                         test_str = PyBytes_AS_STRING(unicode);
   44801           0 :                 } else if (PyBytes_Check(value)) {
   44802           0 :                         test_str = PyBytes_AS_STRING(value);
   44803             :                 } else {
   44804           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   44805           0 :                         return -1;
   44806             :                 }
   44807           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   44808           0 :                 if (unicode != NULL) {
   44809           0 :                         Py_DECREF(unicode);
   44810             :                 }
   44811           0 :                 if (talloc_str == NULL) {
   44812           0 :                         PyErr_NoMemory();
   44813           0 :                         return -1;
   44814             :                 }
   44815           0 :                 object->in.account_name = talloc_str;
   44816             :         }
   44817           0 :         return 0;
   44818             : }
   44819             : 
   44820           0 : static PyObject *py_netr_ServerAuthenticate3_in_get_secure_channel_type(PyObject *obj, void *closure)
   44821             : {
   44822           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(obj);
   44823             :         PyObject *py_secure_channel_type;
   44824           0 :         py_secure_channel_type = PyLong_FromLong((uint16_t)object->in.secure_channel_type);
   44825           0 :         return py_secure_channel_type;
   44826             : }
   44827             : 
   44828           0 : static int py_netr_ServerAuthenticate3_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
   44829             : {
   44830           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   44831           0 :         if (value == NULL) {
   44832           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.secure_channel_type");
   44833           0 :                 return -1;
   44834             :         }
   44835             :         {
   44836           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
   44837           0 :                 if (PyLong_Check(value)) {
   44838             :                         unsigned long long test_var;
   44839           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   44840           0 :                         if (PyErr_Occurred() != NULL) {
   44841           0 :                                 return -1;
   44842             :                         }
   44843           0 :                         if (test_var > uint_max) {
   44844           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   44845             :                                   PyLong_Type.tp_name, uint_max, test_var);
   44846           0 :                                 return -1;
   44847             :                         }
   44848           0 :                         object->in.secure_channel_type = test_var;
   44849             :                 } else {
   44850           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   44851             :                           PyLong_Type.tp_name);
   44852           0 :                         return -1;
   44853             :                 }
   44854             :         }
   44855           0 :         return 0;
   44856             : }
   44857             : 
   44858           0 : static PyObject *py_netr_ServerAuthenticate3_in_get_computer_name(PyObject *obj, void *closure)
   44859             : {
   44860           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(obj);
   44861             :         PyObject *py_computer_name;
   44862           0 :         if (object->in.computer_name == NULL) {
   44863           0 :                 Py_RETURN_NONE;
   44864             :         }
   44865           0 :         if (object->in.computer_name == NULL) {
   44866           0 :                 py_computer_name = Py_None;
   44867           0 :                 Py_INCREF(py_computer_name);
   44868             :         } else {
   44869           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   44870             :         }
   44871           0 :         return py_computer_name;
   44872             : }
   44873             : 
   44874           0 : static int py_netr_ServerAuthenticate3_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   44875             : {
   44876           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   44877           0 :         if (value == NULL) {
   44878           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   44879           0 :                 return -1;
   44880             :         }
   44881           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   44882           0 :         if (object->in.computer_name == NULL) {
   44883           0 :                 PyErr_NoMemory();
   44884           0 :                 return -1;
   44885             :         }
   44886             :         {
   44887             :                 const char *test_str;
   44888             :                 const char *talloc_str;
   44889           0 :                 PyObject *unicode = NULL;
   44890           0 :                 if (PyUnicode_Check(value)) {
   44891           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   44892           0 :                         if (unicode == NULL) {
   44893           0 :                                 PyErr_NoMemory();
   44894           0 :                                 return -1;
   44895             :                         }
   44896           0 :                         test_str = PyBytes_AS_STRING(unicode);
   44897           0 :                 } else if (PyBytes_Check(value)) {
   44898           0 :                         test_str = PyBytes_AS_STRING(value);
   44899             :                 } else {
   44900           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   44901           0 :                         return -1;
   44902             :                 }
   44903           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   44904           0 :                 if (unicode != NULL) {
   44905           0 :                         Py_DECREF(unicode);
   44906             :                 }
   44907           0 :                 if (talloc_str == NULL) {
   44908           0 :                         PyErr_NoMemory();
   44909           0 :                         return -1;
   44910             :                 }
   44911           0 :                 object->in.computer_name = talloc_str;
   44912             :         }
   44913           0 :         return 0;
   44914             : }
   44915             : 
   44916           0 : static PyObject *py_netr_ServerAuthenticate3_in_get_credentials(PyObject *obj, void *closure)
   44917             : {
   44918           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(obj);
   44919             :         PyObject *py_credentials;
   44920           0 :         if (object->in.credentials == NULL) {
   44921           0 :                 Py_RETURN_NONE;
   44922             :         }
   44923           0 :         py_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->in.credentials, object->in.credentials);
   44924           0 :         return py_credentials;
   44925             : }
   44926             : 
   44927           0 : static int py_netr_ServerAuthenticate3_in_set_credentials(PyObject *py_obj, PyObject *value, void *closure)
   44928             : {
   44929           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   44930           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credentials));
   44931           0 :         if (value == NULL) {
   44932           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credentials");
   44933           0 :                 return -1;
   44934             :         }
   44935           0 :         object->in.credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credentials);
   44936           0 :         if (object->in.credentials == NULL) {
   44937           0 :                 PyErr_NoMemory();
   44938           0 :                 return -1;
   44939             :         }
   44940           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
   44941           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   44942           0 :                 PyErr_NoMemory();
   44943           0 :                 return -1;
   44944             :         }
   44945           0 :         object->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
   44946           0 :         return 0;
   44947             : }
   44948             : 
   44949           0 : static PyObject *py_netr_ServerAuthenticate3_out_get_return_credentials(PyObject *obj, void *closure)
   44950             : {
   44951           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(obj);
   44952             :         PyObject *py_return_credentials;
   44953           0 :         if (object->out.return_credentials == NULL) {
   44954           0 :                 Py_RETURN_NONE;
   44955             :         }
   44956           0 :         py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, object->out.return_credentials, object->out.return_credentials);
   44957           0 :         return py_return_credentials;
   44958             : }
   44959             : 
   44960           0 : static int py_netr_ServerAuthenticate3_out_set_return_credentials(PyObject *py_obj, PyObject *value, void *closure)
   44961             : {
   44962           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   44963           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_credentials));
   44964           0 :         if (value == NULL) {
   44965           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_credentials");
   44966           0 :                 return -1;
   44967             :         }
   44968           0 :         object->out.return_credentials = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_credentials);
   44969           0 :         if (object->out.return_credentials == NULL) {
   44970           0 :                 PyErr_NoMemory();
   44971           0 :                 return -1;
   44972             :         }
   44973           0 :         PY_CHECK_TYPE(&netr_Credential_Type, value, return -1;);
   44974           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   44975           0 :                 PyErr_NoMemory();
   44976           0 :                 return -1;
   44977             :         }
   44978           0 :         object->out.return_credentials = (struct netr_Credential *)pytalloc_get_ptr(value);
   44979           0 :         return 0;
   44980             : }
   44981             : 
   44982           0 : static PyObject *py_netr_ServerAuthenticate3_in_get_negotiate_flags(PyObject *obj, void *closure)
   44983             : {
   44984           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(obj);
   44985             :         PyObject *py_negotiate_flags;
   44986           0 :         if (object->in.negotiate_flags == NULL) {
   44987           0 :                 Py_RETURN_NONE;
   44988             :         }
   44989           0 :         py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)*object->in.negotiate_flags);
   44990           0 :         return py_negotiate_flags;
   44991             : }
   44992             : 
   44993           0 : static int py_netr_ServerAuthenticate3_in_set_negotiate_flags(PyObject *py_obj, PyObject *value, void *closure)
   44994             : {
   44995           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   44996           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.negotiate_flags));
   44997           0 :         if (value == NULL) {
   44998           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.negotiate_flags");
   44999           0 :                 return -1;
   45000             :         }
   45001           0 :         object->in.negotiate_flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.negotiate_flags);
   45002           0 :         if (object->in.negotiate_flags == NULL) {
   45003           0 :                 PyErr_NoMemory();
   45004           0 :                 return -1;
   45005             :         }
   45006             :         {
   45007           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.negotiate_flags));
   45008           0 :                 if (PyLong_Check(value)) {
   45009             :                         unsigned long long test_var;
   45010           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   45011           0 :                         if (PyErr_Occurred() != NULL) {
   45012           0 :                                 return -1;
   45013             :                         }
   45014           0 :                         if (test_var > uint_max) {
   45015           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   45016             :                                   PyLong_Type.tp_name, uint_max, test_var);
   45017           0 :                                 return -1;
   45018             :                         }
   45019           0 :                         *object->in.negotiate_flags = test_var;
   45020             :                 } else {
   45021           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   45022             :                           PyLong_Type.tp_name);
   45023           0 :                         return -1;
   45024             :                 }
   45025             :         }
   45026           0 :         return 0;
   45027             : }
   45028             : 
   45029           0 : static PyObject *py_netr_ServerAuthenticate3_out_get_negotiate_flags(PyObject *obj, void *closure)
   45030             : {
   45031           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(obj);
   45032             :         PyObject *py_negotiate_flags;
   45033           0 :         if (object->out.negotiate_flags == NULL) {
   45034           0 :                 Py_RETURN_NONE;
   45035             :         }
   45036           0 :         py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)*object->out.negotiate_flags);
   45037           0 :         return py_negotiate_flags;
   45038             : }
   45039             : 
   45040           0 : static int py_netr_ServerAuthenticate3_out_set_negotiate_flags(PyObject *py_obj, PyObject *value, void *closure)
   45041             : {
   45042           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   45043           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.negotiate_flags));
   45044           0 :         if (value == NULL) {
   45045           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.negotiate_flags");
   45046           0 :                 return -1;
   45047             :         }
   45048           0 :         object->out.negotiate_flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.negotiate_flags);
   45049           0 :         if (object->out.negotiate_flags == NULL) {
   45050           0 :                 PyErr_NoMemory();
   45051           0 :                 return -1;
   45052             :         }
   45053             :         {
   45054           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.negotiate_flags));
   45055           0 :                 if (PyLong_Check(value)) {
   45056             :                         unsigned long long test_var;
   45057           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   45058           0 :                         if (PyErr_Occurred() != NULL) {
   45059           0 :                                 return -1;
   45060             :                         }
   45061           0 :                         if (test_var > uint_max) {
   45062           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   45063             :                                   PyLong_Type.tp_name, uint_max, test_var);
   45064           0 :                                 return -1;
   45065             :                         }
   45066           0 :                         *object->out.negotiate_flags = test_var;
   45067             :                 } else {
   45068           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   45069             :                           PyLong_Type.tp_name);
   45070           0 :                         return -1;
   45071             :                 }
   45072             :         }
   45073           0 :         return 0;
   45074             : }
   45075             : 
   45076           0 : static PyObject *py_netr_ServerAuthenticate3_out_get_rid(PyObject *obj, void *closure)
   45077             : {
   45078           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(obj);
   45079             :         PyObject *py_rid;
   45080           0 :         if (object->out.rid == NULL) {
   45081           0 :                 Py_RETURN_NONE;
   45082             :         }
   45083           0 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)*object->out.rid);
   45084           0 :         return py_rid;
   45085             : }
   45086             : 
   45087           0 : static int py_netr_ServerAuthenticate3_out_set_rid(PyObject *py_obj, PyObject *value, void *closure)
   45088             : {
   45089           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   45090           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.rid));
   45091           0 :         if (value == NULL) {
   45092           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.rid");
   45093           0 :                 return -1;
   45094             :         }
   45095           0 :         object->out.rid = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.rid);
   45096           0 :         if (object->out.rid == NULL) {
   45097           0 :                 PyErr_NoMemory();
   45098           0 :                 return -1;
   45099             :         }
   45100             :         {
   45101           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.rid));
   45102           0 :                 if (PyLong_Check(value)) {
   45103             :                         unsigned long long test_var;
   45104           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   45105           0 :                         if (PyErr_Occurred() != NULL) {
   45106           0 :                                 return -1;
   45107             :                         }
   45108           0 :                         if (test_var > uint_max) {
   45109           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   45110             :                                   PyLong_Type.tp_name, uint_max, test_var);
   45111           0 :                                 return -1;
   45112             :                         }
   45113           0 :                         *object->out.rid = test_var;
   45114             :                 } else {
   45115           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   45116             :                           PyLong_Type.tp_name);
   45117           0 :                         return -1;
   45118             :                 }
   45119             :         }
   45120           0 :         return 0;
   45121             : }
   45122             : 
   45123           0 : static PyObject *py_netr_ServerAuthenticate3_get_result(PyObject *obj, void *closure)
   45124             : {
   45125           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(obj);
   45126             :         PyObject *py_result;
   45127           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   45128           0 :         return py_result;
   45129             : }
   45130             : 
   45131           0 : static int py_netr_ServerAuthenticate3_set_result(PyObject *py_obj, PyObject *value, void *closure)
   45132             : {
   45133           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   45134           0 :         if (value == NULL) {
   45135           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   45136           0 :                 return -1;
   45137             :         }
   45138           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   45139           0 :         return 0;
   45140             : }
   45141             : 
   45142             : static PyGetSetDef py_netr_ServerAuthenticate3_getsetters[] = {
   45143             :         {
   45144             :                 .name = discard_const_p(char, "in_server_name"),
   45145             :                 .get = py_netr_ServerAuthenticate3_in_get_server_name,
   45146             :                 .set = py_netr_ServerAuthenticate3_in_set_server_name,
   45147             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   45148             :         },
   45149             :         {
   45150             :                 .name = discard_const_p(char, "in_account_name"),
   45151             :                 .get = py_netr_ServerAuthenticate3_in_get_account_name,
   45152             :                 .set = py_netr_ServerAuthenticate3_in_set_account_name,
   45153             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   45154             :         },
   45155             :         {
   45156             :                 .name = discard_const_p(char, "in_secure_channel_type"),
   45157             :                 .get = py_netr_ServerAuthenticate3_in_get_secure_channel_type,
   45158             :                 .set = py_netr_ServerAuthenticate3_in_set_secure_channel_type,
   45159             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
   45160             :         },
   45161             :         {
   45162             :                 .name = discard_const_p(char, "in_computer_name"),
   45163             :                 .get = py_netr_ServerAuthenticate3_in_get_computer_name,
   45164             :                 .set = py_netr_ServerAuthenticate3_in_set_computer_name,
   45165             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   45166             :         },
   45167             :         {
   45168             :                 .name = discard_const_p(char, "in_credentials"),
   45169             :                 .get = py_netr_ServerAuthenticate3_in_get_credentials,
   45170             :                 .set = py_netr_ServerAuthenticate3_in_set_credentials,
   45171             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
   45172             :         },
   45173             :         {
   45174             :                 .name = discard_const_p(char, "out_return_credentials"),
   45175             :                 .get = py_netr_ServerAuthenticate3_out_get_return_credentials,
   45176             :                 .set = py_netr_ServerAuthenticate3_out_set_return_credentials,
   45177             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Credential")
   45178             :         },
   45179             :         {
   45180             :                 .name = discard_const_p(char, "in_negotiate_flags"),
   45181             :                 .get = py_netr_ServerAuthenticate3_in_get_negotiate_flags,
   45182             :                 .set = py_netr_ServerAuthenticate3_in_set_negotiate_flags,
   45183             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_NegotiateFlags")
   45184             :         },
   45185             :         {
   45186             :                 .name = discard_const_p(char, "out_negotiate_flags"),
   45187             :                 .get = py_netr_ServerAuthenticate3_out_get_negotiate_flags,
   45188             :                 .set = py_netr_ServerAuthenticate3_out_set_negotiate_flags,
   45189             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_NegotiateFlags")
   45190             :         },
   45191             :         {
   45192             :                 .name = discard_const_p(char, "out_rid"),
   45193             :                 .get = py_netr_ServerAuthenticate3_out_get_rid,
   45194             :                 .set = py_netr_ServerAuthenticate3_out_set_rid,
   45195             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   45196             :         },
   45197             :         {
   45198             :                 .name = discard_const_p(char, "result"),
   45199             :                 .get = py_netr_ServerAuthenticate3_get_result,
   45200             :                 .set = py_netr_ServerAuthenticate3_set_result,
   45201             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   45202             :         },
   45203             :         { .name = NULL }
   45204             : };
   45205             : 
   45206           0 : static PyObject *py_netr_ServerAuthenticate3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   45207             : {
   45208           0 :         PyObject *self = pytalloc_new(struct netr_ServerAuthenticate3, type);
   45209           0 :         struct netr_ServerAuthenticate3 *_self = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(self);
   45210           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   45211           0 :         _self->in.credentials = talloc_zero(mem_ctx, struct netr_Credential);
   45212           0 :         _self->out.return_credentials = talloc_zero(mem_ctx, struct netr_Credential);
   45213           0 :         _self->in.negotiate_flags = talloc_zero(mem_ctx, uint32_t);
   45214           0 :         _self->out.negotiate_flags = talloc_zero(mem_ctx, uint32_t);
   45215           0 :         _self->out.rid = talloc_zero(mem_ctx, uint32_t);
   45216           0 :         return self;
   45217             : }
   45218             : 
   45219           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   45220             : {
   45221             : 
   45222             : 
   45223           0 :         return PyLong_FromLong(26);
   45224             : }
   45225             : 
   45226           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   45227             : {
   45228           0 :         const struct ndr_interface_call *call = NULL;
   45229           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   45230           0 :         PyObject *ret = NULL;
   45231           0 :         struct ndr_push *push = NULL;
   45232             :         DATA_BLOB blob;
   45233             :         enum ndr_err_code err;
   45234             : 
   45235           0 :         if (ndr_table_netlogon.num_calls < 27) {
   45236           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate3_ndr_pack");
   45237           0 :                 return NULL;
   45238             :         }
   45239           0 :         call = &ndr_table_netlogon.calls[26];
   45240             : 
   45241           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   45242           0 :         if (push == NULL) {
   45243           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   45244           0 :                 return NULL;
   45245             :         }
   45246             : 
   45247           0 :         push->flags |= ndr_push_flags;
   45248             : 
   45249           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   45250           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   45251           0 :                 TALLOC_FREE(push);
   45252           0 :                 PyErr_SetNdrError(err);
   45253           0 :                 return NULL;
   45254             :         }
   45255           0 :         blob = ndr_push_blob(push);
   45256           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   45257           0 :         TALLOC_FREE(push);
   45258           0 :         return ret;
   45259             : }
   45260             : 
   45261           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45262             : {
   45263           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   45264           0 :         PyObject *bigendian_obj = NULL;
   45265           0 :         PyObject *ndr64_obj = NULL;
   45266           0 :         uint32_t ndr_push_flags = 0;
   45267             : 
   45268           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   45269             :                 discard_const_p(char *, kwnames),
   45270             :                 &bigendian_obj,
   45271             :                 &ndr64_obj)) {
   45272           0 :                 return NULL;
   45273             :         }
   45274             : 
   45275           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45276           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   45277             :         }
   45278           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45279           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   45280             :         }
   45281             : 
   45282           0 :         return py_netr_ServerAuthenticate3_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   45283             : }
   45284             : 
   45285           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45286             : {
   45287           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   45288           0 :         PyObject *bigendian_obj = NULL;
   45289           0 :         PyObject *ndr64_obj = NULL;
   45290           0 :         uint32_t ndr_push_flags = 0;
   45291             : 
   45292           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   45293             :                 discard_const_p(char *, kwnames),
   45294             :                 &bigendian_obj,
   45295             :                 &ndr64_obj)) {
   45296           0 :                 return NULL;
   45297             :         }
   45298             : 
   45299           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45300           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   45301             :         }
   45302           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45303           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   45304             :         }
   45305             : 
   45306           0 :         return py_netr_ServerAuthenticate3_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   45307             : }
   45308             : 
   45309           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   45310             : {
   45311           0 :         const struct ndr_interface_call *call = NULL;
   45312           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   45313           0 :         struct ndr_pull *pull = NULL;
   45314             :         enum ndr_err_code err;
   45315             : 
   45316           0 :         if (ndr_table_netlogon.num_calls < 27) {
   45317           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate3_ndr_unpack");
   45318           0 :                 return NULL;
   45319             :         }
   45320           0 :         call = &ndr_table_netlogon.calls[26];
   45321             : 
   45322           0 :         pull = ndr_pull_init_blob(blob, object);
   45323           0 :         if (pull == NULL) {
   45324           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   45325           0 :                 return NULL;
   45326             :         }
   45327             : 
   45328           0 :         pull->flags |= ndr_pull_flags;
   45329             : 
   45330           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   45331           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   45332           0 :                 TALLOC_FREE(pull);
   45333           0 :                 PyErr_SetNdrError(err);
   45334           0 :                 return NULL;
   45335             :         }
   45336           0 :         if (!allow_remaining) {
   45337             :                 uint32_t highest_ofs;
   45338             : 
   45339           0 :                 if (pull->offset > pull->relative_highest_offset) {
   45340           0 :                         highest_ofs = pull->offset;
   45341             :                 } else {
   45342           0 :                         highest_ofs = pull->relative_highest_offset;
   45343             :                 }
   45344           0 :                 if (highest_ofs < pull->data_size) {
   45345           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   45346             :                                 "not all bytes consumed ofs[%u] size[%u]",
   45347             :                                 highest_ofs, pull->data_size);
   45348           0 :                         TALLOC_FREE(pull);
   45349           0 :                         PyErr_SetNdrError(err);
   45350           0 :                         return NULL;
   45351             :                 }
   45352             :         }
   45353             : 
   45354           0 :         TALLOC_FREE(pull);
   45355           0 :         Py_RETURN_NONE;
   45356             : }
   45357             : 
   45358           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45359             : {
   45360             :         DATA_BLOB blob;
   45361           0 :         Py_ssize_t blob_length = 0;
   45362           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   45363           0 :         PyObject *bigendian_obj = NULL;
   45364           0 :         PyObject *ndr64_obj = NULL;
   45365           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   45366           0 :         PyObject *allow_remaining_obj = NULL;
   45367           0 :         bool allow_remaining = false;
   45368             : 
   45369           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   45370             :                 discard_const_p(char *, kwnames),
   45371             :                 &blob.data, &blob_length,
   45372             :                 &bigendian_obj,
   45373             :                 &ndr64_obj,
   45374             :                 &allow_remaining_obj)) {
   45375           0 :                 return NULL;
   45376             :         }
   45377           0 :         blob.length = blob_length;
   45378             : 
   45379           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45380           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   45381             :         }
   45382           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45383           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   45384             :         }
   45385             : 
   45386           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   45387           0 :                 allow_remaining = true;
   45388             :         }
   45389             : 
   45390           0 :         return py_netr_ServerAuthenticate3_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   45391             : }
   45392             : 
   45393           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   45394             : {
   45395             :         DATA_BLOB blob;
   45396           0 :         Py_ssize_t blob_length = 0;
   45397           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   45398           0 :         PyObject *bigendian_obj = NULL;
   45399           0 :         PyObject *ndr64_obj = NULL;
   45400           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   45401           0 :         PyObject *allow_remaining_obj = NULL;
   45402           0 :         bool allow_remaining = false;
   45403             : 
   45404           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   45405             :                 discard_const_p(char *, kwnames),
   45406             :                 &blob.data, &blob_length,
   45407             :                 &bigendian_obj,
   45408             :                 &ndr64_obj,
   45409             :                 &allow_remaining_obj)) {
   45410           0 :                 return NULL;
   45411             :         }
   45412           0 :         blob.length = blob_length;
   45413             : 
   45414           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   45415           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   45416             :         }
   45417           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   45418           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   45419             :         }
   45420             : 
   45421           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   45422           0 :                 allow_remaining = true;
   45423             :         }
   45424             : 
   45425           0 :         return py_netr_ServerAuthenticate3_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   45426             : }
   45427             : 
   45428           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   45429             : {
   45430           0 :         const struct ndr_interface_call *call = NULL;
   45431           0 :         struct netr_ServerAuthenticate3 *object = (struct netr_ServerAuthenticate3 *)pytalloc_get_ptr(py_obj);
   45432             :         PyObject *ret;
   45433             :         char *retstr;
   45434             : 
   45435           0 :         if (ndr_table_netlogon.num_calls < 27) {
   45436           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerAuthenticate3_ndr_print");
   45437           0 :                 return NULL;
   45438             :         }
   45439           0 :         call = &ndr_table_netlogon.calls[26];
   45440             : 
   45441           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   45442           0 :         ret = PyUnicode_FromString(retstr);
   45443           0 :         TALLOC_FREE(retstr);
   45444             : 
   45445           0 :         return ret;
   45446             : }
   45447             : 
   45448           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   45449             : {
   45450           0 :         return py_netr_ServerAuthenticate3_ndr_print(py_obj, "netr_ServerAuthenticate3_in", NDR_IN);
   45451             : }
   45452             : 
   45453           0 : static PyObject *py_netr_ServerAuthenticate3_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   45454             : {
   45455           0 :         return py_netr_ServerAuthenticate3_ndr_print(py_obj, "netr_ServerAuthenticate3_out", NDR_OUT);
   45456             : }
   45457             : 
   45458             : static PyMethodDef py_netr_ServerAuthenticate3_methods[] = {
   45459             :         { "opnum", (PyCFunction)py_netr_ServerAuthenticate3_ndr_opnum, METH_NOARGS|METH_CLASS,
   45460             :                 "netlogon.netr_ServerAuthenticate3.opnum() -> 26 (0x1a) " },
   45461             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate3_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   45462             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   45463             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate3_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   45464             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   45465             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate3_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   45466             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   45467             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerAuthenticate3_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   45468             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   45469             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerAuthenticate3_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   45470             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerAuthenticate3_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   45471             :         { NULL, NULL, 0, NULL }
   45472             : };
   45473             : 
   45474             : 
   45475             : static PyTypeObject netr_ServerAuthenticate3_Type = {
   45476             :         PyVarObject_HEAD_INIT(NULL, 0)
   45477             :         .tp_name = "netlogon.netr_ServerAuthenticate3",
   45478             :         .tp_getset = py_netr_ServerAuthenticate3_getsetters,
   45479             :         .tp_methods = py_netr_ServerAuthenticate3_methods,
   45480             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   45481             :         .tp_new = py_netr_ServerAuthenticate3_new,
   45482             : };
   45483             : 
   45484           4 : static bool pack_py_netr_ServerAuthenticate3_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerAuthenticate3 *r)
   45485             : {
   45486             :         PyObject *py_server_name;
   45487             :         PyObject *py_account_name;
   45488             :         PyObject *py_secure_channel_type;
   45489             :         PyObject *py_computer_name;
   45490             :         PyObject *py_credentials;
   45491             :         PyObject *py_negotiate_flags;
   45492           4 :         const char *kwnames[] = {
   45493             :                 "server_name", "account_name", "secure_channel_type", "computer_name", "credentials", "negotiate_flags", NULL
   45494             :         };
   45495             : 
   45496           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)) {
   45497           0 :                 return false;
   45498             :         }
   45499             : 
   45500           4 :         if (py_server_name == NULL) {
   45501           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   45502           0 :                 return false;
   45503             :         }
   45504           4 :         if (py_server_name == Py_None) {
   45505           0 :                 r->in.server_name = NULL;
   45506             :         } else {
   45507           4 :                 r->in.server_name = NULL;
   45508             :                 {
   45509             :                         const char *test_str;
   45510             :                         const char *talloc_str;
   45511           4 :                         PyObject *unicode = NULL;
   45512           4 :                         if (PyUnicode_Check(py_server_name)) {
   45513           4 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   45514           4 :                                 if (unicode == NULL) {
   45515           0 :                                         PyErr_NoMemory();
   45516           0 :                                         return false;
   45517             :                                 }
   45518           4 :                                 test_str = PyBytes_AS_STRING(unicode);
   45519           0 :                         } else if (PyBytes_Check(py_server_name)) {
   45520           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   45521             :                         } else {
   45522           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   45523           0 :                                 return false;
   45524             :                         }
   45525           4 :                         talloc_str = talloc_strdup(r, test_str);
   45526           4 :                         if (unicode != NULL) {
   45527           4 :                                 Py_DECREF(unicode);
   45528             :                         }
   45529           4 :                         if (talloc_str == NULL) {
   45530           0 :                                 PyErr_NoMemory();
   45531           0 :                                 return false;
   45532             :                         }
   45533           4 :                         r->in.server_name = talloc_str;
   45534             :                 }
   45535             :         }
   45536           4 :         if (py_account_name == NULL) {
   45537           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.account_name");
   45538           0 :                 return false;
   45539             :         }
   45540           4 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   45541           4 :         if (r->in.account_name == NULL) {
   45542           0 :                 PyErr_NoMemory();
   45543           0 :                 return false;
   45544             :         }
   45545             :         {
   45546             :                 const char *test_str;
   45547             :                 const char *talloc_str;
   45548           4 :                 PyObject *unicode = NULL;
   45549           4 :                 if (PyUnicode_Check(py_account_name)) {
   45550           4 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   45551           4 :                         if (unicode == NULL) {
   45552           0 :                                 PyErr_NoMemory();
   45553           0 :                                 return false;
   45554             :                         }
   45555           4 :                         test_str = PyBytes_AS_STRING(unicode);
   45556           0 :                 } else if (PyBytes_Check(py_account_name)) {
   45557           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   45558             :                 } else {
   45559           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   45560           0 :                         return false;
   45561             :                 }
   45562           4 :                 talloc_str = talloc_strdup(r, test_str);
   45563           4 :                 if (unicode != NULL) {
   45564           4 :                         Py_DECREF(unicode);
   45565             :                 }
   45566           4 :                 if (talloc_str == NULL) {
   45567           0 :                         PyErr_NoMemory();
   45568           0 :                         return false;
   45569             :                 }
   45570           4 :                 r->in.account_name = talloc_str;
   45571             :         }
   45572           4 :         if (py_secure_channel_type == NULL) {
   45573           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.secure_channel_type");
   45574           0 :                 return false;
   45575             :         }
   45576             :         {
   45577           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
   45578           4 :                 if (PyLong_Check(py_secure_channel_type)) {
   45579             :                         unsigned long long test_var;
   45580           4 :                         test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
   45581           4 :                         if (PyErr_Occurred() != NULL) {
   45582           0 :                                 return false;
   45583             :                         }
   45584           4 :                         if (test_var > uint_max) {
   45585           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   45586             :                                   PyLong_Type.tp_name, uint_max, test_var);
   45587           0 :                                 return false;
   45588             :                         }
   45589           4 :                         r->in.secure_channel_type = test_var;
   45590             :                 } else {
   45591           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   45592             :                           PyLong_Type.tp_name);
   45593           0 :                         return false;
   45594             :                 }
   45595             :         }
   45596           4 :         if (py_computer_name == NULL) {
   45597           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   45598           0 :                 return false;
   45599             :         }
   45600           4 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   45601           4 :         if (r->in.computer_name == NULL) {
   45602           0 :                 PyErr_NoMemory();
   45603           0 :                 return false;
   45604             :         }
   45605             :         {
   45606             :                 const char *test_str;
   45607             :                 const char *talloc_str;
   45608           4 :                 PyObject *unicode = NULL;
   45609           4 :                 if (PyUnicode_Check(py_computer_name)) {
   45610           4 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   45611           4 :                         if (unicode == NULL) {
   45612           0 :                                 PyErr_NoMemory();
   45613           0 :                                 return false;
   45614             :                         }
   45615           4 :                         test_str = PyBytes_AS_STRING(unicode);
   45616           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   45617           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   45618             :                 } else {
   45619           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   45620           0 :                         return false;
   45621             :                 }
   45622           4 :                 talloc_str = talloc_strdup(r, test_str);
   45623           4 :                 if (unicode != NULL) {
   45624           4 :                         Py_DECREF(unicode);
   45625             :                 }
   45626           4 :                 if (talloc_str == NULL) {
   45627           0 :                         PyErr_NoMemory();
   45628           0 :                         return false;
   45629             :                 }
   45630           4 :                 r->in.computer_name = talloc_str;
   45631             :         }
   45632           4 :         if (py_credentials == NULL) {
   45633           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credentials");
   45634           0 :                 return false;
   45635             :         }
   45636           4 :         r->in.credentials = talloc_ptrtype(r, r->in.credentials);
   45637           4 :         if (r->in.credentials == NULL) {
   45638           0 :                 PyErr_NoMemory();
   45639           0 :                 return false;
   45640             :         }
   45641           4 :         PY_CHECK_TYPE(&netr_Credential_Type, py_credentials, return false;);
   45642           4 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credentials)) == NULL) {
   45643           0 :                 PyErr_NoMemory();
   45644           0 :                 return false;
   45645             :         }
   45646           4 :         r->in.credentials = (struct netr_Credential *)pytalloc_get_ptr(py_credentials);
   45647           4 :         if (py_negotiate_flags == NULL) {
   45648           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.negotiate_flags");
   45649           0 :                 return false;
   45650             :         }
   45651           4 :         r->in.negotiate_flags = talloc_ptrtype(r, r->in.negotiate_flags);
   45652           4 :         if (r->in.negotiate_flags == NULL) {
   45653           0 :                 PyErr_NoMemory();
   45654           0 :                 return false;
   45655             :         }
   45656             :         {
   45657           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.negotiate_flags));
   45658           4 :                 if (PyLong_Check(py_negotiate_flags)) {
   45659             :                         unsigned long long test_var;
   45660           4 :                         test_var = PyLong_AsUnsignedLongLong(py_negotiate_flags);
   45661           4 :                         if (PyErr_Occurred() != NULL) {
   45662           0 :                                 return false;
   45663             :                         }
   45664           4 :                         if (test_var > uint_max) {
   45665           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   45666             :                                   PyLong_Type.tp_name, uint_max, test_var);
   45667           0 :                                 return false;
   45668             :                         }
   45669           4 :                         *r->in.negotiate_flags = test_var;
   45670             :                 } else {
   45671           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   45672             :                           PyLong_Type.tp_name);
   45673           0 :                         return false;
   45674             :                 }
   45675             :         }
   45676           4 :         return true;
   45677             : }
   45678             : 
   45679           4 : static PyObject *unpack_py_netr_ServerAuthenticate3_args_out(struct netr_ServerAuthenticate3 *r)
   45680             : {
   45681             :         PyObject *result;
   45682             :         PyObject *py_return_credentials;
   45683             :         PyObject *py_negotiate_flags;
   45684             :         PyObject *py_rid;
   45685           4 :         result = PyTuple_New(3);
   45686           4 :         py_return_credentials = pytalloc_reference_ex(&netr_Credential_Type, r->out.return_credentials, r->out.return_credentials);
   45687           4 :         PyTuple_SetItem(result, 0, py_return_credentials);
   45688           4 :         py_negotiate_flags = PyLong_FromUnsignedLongLong((uint32_t)*r->out.negotiate_flags);
   45689           4 :         PyTuple_SetItem(result, 1, py_negotiate_flags);
   45690           4 :         py_rid = PyLong_FromUnsignedLongLong((uint32_t)*r->out.rid);
   45691           4 :         PyTuple_SetItem(result, 2, py_rid);
   45692           4 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   45693           4 :                 PyErr_SetNTSTATUS(r->out.result);
   45694           4 :                 return NULL;
   45695             :         }
   45696             : 
   45697           0 :         return result;
   45698             : }
   45699             : 
   45700             : 
   45701           0 : static PyObject *py_netr_DsRGetDCNameEx_in_get_server_unc(PyObject *obj, void *closure)
   45702             : {
   45703           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(obj);
   45704             :         PyObject *py_server_unc;
   45705           0 :         if (object->in.server_unc == NULL) {
   45706           0 :                 Py_RETURN_NONE;
   45707             :         }
   45708           0 :         if (object->in.server_unc == NULL) {
   45709           0 :                 py_server_unc = Py_None;
   45710           0 :                 Py_INCREF(py_server_unc);
   45711             :         } else {
   45712           0 :                 if (object->in.server_unc == NULL) {
   45713           0 :                         py_server_unc = Py_None;
   45714           0 :                         Py_INCREF(py_server_unc);
   45715             :                 } else {
   45716           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   45717             :                 }
   45718             :         }
   45719           0 :         return py_server_unc;
   45720             : }
   45721             : 
   45722           0 : static int py_netr_DsRGetDCNameEx_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   45723             : {
   45724           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(py_obj);
   45725           0 :         if (value == NULL) {
   45726           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   45727           0 :                 return -1;
   45728             :         }
   45729           0 :         if (value == Py_None) {
   45730           0 :                 object->in.server_unc = NULL;
   45731             :         } else {
   45732           0 :                 object->in.server_unc = NULL;
   45733             :                 {
   45734             :                         const char *test_str;
   45735             :                         const char *talloc_str;
   45736           0 :                         PyObject *unicode = NULL;
   45737           0 :                         if (PyUnicode_Check(value)) {
   45738           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   45739           0 :                                 if (unicode == NULL) {
   45740           0 :                                         PyErr_NoMemory();
   45741           0 :                                         return -1;
   45742             :                                 }
   45743           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   45744           0 :                         } else if (PyBytes_Check(value)) {
   45745           0 :                                 test_str = PyBytes_AS_STRING(value);
   45746             :                         } else {
   45747           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   45748           0 :                                 return -1;
   45749             :                         }
   45750           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   45751           0 :                         if (unicode != NULL) {
   45752           0 :                                 Py_DECREF(unicode);
   45753             :                         }
   45754           0 :                         if (talloc_str == NULL) {
   45755           0 :                                 PyErr_NoMemory();
   45756           0 :                                 return -1;
   45757             :                         }
   45758           0 :                         object->in.server_unc = talloc_str;
   45759             :                 }
   45760             :         }
   45761           0 :         return 0;
   45762             : }
   45763             : 
   45764           0 : static PyObject *py_netr_DsRGetDCNameEx_in_get_domain_name(PyObject *obj, void *closure)
   45765             : {
   45766           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(obj);
   45767             :         PyObject *py_domain_name;
   45768           0 :         if (object->in.domain_name == NULL) {
   45769           0 :                 Py_RETURN_NONE;
   45770             :         }
   45771           0 :         if (object->in.domain_name == NULL) {
   45772           0 :                 py_domain_name = Py_None;
   45773           0 :                 Py_INCREF(py_domain_name);
   45774             :         } else {
   45775           0 :                 if (object->in.domain_name == NULL) {
   45776           0 :                         py_domain_name = Py_None;
   45777           0 :                         Py_INCREF(py_domain_name);
   45778             :                 } else {
   45779           0 :                         py_domain_name = PyUnicode_Decode(object->in.domain_name, strlen(object->in.domain_name), "utf-8", "ignore");
   45780             :                 }
   45781             :         }
   45782           0 :         return py_domain_name;
   45783             : }
   45784             : 
   45785           0 : static int py_netr_DsRGetDCNameEx_in_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   45786             : {
   45787           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(py_obj);
   45788           0 :         if (value == NULL) {
   45789           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_name");
   45790           0 :                 return -1;
   45791             :         }
   45792           0 :         if (value == Py_None) {
   45793           0 :                 object->in.domain_name = NULL;
   45794             :         } else {
   45795           0 :                 object->in.domain_name = NULL;
   45796             :                 {
   45797             :                         const char *test_str;
   45798             :                         const char *talloc_str;
   45799           0 :                         PyObject *unicode = NULL;
   45800           0 :                         if (PyUnicode_Check(value)) {
   45801           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   45802           0 :                                 if (unicode == NULL) {
   45803           0 :                                         PyErr_NoMemory();
   45804           0 :                                         return -1;
   45805             :                                 }
   45806           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   45807           0 :                         } else if (PyBytes_Check(value)) {
   45808           0 :                                 test_str = PyBytes_AS_STRING(value);
   45809             :                         } else {
   45810           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   45811           0 :                                 return -1;
   45812             :                         }
   45813           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   45814           0 :                         if (unicode != NULL) {
   45815           0 :                                 Py_DECREF(unicode);
   45816             :                         }
   45817           0 :                         if (talloc_str == NULL) {
   45818           0 :                                 PyErr_NoMemory();
   45819           0 :                                 return -1;
   45820             :                         }
   45821           0 :                         object->in.domain_name = talloc_str;
   45822             :                 }
   45823             :         }
   45824           0 :         return 0;
   45825             : }
   45826             : 
   45827           0 : static PyObject *py_netr_DsRGetDCNameEx_in_get_domain_guid(PyObject *obj, void *closure)
   45828             : {
   45829           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(obj);
   45830             :         PyObject *py_domain_guid;
   45831           0 :         if (object->in.domain_guid == NULL) {
   45832           0 :                 Py_RETURN_NONE;
   45833             :         }
   45834           0 :         if (object->in.domain_guid == NULL) {
   45835           0 :                 py_domain_guid = Py_None;
   45836           0 :                 Py_INCREF(py_domain_guid);
   45837             :         } else {
   45838           0 :                 py_domain_guid = pytalloc_reference_ex(GUID_Type, object->in.domain_guid, object->in.domain_guid);
   45839             :         }
   45840           0 :         return py_domain_guid;
   45841             : }
   45842             : 
   45843           0 : static int py_netr_DsRGetDCNameEx_in_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
   45844             : {
   45845           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(py_obj);
   45846           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.domain_guid));
   45847           0 :         if (value == NULL) {
   45848           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_guid");
   45849           0 :                 return -1;
   45850             :         }
   45851           0 :         if (value == Py_None) {
   45852           0 :                 object->in.domain_guid = NULL;
   45853             :         } else {
   45854           0 :                 object->in.domain_guid = NULL;
   45855           0 :                 PY_CHECK_TYPE(GUID_Type, value, return -1;);
   45856           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   45857           0 :                         PyErr_NoMemory();
   45858           0 :                         return -1;
   45859             :                 }
   45860           0 :                 object->in.domain_guid = (struct GUID *)pytalloc_get_ptr(value);
   45861             :         }
   45862           0 :         return 0;
   45863             : }
   45864             : 
   45865           0 : static PyObject *py_netr_DsRGetDCNameEx_in_get_site_name(PyObject *obj, void *closure)
   45866             : {
   45867           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(obj);
   45868             :         PyObject *py_site_name;
   45869           0 :         if (object->in.site_name == NULL) {
   45870           0 :                 Py_RETURN_NONE;
   45871             :         }
   45872           0 :         if (object->in.site_name == NULL) {
   45873           0 :                 py_site_name = Py_None;
   45874           0 :                 Py_INCREF(py_site_name);
   45875             :         } else {
   45876           0 :                 if (object->in.site_name == NULL) {
   45877           0 :                         py_site_name = Py_None;
   45878           0 :                         Py_INCREF(py_site_name);
   45879             :                 } else {
   45880           0 :                         py_site_name = PyUnicode_Decode(object->in.site_name, strlen(object->in.site_name), "utf-8", "ignore");
   45881             :                 }
   45882             :         }
   45883           0 :         return py_site_name;
   45884             : }
   45885             : 
   45886           0 : static int py_netr_DsRGetDCNameEx_in_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
   45887             : {
   45888           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(py_obj);
   45889           0 :         if (value == NULL) {
   45890           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.site_name");
   45891           0 :                 return -1;
   45892             :         }
   45893           0 :         if (value == Py_None) {
   45894           0 :                 object->in.site_name = NULL;
   45895             :         } else {
   45896           0 :                 object->in.site_name = NULL;
   45897             :                 {
   45898             :                         const char *test_str;
   45899             :                         const char *talloc_str;
   45900           0 :                         PyObject *unicode = NULL;
   45901           0 :                         if (PyUnicode_Check(value)) {
   45902           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   45903           0 :                                 if (unicode == NULL) {
   45904           0 :                                         PyErr_NoMemory();
   45905           0 :                                         return -1;
   45906             :                                 }
   45907           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   45908           0 :                         } else if (PyBytes_Check(value)) {
   45909           0 :                                 test_str = PyBytes_AS_STRING(value);
   45910             :                         } else {
   45911           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   45912           0 :                                 return -1;
   45913             :                         }
   45914           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   45915           0 :                         if (unicode != NULL) {
   45916           0 :                                 Py_DECREF(unicode);
   45917             :                         }
   45918           0 :                         if (talloc_str == NULL) {
   45919           0 :                                 PyErr_NoMemory();
   45920           0 :                                 return -1;
   45921             :                         }
   45922           0 :                         object->in.site_name = talloc_str;
   45923             :                 }
   45924             :         }
   45925           0 :         return 0;
   45926             : }
   45927             : 
   45928           0 : static PyObject *py_netr_DsRGetDCNameEx_in_get_flags(PyObject *obj, void *closure)
   45929             : {
   45930           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(obj);
   45931             :         PyObject *py_flags;
   45932           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
   45933           0 :         return py_flags;
   45934             : }
   45935             : 
   45936           0 : static int py_netr_DsRGetDCNameEx_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   45937             : {
   45938           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(py_obj);
   45939           0 :         if (value == NULL) {
   45940           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   45941           0 :                 return -1;
   45942             :         }
   45943             :         {
   45944           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   45945           0 :                 if (PyLong_Check(value)) {
   45946             :                         unsigned long long test_var;
   45947           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   45948           0 :                         if (PyErr_Occurred() != NULL) {
   45949           0 :                                 return -1;
   45950             :                         }
   45951           0 :                         if (test_var > uint_max) {
   45952           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   45953             :                                   PyLong_Type.tp_name, uint_max, test_var);
   45954           0 :                                 return -1;
   45955             :                         }
   45956           0 :                         object->in.flags = test_var;
   45957             :                 } else {
   45958           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   45959             :                           PyLong_Type.tp_name);
   45960           0 :                         return -1;
   45961             :                 }
   45962             :         }
   45963           0 :         return 0;
   45964             : }
   45965             : 
   45966           0 : static PyObject *py_netr_DsRGetDCNameEx_out_get_info(PyObject *obj, void *closure)
   45967             : {
   45968           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(obj);
   45969             :         PyObject *py_info;
   45970           0 :         if (object->out.info == NULL) {
   45971           0 :                 Py_RETURN_NONE;
   45972             :         }
   45973           0 :         if (*object->out.info == NULL) {
   45974           0 :                 py_info = Py_None;
   45975           0 :                 Py_INCREF(py_info);
   45976             :         } else {
   45977           0 :                 py_info = pytalloc_reference_ex(&netr_DsRGetDCNameInfo_Type, *object->out.info, *object->out.info);
   45978             :         }
   45979           0 :         return py_info;
   45980             : }
   45981             : 
   45982           0 : static int py_netr_DsRGetDCNameEx_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   45983             : {
   45984           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(py_obj);
   45985           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   45986           0 :         if (value == NULL) {
   45987           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
   45988           0 :                 return -1;
   45989             :         }
   45990           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   45991           0 :         if (object->out.info == NULL) {
   45992           0 :                 PyErr_NoMemory();
   45993           0 :                 return -1;
   45994             :         }
   45995           0 :         if (value == Py_None) {
   45996           0 :                 *object->out.info = NULL;
   45997             :         } else {
   45998           0 :                 *object->out.info = NULL;
   45999           0 :                 PY_CHECK_TYPE(&netr_DsRGetDCNameInfo_Type, value, return -1;);
   46000           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   46001           0 :                         PyErr_NoMemory();
   46002           0 :                         return -1;
   46003             :                 }
   46004           0 :                 *object->out.info = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(value);
   46005             :         }
   46006           0 :         return 0;
   46007             : }
   46008             : 
   46009           0 : static PyObject *py_netr_DsRGetDCNameEx_get_result(PyObject *obj, void *closure)
   46010             : {
   46011           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(obj);
   46012             :         PyObject *py_result;
   46013           0 :         py_result = PyErr_FromWERROR(object->out.result);
   46014           0 :         return py_result;
   46015             : }
   46016             : 
   46017           0 : static int py_netr_DsRGetDCNameEx_set_result(PyObject *py_obj, PyObject *value, void *closure)
   46018             : {
   46019           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(py_obj);
   46020           0 :         if (value == NULL) {
   46021           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   46022           0 :                 return -1;
   46023             :         }
   46024           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   46025           0 :         return 0;
   46026             : }
   46027             : 
   46028             : static PyGetSetDef py_netr_DsRGetDCNameEx_getsetters[] = {
   46029             :         {
   46030             :                 .name = discard_const_p(char, "in_server_unc"),
   46031             :                 .get = py_netr_DsRGetDCNameEx_in_get_server_unc,
   46032             :                 .set = py_netr_DsRGetDCNameEx_in_set_server_unc,
   46033             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   46034             :         },
   46035             :         {
   46036             :                 .name = discard_const_p(char, "in_domain_name"),
   46037             :                 .get = py_netr_DsRGetDCNameEx_in_get_domain_name,
   46038             :                 .set = py_netr_DsRGetDCNameEx_in_set_domain_name,
   46039             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   46040             :         },
   46041             :         {
   46042             :                 .name = discard_const_p(char, "in_domain_guid"),
   46043             :                 .get = py_netr_DsRGetDCNameEx_in_get_domain_guid,
   46044             :                 .set = py_netr_DsRGetDCNameEx_in_set_domain_guid,
   46045             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   46046             :         },
   46047             :         {
   46048             :                 .name = discard_const_p(char, "in_site_name"),
   46049             :                 .get = py_netr_DsRGetDCNameEx_in_get_site_name,
   46050             :                 .set = py_netr_DsRGetDCNameEx_in_set_site_name,
   46051             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   46052             :         },
   46053             :         {
   46054             :                 .name = discard_const_p(char, "in_flags"),
   46055             :                 .get = py_netr_DsRGetDCNameEx_in_get_flags,
   46056             :                 .set = py_netr_DsRGetDCNameEx_in_set_flags,
   46057             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCName_flags")
   46058             :         },
   46059             :         {
   46060             :                 .name = discard_const_p(char, "out_info"),
   46061             :                 .get = py_netr_DsRGetDCNameEx_out_get_info,
   46062             :                 .set = py_netr_DsRGetDCNameEx_out_set_info,
   46063             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCNameInfo")
   46064             :         },
   46065             :         {
   46066             :                 .name = discard_const_p(char, "result"),
   46067             :                 .get = py_netr_DsRGetDCNameEx_get_result,
   46068             :                 .set = py_netr_DsRGetDCNameEx_set_result,
   46069             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   46070             :         },
   46071             :         { .name = NULL }
   46072             : };
   46073             : 
   46074           0 : static PyObject *py_netr_DsRGetDCNameEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   46075             : {
   46076           0 :         PyObject *self = pytalloc_new(struct netr_DsRGetDCNameEx, type);
   46077           0 :         struct netr_DsRGetDCNameEx *_self = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(self);
   46078           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   46079             :         /* a pointer to a NULL pointer */
   46080           0 :         _self->out.info = talloc_zero(mem_ctx, struct netr_DsRGetDCNameInfo *);
   46081           0 :         return self;
   46082             : }
   46083             : 
   46084           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   46085             : {
   46086             : 
   46087             : 
   46088           0 :         return PyLong_FromLong(27);
   46089             : }
   46090             : 
   46091           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   46092             : {
   46093           0 :         const struct ndr_interface_call *call = NULL;
   46094           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(py_obj);
   46095           0 :         PyObject *ret = NULL;
   46096           0 :         struct ndr_push *push = NULL;
   46097             :         DATA_BLOB blob;
   46098             :         enum ndr_err_code err;
   46099             : 
   46100           0 :         if (ndr_table_netlogon.num_calls < 28) {
   46101           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCNameEx_ndr_pack");
   46102           0 :                 return NULL;
   46103             :         }
   46104           0 :         call = &ndr_table_netlogon.calls[27];
   46105             : 
   46106           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   46107           0 :         if (push == NULL) {
   46108           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   46109           0 :                 return NULL;
   46110             :         }
   46111             : 
   46112           0 :         push->flags |= ndr_push_flags;
   46113             : 
   46114           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   46115           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   46116           0 :                 TALLOC_FREE(push);
   46117           0 :                 PyErr_SetNdrError(err);
   46118           0 :                 return NULL;
   46119             :         }
   46120           0 :         blob = ndr_push_blob(push);
   46121           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   46122           0 :         TALLOC_FREE(push);
   46123           0 :         return ret;
   46124             : }
   46125             : 
   46126           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46127             : {
   46128           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   46129           0 :         PyObject *bigendian_obj = NULL;
   46130           0 :         PyObject *ndr64_obj = NULL;
   46131           0 :         uint32_t ndr_push_flags = 0;
   46132             : 
   46133           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   46134             :                 discard_const_p(char *, kwnames),
   46135             :                 &bigendian_obj,
   46136             :                 &ndr64_obj)) {
   46137           0 :                 return NULL;
   46138             :         }
   46139             : 
   46140           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46141           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   46142             :         }
   46143           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46144           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   46145             :         }
   46146             : 
   46147           0 :         return py_netr_DsRGetDCNameEx_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   46148             : }
   46149             : 
   46150           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46151             : {
   46152           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   46153           0 :         PyObject *bigendian_obj = NULL;
   46154           0 :         PyObject *ndr64_obj = NULL;
   46155           0 :         uint32_t ndr_push_flags = 0;
   46156             : 
   46157           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   46158             :                 discard_const_p(char *, kwnames),
   46159             :                 &bigendian_obj,
   46160             :                 &ndr64_obj)) {
   46161           0 :                 return NULL;
   46162             :         }
   46163             : 
   46164           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46165           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   46166             :         }
   46167           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46168           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   46169             :         }
   46170             : 
   46171           0 :         return py_netr_DsRGetDCNameEx_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   46172             : }
   46173             : 
   46174           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   46175             : {
   46176           0 :         const struct ndr_interface_call *call = NULL;
   46177           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(py_obj);
   46178           0 :         struct ndr_pull *pull = NULL;
   46179             :         enum ndr_err_code err;
   46180             : 
   46181           0 :         if (ndr_table_netlogon.num_calls < 28) {
   46182           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCNameEx_ndr_unpack");
   46183           0 :                 return NULL;
   46184             :         }
   46185           0 :         call = &ndr_table_netlogon.calls[27];
   46186             : 
   46187           0 :         pull = ndr_pull_init_blob(blob, object);
   46188           0 :         if (pull == NULL) {
   46189           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   46190           0 :                 return NULL;
   46191             :         }
   46192             : 
   46193           0 :         pull->flags |= ndr_pull_flags;
   46194             : 
   46195           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   46196           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   46197           0 :                 TALLOC_FREE(pull);
   46198           0 :                 PyErr_SetNdrError(err);
   46199           0 :                 return NULL;
   46200             :         }
   46201           0 :         if (!allow_remaining) {
   46202             :                 uint32_t highest_ofs;
   46203             : 
   46204           0 :                 if (pull->offset > pull->relative_highest_offset) {
   46205           0 :                         highest_ofs = pull->offset;
   46206             :                 } else {
   46207           0 :                         highest_ofs = pull->relative_highest_offset;
   46208             :                 }
   46209           0 :                 if (highest_ofs < pull->data_size) {
   46210           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   46211             :                                 "not all bytes consumed ofs[%u] size[%u]",
   46212             :                                 highest_ofs, pull->data_size);
   46213           0 :                         TALLOC_FREE(pull);
   46214           0 :                         PyErr_SetNdrError(err);
   46215           0 :                         return NULL;
   46216             :                 }
   46217             :         }
   46218             : 
   46219           0 :         TALLOC_FREE(pull);
   46220           0 :         Py_RETURN_NONE;
   46221             : }
   46222             : 
   46223           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46224             : {
   46225             :         DATA_BLOB blob;
   46226           0 :         Py_ssize_t blob_length = 0;
   46227           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   46228           0 :         PyObject *bigendian_obj = NULL;
   46229           0 :         PyObject *ndr64_obj = NULL;
   46230           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   46231           0 :         PyObject *allow_remaining_obj = NULL;
   46232           0 :         bool allow_remaining = false;
   46233             : 
   46234           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   46235             :                 discard_const_p(char *, kwnames),
   46236             :                 &blob.data, &blob_length,
   46237             :                 &bigendian_obj,
   46238             :                 &ndr64_obj,
   46239             :                 &allow_remaining_obj)) {
   46240           0 :                 return NULL;
   46241             :         }
   46242           0 :         blob.length = blob_length;
   46243             : 
   46244           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46245           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   46246             :         }
   46247           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46248           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   46249             :         }
   46250             : 
   46251           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   46252           0 :                 allow_remaining = true;
   46253             :         }
   46254             : 
   46255           0 :         return py_netr_DsRGetDCNameEx_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   46256             : }
   46257             : 
   46258           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46259             : {
   46260             :         DATA_BLOB blob;
   46261           0 :         Py_ssize_t blob_length = 0;
   46262           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   46263           0 :         PyObject *bigendian_obj = NULL;
   46264           0 :         PyObject *ndr64_obj = NULL;
   46265           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   46266           0 :         PyObject *allow_remaining_obj = NULL;
   46267           0 :         bool allow_remaining = false;
   46268             : 
   46269           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   46270             :                 discard_const_p(char *, kwnames),
   46271             :                 &blob.data, &blob_length,
   46272             :                 &bigendian_obj,
   46273             :                 &ndr64_obj,
   46274             :                 &allow_remaining_obj)) {
   46275           0 :                 return NULL;
   46276             :         }
   46277           0 :         blob.length = blob_length;
   46278             : 
   46279           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46280           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   46281             :         }
   46282           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46283           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   46284             :         }
   46285             : 
   46286           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   46287           0 :                 allow_remaining = true;
   46288             :         }
   46289             : 
   46290           0 :         return py_netr_DsRGetDCNameEx_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   46291             : }
   46292             : 
   46293           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   46294             : {
   46295           0 :         const struct ndr_interface_call *call = NULL;
   46296           0 :         struct netr_DsRGetDCNameEx *object = (struct netr_DsRGetDCNameEx *)pytalloc_get_ptr(py_obj);
   46297             :         PyObject *ret;
   46298             :         char *retstr;
   46299             : 
   46300           0 :         if (ndr_table_netlogon.num_calls < 28) {
   46301           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCNameEx_ndr_print");
   46302           0 :                 return NULL;
   46303             :         }
   46304           0 :         call = &ndr_table_netlogon.calls[27];
   46305             : 
   46306           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   46307           0 :         ret = PyUnicode_FromString(retstr);
   46308           0 :         TALLOC_FREE(retstr);
   46309             : 
   46310           0 :         return ret;
   46311             : }
   46312             : 
   46313           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   46314             : {
   46315           0 :         return py_netr_DsRGetDCNameEx_ndr_print(py_obj, "netr_DsRGetDCNameEx_in", NDR_IN);
   46316             : }
   46317             : 
   46318           0 : static PyObject *py_netr_DsRGetDCNameEx_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   46319             : {
   46320           0 :         return py_netr_DsRGetDCNameEx_ndr_print(py_obj, "netr_DsRGetDCNameEx_out", NDR_OUT);
   46321             : }
   46322             : 
   46323             : static PyMethodDef py_netr_DsRGetDCNameEx_methods[] = {
   46324             :         { "opnum", (PyCFunction)py_netr_DsRGetDCNameEx_ndr_opnum, METH_NOARGS|METH_CLASS,
   46325             :                 "netlogon.netr_DsRGetDCNameEx.opnum() -> 27 (0x1b) " },
   46326             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   46327             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   46328             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   46329             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   46330             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   46331             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   46332             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   46333             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   46334             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsRGetDCNameEx_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   46335             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsRGetDCNameEx_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   46336             :         { NULL, NULL, 0, NULL }
   46337             : };
   46338             : 
   46339             : 
   46340             : static PyTypeObject netr_DsRGetDCNameEx_Type = {
   46341             :         PyVarObject_HEAD_INIT(NULL, 0)
   46342             :         .tp_name = "netlogon.netr_DsRGetDCNameEx",
   46343             :         .tp_getset = py_netr_DsRGetDCNameEx_getsetters,
   46344             :         .tp_methods = py_netr_DsRGetDCNameEx_methods,
   46345             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   46346             :         .tp_new = py_netr_DsRGetDCNameEx_new,
   46347             : };
   46348             : 
   46349          28 : static bool pack_py_netr_DsRGetDCNameEx_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRGetDCNameEx *r)
   46350             : {
   46351             :         PyObject *py_server_unc;
   46352             :         PyObject *py_domain_name;
   46353             :         PyObject *py_domain_guid;
   46354             :         PyObject *py_site_name;
   46355             :         PyObject *py_flags;
   46356          28 :         const char *kwnames[] = {
   46357             :                 "server_unc", "domain_name", "domain_guid", "site_name", "flags", NULL
   46358             :         };
   46359             : 
   46360          28 :         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)) {
   46361           0 :                 return false;
   46362             :         }
   46363             : 
   46364          28 :         if (py_server_unc == NULL) {
   46365           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   46366           0 :                 return false;
   46367             :         }
   46368          28 :         if (py_server_unc == Py_None) {
   46369           0 :                 r->in.server_unc = NULL;
   46370             :         } else {
   46371          28 :                 r->in.server_unc = NULL;
   46372             :                 {
   46373             :                         const char *test_str;
   46374             :                         const char *talloc_str;
   46375          28 :                         PyObject *unicode = NULL;
   46376          28 :                         if (PyUnicode_Check(py_server_unc)) {
   46377          28 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   46378          28 :                                 if (unicode == NULL) {
   46379           0 :                                         PyErr_NoMemory();
   46380           0 :                                         return false;
   46381             :                                 }
   46382          28 :                                 test_str = PyBytes_AS_STRING(unicode);
   46383           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   46384           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   46385             :                         } else {
   46386           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   46387           0 :                                 return false;
   46388             :                         }
   46389          28 :                         talloc_str = talloc_strdup(r, test_str);
   46390          28 :                         if (unicode != NULL) {
   46391          28 :                                 Py_DECREF(unicode);
   46392             :                         }
   46393          28 :                         if (talloc_str == NULL) {
   46394           0 :                                 PyErr_NoMemory();
   46395           0 :                                 return false;
   46396             :                         }
   46397          28 :                         r->in.server_unc = talloc_str;
   46398             :                 }
   46399             :         }
   46400          28 :         if (py_domain_name == NULL) {
   46401           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_name");
   46402           0 :                 return false;
   46403             :         }
   46404          28 :         if (py_domain_name == Py_None) {
   46405           0 :                 r->in.domain_name = NULL;
   46406             :         } else {
   46407          28 :                 r->in.domain_name = NULL;
   46408             :                 {
   46409             :                         const char *test_str;
   46410             :                         const char *talloc_str;
   46411          28 :                         PyObject *unicode = NULL;
   46412          28 :                         if (PyUnicode_Check(py_domain_name)) {
   46413          28 :                                 unicode = PyUnicode_AsEncodedString(py_domain_name, "utf-8", "ignore");
   46414          28 :                                 if (unicode == NULL) {
   46415           0 :                                         PyErr_NoMemory();
   46416           0 :                                         return false;
   46417             :                                 }
   46418          28 :                                 test_str = PyBytes_AS_STRING(unicode);
   46419           0 :                         } else if (PyBytes_Check(py_domain_name)) {
   46420           0 :                                 test_str = PyBytes_AS_STRING(py_domain_name);
   46421             :                         } else {
   46422           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain_name)->tp_name);
   46423           0 :                                 return false;
   46424             :                         }
   46425          28 :                         talloc_str = talloc_strdup(r, test_str);
   46426          28 :                         if (unicode != NULL) {
   46427          28 :                                 Py_DECREF(unicode);
   46428             :                         }
   46429          28 :                         if (talloc_str == NULL) {
   46430           0 :                                 PyErr_NoMemory();
   46431           0 :                                 return false;
   46432             :                         }
   46433          28 :                         r->in.domain_name = talloc_str;
   46434             :                 }
   46435             :         }
   46436          28 :         if (py_domain_guid == NULL) {
   46437           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_guid");
   46438           0 :                 return false;
   46439             :         }
   46440          28 :         if (py_domain_guid == Py_None) {
   46441          24 :                 r->in.domain_guid = NULL;
   46442             :         } else {
   46443           4 :                 r->in.domain_guid = NULL;
   46444           4 :                 PY_CHECK_TYPE(GUID_Type, py_domain_guid, return false;);
   46445           4 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_domain_guid)) == NULL) {
   46446           0 :                         PyErr_NoMemory();
   46447           0 :                         return false;
   46448             :                 }
   46449           4 :                 r->in.domain_guid = (struct GUID *)pytalloc_get_ptr(py_domain_guid);
   46450             :         }
   46451          28 :         if (py_site_name == NULL) {
   46452           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.site_name");
   46453           0 :                 return false;
   46454             :         }
   46455          28 :         if (py_site_name == Py_None) {
   46456          12 :                 r->in.site_name = NULL;
   46457             :         } else {
   46458          16 :                 r->in.site_name = NULL;
   46459             :                 {
   46460             :                         const char *test_str;
   46461             :                         const char *talloc_str;
   46462          16 :                         PyObject *unicode = NULL;
   46463          16 :                         if (PyUnicode_Check(py_site_name)) {
   46464          16 :                                 unicode = PyUnicode_AsEncodedString(py_site_name, "utf-8", "ignore");
   46465          16 :                                 if (unicode == NULL) {
   46466           0 :                                         PyErr_NoMemory();
   46467           0 :                                         return false;
   46468             :                                 }
   46469          16 :                                 test_str = PyBytes_AS_STRING(unicode);
   46470           0 :                         } else if (PyBytes_Check(py_site_name)) {
   46471           0 :                                 test_str = PyBytes_AS_STRING(py_site_name);
   46472             :                         } else {
   46473           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_site_name)->tp_name);
   46474           0 :                                 return false;
   46475             :                         }
   46476          16 :                         talloc_str = talloc_strdup(r, test_str);
   46477          16 :                         if (unicode != NULL) {
   46478          16 :                                 Py_DECREF(unicode);
   46479             :                         }
   46480          16 :                         if (talloc_str == NULL) {
   46481           0 :                                 PyErr_NoMemory();
   46482           0 :                                 return false;
   46483             :                         }
   46484          16 :                         r->in.site_name = talloc_str;
   46485             :                 }
   46486             :         }
   46487          28 :         if (py_flags == NULL) {
   46488           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   46489           0 :                 return false;
   46490             :         }
   46491             :         {
   46492          28 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   46493          28 :                 if (PyLong_Check(py_flags)) {
   46494             :                         unsigned long long test_var;
   46495          28 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   46496          28 :                         if (PyErr_Occurred() != NULL) {
   46497           0 :                                 return false;
   46498             :                         }
   46499          28 :                         if (test_var > uint_max) {
   46500           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   46501             :                                   PyLong_Type.tp_name, uint_max, test_var);
   46502           0 :                                 return false;
   46503             :                         }
   46504          28 :                         r->in.flags = test_var;
   46505             :                 } else {
   46506           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   46507             :                           PyLong_Type.tp_name);
   46508           0 :                         return false;
   46509             :                 }
   46510             :         }
   46511          28 :         return true;
   46512             : }
   46513             : 
   46514          28 : static PyObject *unpack_py_netr_DsRGetDCNameEx_args_out(struct netr_DsRGetDCNameEx *r)
   46515             : {
   46516             :         PyObject *result;
   46517             :         PyObject *py_info;
   46518          28 :         if (*r->out.info == NULL) {
   46519           0 :                 py_info = Py_None;
   46520           0 :                 Py_INCREF(py_info);
   46521             :         } else {
   46522          28 :                 py_info = pytalloc_reference_ex(&netr_DsRGetDCNameInfo_Type, *r->out.info, *r->out.info);
   46523             :         }
   46524          28 :         result = py_info;
   46525          28 :         if (!W_ERROR_IS_OK(r->out.result)) {
   46526           4 :                 PyErr_SetWERROR(r->out.result);
   46527           4 :                 return NULL;
   46528             :         }
   46529             : 
   46530          24 :         return result;
   46531             : }
   46532             : 
   46533             : 
   46534           0 : static PyObject *py_netr_DsRGetSiteName_in_get_computer_name(PyObject *obj, void *closure)
   46535             : {
   46536           0 :         struct netr_DsRGetSiteName *object = (struct netr_DsRGetSiteName *)pytalloc_get_ptr(obj);
   46537             :         PyObject *py_computer_name;
   46538           0 :         if (object->in.computer_name == NULL) {
   46539           0 :                 Py_RETURN_NONE;
   46540             :         }
   46541           0 :         if (object->in.computer_name == NULL) {
   46542           0 :                 py_computer_name = Py_None;
   46543           0 :                 Py_INCREF(py_computer_name);
   46544             :         } else {
   46545           0 :                 if (object->in.computer_name == NULL) {
   46546           0 :                         py_computer_name = Py_None;
   46547           0 :                         Py_INCREF(py_computer_name);
   46548             :                 } else {
   46549           0 :                         py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   46550             :                 }
   46551             :         }
   46552           0 :         return py_computer_name;
   46553             : }
   46554             : 
   46555           0 : static int py_netr_DsRGetSiteName_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   46556             : {
   46557           0 :         struct netr_DsRGetSiteName *object = (struct netr_DsRGetSiteName *)pytalloc_get_ptr(py_obj);
   46558           0 :         if (value == NULL) {
   46559           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   46560           0 :                 return -1;
   46561             :         }
   46562           0 :         if (value == Py_None) {
   46563           0 :                 object->in.computer_name = NULL;
   46564             :         } else {
   46565           0 :                 object->in.computer_name = NULL;
   46566             :                 {
   46567             :                         const char *test_str;
   46568             :                         const char *talloc_str;
   46569           0 :                         PyObject *unicode = NULL;
   46570           0 :                         if (PyUnicode_Check(value)) {
   46571           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   46572           0 :                                 if (unicode == NULL) {
   46573           0 :                                         PyErr_NoMemory();
   46574           0 :                                         return -1;
   46575             :                                 }
   46576           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   46577           0 :                         } else if (PyBytes_Check(value)) {
   46578           0 :                                 test_str = PyBytes_AS_STRING(value);
   46579             :                         } else {
   46580           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   46581           0 :                                 return -1;
   46582             :                         }
   46583           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   46584           0 :                         if (unicode != NULL) {
   46585           0 :                                 Py_DECREF(unicode);
   46586             :                         }
   46587           0 :                         if (talloc_str == NULL) {
   46588           0 :                                 PyErr_NoMemory();
   46589           0 :                                 return -1;
   46590             :                         }
   46591           0 :                         object->in.computer_name = talloc_str;
   46592             :                 }
   46593             :         }
   46594           0 :         return 0;
   46595             : }
   46596             : 
   46597           0 : static PyObject *py_netr_DsRGetSiteName_out_get_site(PyObject *obj, void *closure)
   46598             : {
   46599           0 :         struct netr_DsRGetSiteName *object = (struct netr_DsRGetSiteName *)pytalloc_get_ptr(obj);
   46600             :         PyObject *py_site;
   46601           0 :         if (object->out.site == NULL) {
   46602           0 :                 Py_RETURN_NONE;
   46603             :         }
   46604           0 :         if (*object->out.site == NULL) {
   46605           0 :                 py_site = Py_None;
   46606           0 :                 Py_INCREF(py_site);
   46607             :         } else {
   46608           0 :                 if (*object->out.site == NULL) {
   46609           0 :                         py_site = Py_None;
   46610           0 :                         Py_INCREF(py_site);
   46611             :                 } else {
   46612           0 :                         py_site = PyUnicode_Decode(*object->out.site, strlen(*object->out.site), "utf-8", "ignore");
   46613             :                 }
   46614             :         }
   46615           0 :         return py_site;
   46616             : }
   46617             : 
   46618           0 : static int py_netr_DsRGetSiteName_out_set_site(PyObject *py_obj, PyObject *value, void *closure)
   46619             : {
   46620           0 :         struct netr_DsRGetSiteName *object = (struct netr_DsRGetSiteName *)pytalloc_get_ptr(py_obj);
   46621           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.site));
   46622           0 :         if (value == NULL) {
   46623           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.site");
   46624           0 :                 return -1;
   46625             :         }
   46626           0 :         object->out.site = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.site);
   46627           0 :         if (object->out.site == NULL) {
   46628           0 :                 PyErr_NoMemory();
   46629           0 :                 return -1;
   46630             :         }
   46631           0 :         if (value == Py_None) {
   46632           0 :                 *object->out.site = NULL;
   46633             :         } else {
   46634           0 :                 *object->out.site = NULL;
   46635             :                 {
   46636             :                         const char *test_str;
   46637             :                         const char *talloc_str;
   46638           0 :                         PyObject *unicode = NULL;
   46639           0 :                         if (PyUnicode_Check(value)) {
   46640           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   46641           0 :                                 if (unicode == NULL) {
   46642           0 :                                         PyErr_NoMemory();
   46643           0 :                                         return -1;
   46644             :                                 }
   46645           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   46646           0 :                         } else if (PyBytes_Check(value)) {
   46647           0 :                                 test_str = PyBytes_AS_STRING(value);
   46648             :                         } else {
   46649           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   46650           0 :                                 return -1;
   46651             :                         }
   46652           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   46653           0 :                         if (unicode != NULL) {
   46654           0 :                                 Py_DECREF(unicode);
   46655             :                         }
   46656           0 :                         if (talloc_str == NULL) {
   46657           0 :                                 PyErr_NoMemory();
   46658           0 :                                 return -1;
   46659             :                         }
   46660           0 :                         *object->out.site = talloc_str;
   46661             :                 }
   46662             :         }
   46663           0 :         return 0;
   46664             : }
   46665             : 
   46666           0 : static PyObject *py_netr_DsRGetSiteName_get_result(PyObject *obj, void *closure)
   46667             : {
   46668           0 :         struct netr_DsRGetSiteName *object = (struct netr_DsRGetSiteName *)pytalloc_get_ptr(obj);
   46669             :         PyObject *py_result;
   46670           0 :         py_result = PyErr_FromWERROR(object->out.result);
   46671           0 :         return py_result;
   46672             : }
   46673             : 
   46674           0 : static int py_netr_DsRGetSiteName_set_result(PyObject *py_obj, PyObject *value, void *closure)
   46675             : {
   46676           0 :         struct netr_DsRGetSiteName *object = (struct netr_DsRGetSiteName *)pytalloc_get_ptr(py_obj);
   46677           0 :         if (value == NULL) {
   46678           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   46679           0 :                 return -1;
   46680             :         }
   46681           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   46682           0 :         return 0;
   46683             : }
   46684             : 
   46685             : static PyGetSetDef py_netr_DsRGetSiteName_getsetters[] = {
   46686             :         {
   46687             :                 .name = discard_const_p(char, "in_computer_name"),
   46688             :                 .get = py_netr_DsRGetSiteName_in_get_computer_name,
   46689             :                 .set = py_netr_DsRGetSiteName_in_set_computer_name,
   46690             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   46691             :         },
   46692             :         {
   46693             :                 .name = discard_const_p(char, "out_site"),
   46694             :                 .get = py_netr_DsRGetSiteName_out_get_site,
   46695             :                 .set = py_netr_DsRGetSiteName_out_set_site,
   46696             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   46697             :         },
   46698             :         {
   46699             :                 .name = discard_const_p(char, "result"),
   46700             :                 .get = py_netr_DsRGetSiteName_get_result,
   46701             :                 .set = py_netr_DsRGetSiteName_set_result,
   46702             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   46703             :         },
   46704             :         { .name = NULL }
   46705             : };
   46706             : 
   46707           0 : static PyObject *py_netr_DsRGetSiteName_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   46708             : {
   46709           0 :         PyObject *self = pytalloc_new(struct netr_DsRGetSiteName, type);
   46710           0 :         return self;
   46711             : }
   46712             : 
   46713           0 : static PyObject *py_netr_DsRGetSiteName_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   46714             : {
   46715             : 
   46716             : 
   46717           0 :         return PyLong_FromLong(28);
   46718             : }
   46719             : 
   46720           0 : static PyObject *py_netr_DsRGetSiteName_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   46721             : {
   46722           0 :         const struct ndr_interface_call *call = NULL;
   46723           0 :         struct netr_DsRGetSiteName *object = (struct netr_DsRGetSiteName *)pytalloc_get_ptr(py_obj);
   46724           0 :         PyObject *ret = NULL;
   46725           0 :         struct ndr_push *push = NULL;
   46726             :         DATA_BLOB blob;
   46727             :         enum ndr_err_code err;
   46728             : 
   46729           0 :         if (ndr_table_netlogon.num_calls < 29) {
   46730           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetSiteName_ndr_pack");
   46731           0 :                 return NULL;
   46732             :         }
   46733           0 :         call = &ndr_table_netlogon.calls[28];
   46734             : 
   46735           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   46736           0 :         if (push == NULL) {
   46737           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   46738           0 :                 return NULL;
   46739             :         }
   46740             : 
   46741           0 :         push->flags |= ndr_push_flags;
   46742             : 
   46743           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   46744           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   46745           0 :                 TALLOC_FREE(push);
   46746           0 :                 PyErr_SetNdrError(err);
   46747           0 :                 return NULL;
   46748             :         }
   46749           0 :         blob = ndr_push_blob(push);
   46750           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   46751           0 :         TALLOC_FREE(push);
   46752           0 :         return ret;
   46753             : }
   46754             : 
   46755           0 : static PyObject *py_netr_DsRGetSiteName_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46756             : {
   46757           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   46758           0 :         PyObject *bigendian_obj = NULL;
   46759           0 :         PyObject *ndr64_obj = NULL;
   46760           0 :         uint32_t ndr_push_flags = 0;
   46761             : 
   46762           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   46763             :                 discard_const_p(char *, kwnames),
   46764             :                 &bigendian_obj,
   46765             :                 &ndr64_obj)) {
   46766           0 :                 return NULL;
   46767             :         }
   46768             : 
   46769           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46770           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   46771             :         }
   46772           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46773           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   46774             :         }
   46775             : 
   46776           0 :         return py_netr_DsRGetSiteName_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   46777             : }
   46778             : 
   46779           0 : static PyObject *py_netr_DsRGetSiteName_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46780             : {
   46781           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   46782           0 :         PyObject *bigendian_obj = NULL;
   46783           0 :         PyObject *ndr64_obj = NULL;
   46784           0 :         uint32_t ndr_push_flags = 0;
   46785             : 
   46786           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   46787             :                 discard_const_p(char *, kwnames),
   46788             :                 &bigendian_obj,
   46789             :                 &ndr64_obj)) {
   46790           0 :                 return NULL;
   46791             :         }
   46792             : 
   46793           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46794           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   46795             :         }
   46796           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46797           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   46798             :         }
   46799             : 
   46800           0 :         return py_netr_DsRGetSiteName_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   46801             : }
   46802             : 
   46803           0 : static PyObject *py_netr_DsRGetSiteName_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   46804             : {
   46805           0 :         const struct ndr_interface_call *call = NULL;
   46806           0 :         struct netr_DsRGetSiteName *object = (struct netr_DsRGetSiteName *)pytalloc_get_ptr(py_obj);
   46807           0 :         struct ndr_pull *pull = NULL;
   46808             :         enum ndr_err_code err;
   46809             : 
   46810           0 :         if (ndr_table_netlogon.num_calls < 29) {
   46811           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetSiteName_ndr_unpack");
   46812           0 :                 return NULL;
   46813             :         }
   46814           0 :         call = &ndr_table_netlogon.calls[28];
   46815             : 
   46816           0 :         pull = ndr_pull_init_blob(blob, object);
   46817           0 :         if (pull == NULL) {
   46818           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   46819           0 :                 return NULL;
   46820             :         }
   46821             : 
   46822           0 :         pull->flags |= ndr_pull_flags;
   46823             : 
   46824           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   46825           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   46826           0 :                 TALLOC_FREE(pull);
   46827           0 :                 PyErr_SetNdrError(err);
   46828           0 :                 return NULL;
   46829             :         }
   46830           0 :         if (!allow_remaining) {
   46831             :                 uint32_t highest_ofs;
   46832             : 
   46833           0 :                 if (pull->offset > pull->relative_highest_offset) {
   46834           0 :                         highest_ofs = pull->offset;
   46835             :                 } else {
   46836           0 :                         highest_ofs = pull->relative_highest_offset;
   46837             :                 }
   46838           0 :                 if (highest_ofs < pull->data_size) {
   46839           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   46840             :                                 "not all bytes consumed ofs[%u] size[%u]",
   46841             :                                 highest_ofs, pull->data_size);
   46842           0 :                         TALLOC_FREE(pull);
   46843           0 :                         PyErr_SetNdrError(err);
   46844           0 :                         return NULL;
   46845             :                 }
   46846             :         }
   46847             : 
   46848           0 :         TALLOC_FREE(pull);
   46849           0 :         Py_RETURN_NONE;
   46850             : }
   46851             : 
   46852           0 : static PyObject *py_netr_DsRGetSiteName_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46853             : {
   46854             :         DATA_BLOB blob;
   46855           0 :         Py_ssize_t blob_length = 0;
   46856           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   46857           0 :         PyObject *bigendian_obj = NULL;
   46858           0 :         PyObject *ndr64_obj = NULL;
   46859           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   46860           0 :         PyObject *allow_remaining_obj = NULL;
   46861           0 :         bool allow_remaining = false;
   46862             : 
   46863           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   46864             :                 discard_const_p(char *, kwnames),
   46865             :                 &blob.data, &blob_length,
   46866             :                 &bigendian_obj,
   46867             :                 &ndr64_obj,
   46868             :                 &allow_remaining_obj)) {
   46869           0 :                 return NULL;
   46870             :         }
   46871           0 :         blob.length = blob_length;
   46872             : 
   46873           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46874           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   46875             :         }
   46876           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46877           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   46878             :         }
   46879             : 
   46880           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   46881           0 :                 allow_remaining = true;
   46882             :         }
   46883             : 
   46884           0 :         return py_netr_DsRGetSiteName_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   46885             : }
   46886             : 
   46887           0 : static PyObject *py_netr_DsRGetSiteName_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   46888             : {
   46889             :         DATA_BLOB blob;
   46890           0 :         Py_ssize_t blob_length = 0;
   46891           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   46892           0 :         PyObject *bigendian_obj = NULL;
   46893           0 :         PyObject *ndr64_obj = NULL;
   46894           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   46895           0 :         PyObject *allow_remaining_obj = NULL;
   46896           0 :         bool allow_remaining = false;
   46897             : 
   46898           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   46899             :                 discard_const_p(char *, kwnames),
   46900             :                 &blob.data, &blob_length,
   46901             :                 &bigendian_obj,
   46902             :                 &ndr64_obj,
   46903             :                 &allow_remaining_obj)) {
   46904           0 :                 return NULL;
   46905             :         }
   46906           0 :         blob.length = blob_length;
   46907             : 
   46908           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   46909           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   46910             :         }
   46911           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   46912           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   46913             :         }
   46914             : 
   46915           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   46916           0 :                 allow_remaining = true;
   46917             :         }
   46918             : 
   46919           0 :         return py_netr_DsRGetSiteName_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   46920             : }
   46921             : 
   46922           0 : static PyObject *py_netr_DsRGetSiteName_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   46923             : {
   46924           0 :         const struct ndr_interface_call *call = NULL;
   46925           0 :         struct netr_DsRGetSiteName *object = (struct netr_DsRGetSiteName *)pytalloc_get_ptr(py_obj);
   46926             :         PyObject *ret;
   46927             :         char *retstr;
   46928             : 
   46929           0 :         if (ndr_table_netlogon.num_calls < 29) {
   46930           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetSiteName_ndr_print");
   46931           0 :                 return NULL;
   46932             :         }
   46933           0 :         call = &ndr_table_netlogon.calls[28];
   46934             : 
   46935           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   46936           0 :         ret = PyUnicode_FromString(retstr);
   46937           0 :         TALLOC_FREE(retstr);
   46938             : 
   46939           0 :         return ret;
   46940             : }
   46941             : 
   46942           0 : static PyObject *py_netr_DsRGetSiteName_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   46943             : {
   46944           0 :         return py_netr_DsRGetSiteName_ndr_print(py_obj, "netr_DsRGetSiteName_in", NDR_IN);
   46945             : }
   46946             : 
   46947           0 : static PyObject *py_netr_DsRGetSiteName_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   46948             : {
   46949           0 :         return py_netr_DsRGetSiteName_ndr_print(py_obj, "netr_DsRGetSiteName_out", NDR_OUT);
   46950             : }
   46951             : 
   46952             : static PyMethodDef py_netr_DsRGetSiteName_methods[] = {
   46953             :         { "opnum", (PyCFunction)py_netr_DsRGetSiteName_ndr_opnum, METH_NOARGS|METH_CLASS,
   46954             :                 "netlogon.netr_DsRGetSiteName.opnum() -> 28 (0x1c) " },
   46955             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetSiteName_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   46956             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   46957             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetSiteName_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   46958             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   46959             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetSiteName_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   46960             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   46961             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetSiteName_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   46962             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   46963             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsRGetSiteName_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   46964             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsRGetSiteName_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   46965             :         { NULL, NULL, 0, NULL }
   46966             : };
   46967             : 
   46968             : 
   46969             : static PyTypeObject netr_DsRGetSiteName_Type = {
   46970             :         PyVarObject_HEAD_INIT(NULL, 0)
   46971             :         .tp_name = "netlogon.netr_DsRGetSiteName",
   46972             :         .tp_getset = py_netr_DsRGetSiteName_getsetters,
   46973             :         .tp_methods = py_netr_DsRGetSiteName_methods,
   46974             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   46975             :         .tp_new = py_netr_DsRGetSiteName_new,
   46976             : };
   46977             : 
   46978           0 : static bool pack_py_netr_DsRGetSiteName_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRGetSiteName *r)
   46979             : {
   46980             :         PyObject *py_computer_name;
   46981           0 :         const char *kwnames[] = {
   46982             :                 "computer_name", NULL
   46983             :         };
   46984             : 
   46985           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:netr_DsRGetSiteName", discard_const_p(char *, kwnames), &py_computer_name)) {
   46986           0 :                 return false;
   46987             :         }
   46988             : 
   46989           0 :         if (py_computer_name == NULL) {
   46990           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   46991           0 :                 return false;
   46992             :         }
   46993           0 :         if (py_computer_name == Py_None) {
   46994           0 :                 r->in.computer_name = NULL;
   46995             :         } else {
   46996           0 :                 r->in.computer_name = NULL;
   46997             :                 {
   46998             :                         const char *test_str;
   46999             :                         const char *talloc_str;
   47000           0 :                         PyObject *unicode = NULL;
   47001           0 :                         if (PyUnicode_Check(py_computer_name)) {
   47002           0 :                                 unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   47003           0 :                                 if (unicode == NULL) {
   47004           0 :                                         PyErr_NoMemory();
   47005           0 :                                         return false;
   47006             :                                 }
   47007           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   47008           0 :                         } else if (PyBytes_Check(py_computer_name)) {
   47009           0 :                                 test_str = PyBytes_AS_STRING(py_computer_name);
   47010             :                         } else {
   47011           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   47012           0 :                                 return false;
   47013             :                         }
   47014           0 :                         talloc_str = talloc_strdup(r, test_str);
   47015           0 :                         if (unicode != NULL) {
   47016           0 :                                 Py_DECREF(unicode);
   47017             :                         }
   47018           0 :                         if (talloc_str == NULL) {
   47019           0 :                                 PyErr_NoMemory();
   47020           0 :                                 return false;
   47021             :                         }
   47022           0 :                         r->in.computer_name = talloc_str;
   47023             :                 }
   47024             :         }
   47025           0 :         return true;
   47026             : }
   47027             : 
   47028           0 : static PyObject *unpack_py_netr_DsRGetSiteName_args_out(struct netr_DsRGetSiteName *r)
   47029             : {
   47030             :         PyObject *result;
   47031             :         PyObject *py_site;
   47032           0 :         if (*r->out.site == NULL) {
   47033           0 :                 py_site = Py_None;
   47034           0 :                 Py_INCREF(py_site);
   47035             :         } else {
   47036           0 :                 if (*r->out.site == NULL) {
   47037           0 :                         py_site = Py_None;
   47038           0 :                         Py_INCREF(py_site);
   47039             :                 } else {
   47040           0 :                         py_site = PyUnicode_Decode(*r->out.site, strlen(*r->out.site), "utf-8", "ignore");
   47041             :                 }
   47042             :         }
   47043           0 :         result = py_site;
   47044           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   47045           0 :                 PyErr_SetWERROR(r->out.result);
   47046           0 :                 return NULL;
   47047             :         }
   47048             : 
   47049           0 :         return result;
   47050             : }
   47051             : 
   47052             : 
   47053           0 : static PyObject *py_netr_LogonGetDomainInfo_in_get_server_name(PyObject *obj, void *closure)
   47054             : {
   47055           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(obj);
   47056             :         PyObject *py_server_name;
   47057           0 :         if (object->in.server_name == NULL) {
   47058           0 :                 Py_RETURN_NONE;
   47059             :         }
   47060           0 :         if (object->in.server_name == NULL) {
   47061           0 :                 py_server_name = Py_None;
   47062           0 :                 Py_INCREF(py_server_name);
   47063             :         } else {
   47064           0 :                 py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   47065             :         }
   47066           0 :         return py_server_name;
   47067             : }
   47068             : 
   47069           0 : static int py_netr_LogonGetDomainInfo_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   47070             : {
   47071           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(py_obj);
   47072           0 :         if (value == NULL) {
   47073           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   47074           0 :                 return -1;
   47075             :         }
   47076           0 :         object->in.server_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.server_name);
   47077           0 :         if (object->in.server_name == NULL) {
   47078           0 :                 PyErr_NoMemory();
   47079           0 :                 return -1;
   47080             :         }
   47081             :         {
   47082             :                 const char *test_str;
   47083             :                 const char *talloc_str;
   47084           0 :                 PyObject *unicode = NULL;
   47085           0 :                 if (PyUnicode_Check(value)) {
   47086           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   47087           0 :                         if (unicode == NULL) {
   47088           0 :                                 PyErr_NoMemory();
   47089           0 :                                 return -1;
   47090             :                         }
   47091           0 :                         test_str = PyBytes_AS_STRING(unicode);
   47092           0 :                 } else if (PyBytes_Check(value)) {
   47093           0 :                         test_str = PyBytes_AS_STRING(value);
   47094             :                 } else {
   47095           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   47096           0 :                         return -1;
   47097             :                 }
   47098           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   47099           0 :                 if (unicode != NULL) {
   47100           0 :                         Py_DECREF(unicode);
   47101             :                 }
   47102           0 :                 if (talloc_str == NULL) {
   47103           0 :                         PyErr_NoMemory();
   47104           0 :                         return -1;
   47105             :                 }
   47106           0 :                 object->in.server_name = talloc_str;
   47107             :         }
   47108           0 :         return 0;
   47109             : }
   47110             : 
   47111           0 : static PyObject *py_netr_LogonGetDomainInfo_in_get_computer_name(PyObject *obj, void *closure)
   47112             : {
   47113           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(obj);
   47114             :         PyObject *py_computer_name;
   47115           0 :         if (object->in.computer_name == NULL) {
   47116           0 :                 Py_RETURN_NONE;
   47117             :         }
   47118           0 :         if (object->in.computer_name == NULL) {
   47119           0 :                 py_computer_name = Py_None;
   47120           0 :                 Py_INCREF(py_computer_name);
   47121             :         } else {
   47122           0 :                 if (object->in.computer_name == NULL) {
   47123           0 :                         py_computer_name = Py_None;
   47124           0 :                         Py_INCREF(py_computer_name);
   47125             :                 } else {
   47126           0 :                         py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   47127             :                 }
   47128             :         }
   47129           0 :         return py_computer_name;
   47130             : }
   47131             : 
   47132           0 : static int py_netr_LogonGetDomainInfo_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   47133             : {
   47134           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(py_obj);
   47135           0 :         if (value == NULL) {
   47136           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   47137           0 :                 return -1;
   47138             :         }
   47139           0 :         if (value == Py_None) {
   47140           0 :                 object->in.computer_name = NULL;
   47141             :         } else {
   47142           0 :                 object->in.computer_name = NULL;
   47143             :                 {
   47144             :                         const char *test_str;
   47145             :                         const char *talloc_str;
   47146           0 :                         PyObject *unicode = NULL;
   47147           0 :                         if (PyUnicode_Check(value)) {
   47148           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   47149           0 :                                 if (unicode == NULL) {
   47150           0 :                                         PyErr_NoMemory();
   47151           0 :                                         return -1;
   47152             :                                 }
   47153           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   47154           0 :                         } else if (PyBytes_Check(value)) {
   47155           0 :                                 test_str = PyBytes_AS_STRING(value);
   47156             :                         } else {
   47157           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   47158           0 :                                 return -1;
   47159             :                         }
   47160           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   47161           0 :                         if (unicode != NULL) {
   47162           0 :                                 Py_DECREF(unicode);
   47163             :                         }
   47164           0 :                         if (talloc_str == NULL) {
   47165           0 :                                 PyErr_NoMemory();
   47166           0 :                                 return -1;
   47167             :                         }
   47168           0 :                         object->in.computer_name = talloc_str;
   47169             :                 }
   47170             :         }
   47171           0 :         return 0;
   47172             : }
   47173             : 
   47174           0 : static PyObject *py_netr_LogonGetDomainInfo_in_get_credential(PyObject *obj, void *closure)
   47175             : {
   47176           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(obj);
   47177             :         PyObject *py_credential;
   47178           0 :         if (object->in.credential == NULL) {
   47179           0 :                 Py_RETURN_NONE;
   47180             :         }
   47181           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   47182           0 :         return py_credential;
   47183             : }
   47184             : 
   47185           0 : static int py_netr_LogonGetDomainInfo_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   47186             : {
   47187           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(py_obj);
   47188           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   47189           0 :         if (value == NULL) {
   47190           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   47191           0 :                 return -1;
   47192             :         }
   47193           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   47194           0 :         if (object->in.credential == NULL) {
   47195           0 :                 PyErr_NoMemory();
   47196           0 :                 return -1;
   47197             :         }
   47198           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   47199           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   47200           0 :                 PyErr_NoMemory();
   47201           0 :                 return -1;
   47202             :         }
   47203           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   47204           0 :         return 0;
   47205             : }
   47206             : 
   47207           0 : static PyObject *py_netr_LogonGetDomainInfo_in_get_return_authenticator(PyObject *obj, void *closure)
   47208             : {
   47209           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(obj);
   47210             :         PyObject *py_return_authenticator;
   47211           0 :         if (object->in.return_authenticator == NULL) {
   47212           0 :                 Py_RETURN_NONE;
   47213             :         }
   47214           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   47215           0 :         return py_return_authenticator;
   47216             : }
   47217             : 
   47218           0 : static int py_netr_LogonGetDomainInfo_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   47219             : {
   47220           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(py_obj);
   47221           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   47222           0 :         if (value == NULL) {
   47223           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.return_authenticator");
   47224           0 :                 return -1;
   47225             :         }
   47226           0 :         object->in.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.return_authenticator);
   47227           0 :         if (object->in.return_authenticator == NULL) {
   47228           0 :                 PyErr_NoMemory();
   47229           0 :                 return -1;
   47230             :         }
   47231           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   47232           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   47233           0 :                 PyErr_NoMemory();
   47234           0 :                 return -1;
   47235             :         }
   47236           0 :         object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   47237           0 :         return 0;
   47238             : }
   47239             : 
   47240           0 : static PyObject *py_netr_LogonGetDomainInfo_out_get_return_authenticator(PyObject *obj, void *closure)
   47241             : {
   47242           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(obj);
   47243             :         PyObject *py_return_authenticator;
   47244           0 :         if (object->out.return_authenticator == NULL) {
   47245           0 :                 Py_RETURN_NONE;
   47246             :         }
   47247           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   47248           0 :         return py_return_authenticator;
   47249             : }
   47250             : 
   47251           0 : static int py_netr_LogonGetDomainInfo_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   47252             : {
   47253           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(py_obj);
   47254           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   47255           0 :         if (value == NULL) {
   47256           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   47257           0 :                 return -1;
   47258             :         }
   47259           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   47260           0 :         if (object->out.return_authenticator == NULL) {
   47261           0 :                 PyErr_NoMemory();
   47262           0 :                 return -1;
   47263             :         }
   47264           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   47265           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   47266           0 :                 PyErr_NoMemory();
   47267           0 :                 return -1;
   47268             :         }
   47269           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   47270           0 :         return 0;
   47271             : }
   47272             : 
   47273           0 : static PyObject *py_netr_LogonGetDomainInfo_in_get_level(PyObject *obj, void *closure)
   47274             : {
   47275           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(obj);
   47276             :         PyObject *py_level;
   47277           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
   47278           0 :         return py_level;
   47279             : }
   47280             : 
   47281           0 : static int py_netr_LogonGetDomainInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   47282             : {
   47283           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(py_obj);
   47284           0 :         if (value == NULL) {
   47285           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   47286           0 :                 return -1;
   47287             :         }
   47288             :         {
   47289           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   47290           0 :                 if (PyLong_Check(value)) {
   47291             :                         unsigned long long test_var;
   47292           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   47293           0 :                         if (PyErr_Occurred() != NULL) {
   47294           0 :                                 return -1;
   47295             :                         }
   47296           0 :                         if (test_var > uint_max) {
   47297           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   47298             :                                   PyLong_Type.tp_name, uint_max, test_var);
   47299           0 :                                 return -1;
   47300             :                         }
   47301           0 :                         object->in.level = test_var;
   47302             :                 } else {
   47303           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   47304             :                           PyLong_Type.tp_name);
   47305           0 :                         return -1;
   47306             :                 }
   47307             :         }
   47308           0 :         return 0;
   47309             : }
   47310             : 
   47311           0 : static PyObject *py_netr_LogonGetDomainInfo_in_get_query(PyObject *obj, void *closure)
   47312             : {
   47313           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(obj);
   47314             :         PyObject *py_query;
   47315           0 :         if (object->in.query == NULL) {
   47316           0 :                 Py_RETURN_NONE;
   47317             :         }
   47318           0 :         py_query = pyrpc_import_union(&netr_WorkstationInfo_Type, object->in.query, object->in.level, object->in.query, "union netr_WorkstationInfo");
   47319           0 :         if (py_query == NULL) {
   47320           0 :                 return NULL;
   47321             :         }
   47322           0 :         return py_query;
   47323             : }
   47324             : 
   47325           0 : static int py_netr_LogonGetDomainInfo_in_set_query(PyObject *py_obj, PyObject *value, void *closure)
   47326             : {
   47327           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(py_obj);
   47328           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.query));
   47329           0 :         if (value == NULL) {
   47330           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.query");
   47331           0 :                 return -1;
   47332             :         }
   47333           0 :         object->in.query = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.query);
   47334           0 :         if (object->in.query == NULL) {
   47335           0 :                 PyErr_NoMemory();
   47336           0 :                 return -1;
   47337             :         }
   47338             :         {
   47339             :                 union netr_WorkstationInfo *query_switch_1;
   47340           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");
   47341           0 :                 if (query_switch_1 == NULL) {
   47342           0 :                         return -1;
   47343             :                 }
   47344           0 :                 object->in.query = query_switch_1;
   47345             :         }
   47346           0 :         return 0;
   47347             : }
   47348             : 
   47349           0 : static PyObject *py_netr_LogonGetDomainInfo_out_get_info(PyObject *obj, void *closure)
   47350             : {
   47351           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(obj);
   47352             :         PyObject *py_info;
   47353           0 :         if (object->out.info == NULL) {
   47354           0 :                 Py_RETURN_NONE;
   47355             :         }
   47356           0 :         py_info = pyrpc_import_union(&netr_DomainInfo_Type, object->out.info, object->in.level, object->out.info, "union netr_DomainInfo");
   47357           0 :         if (py_info == NULL) {
   47358           0 :                 return NULL;
   47359             :         }
   47360           0 :         return py_info;
   47361             : }
   47362             : 
   47363           0 : static int py_netr_LogonGetDomainInfo_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   47364             : {
   47365           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(py_obj);
   47366           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   47367           0 :         if (value == NULL) {
   47368           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
   47369           0 :                 return -1;
   47370             :         }
   47371           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   47372           0 :         if (object->out.info == NULL) {
   47373           0 :                 PyErr_NoMemory();
   47374           0 :                 return -1;
   47375             :         }
   47376             :         {
   47377             :                 union netr_DomainInfo *info_switch_1;
   47378           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");
   47379           0 :                 if (info_switch_1 == NULL) {
   47380           0 :                         return -1;
   47381             :                 }
   47382           0 :                 object->out.info = info_switch_1;
   47383             :         }
   47384           0 :         return 0;
   47385             : }
   47386             : 
   47387           0 : static PyObject *py_netr_LogonGetDomainInfo_get_result(PyObject *obj, void *closure)
   47388             : {
   47389           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(obj);
   47390             :         PyObject *py_result;
   47391           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   47392           0 :         return py_result;
   47393             : }
   47394             : 
   47395           0 : static int py_netr_LogonGetDomainInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   47396             : {
   47397           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(py_obj);
   47398           0 :         if (value == NULL) {
   47399           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   47400           0 :                 return -1;
   47401             :         }
   47402           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   47403           0 :         return 0;
   47404             : }
   47405             : 
   47406             : static PyGetSetDef py_netr_LogonGetDomainInfo_getsetters[] = {
   47407             :         {
   47408             :                 .name = discard_const_p(char, "in_server_name"),
   47409             :                 .get = py_netr_LogonGetDomainInfo_in_get_server_name,
   47410             :                 .set = py_netr_LogonGetDomainInfo_in_set_server_name,
   47411             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   47412             :         },
   47413             :         {
   47414             :                 .name = discard_const_p(char, "in_computer_name"),
   47415             :                 .get = py_netr_LogonGetDomainInfo_in_get_computer_name,
   47416             :                 .set = py_netr_LogonGetDomainInfo_in_set_computer_name,
   47417             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   47418             :         },
   47419             :         {
   47420             :                 .name = discard_const_p(char, "in_credential"),
   47421             :                 .get = py_netr_LogonGetDomainInfo_in_get_credential,
   47422             :                 .set = py_netr_LogonGetDomainInfo_in_set_credential,
   47423             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   47424             :         },
   47425             :         {
   47426             :                 .name = discard_const_p(char, "in_return_authenticator"),
   47427             :                 .get = py_netr_LogonGetDomainInfo_in_get_return_authenticator,
   47428             :                 .set = py_netr_LogonGetDomainInfo_in_set_return_authenticator,
   47429             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   47430             :         },
   47431             :         {
   47432             :                 .name = discard_const_p(char, "out_return_authenticator"),
   47433             :                 .get = py_netr_LogonGetDomainInfo_out_get_return_authenticator,
   47434             :                 .set = py_netr_LogonGetDomainInfo_out_set_return_authenticator,
   47435             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   47436             :         },
   47437             :         {
   47438             :                 .name = discard_const_p(char, "in_level"),
   47439             :                 .get = py_netr_LogonGetDomainInfo_in_get_level,
   47440             :                 .set = py_netr_LogonGetDomainInfo_in_set_level,
   47441             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   47442             :         },
   47443             :         {
   47444             :                 .name = discard_const_p(char, "in_query"),
   47445             :                 .get = py_netr_LogonGetDomainInfo_in_get_query,
   47446             :                 .set = py_netr_LogonGetDomainInfo_in_set_query,
   47447             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_WorkstationInfo")
   47448             :         },
   47449             :         {
   47450             :                 .name = discard_const_p(char, "out_info"),
   47451             :                 .get = py_netr_LogonGetDomainInfo_out_get_info,
   47452             :                 .set = py_netr_LogonGetDomainInfo_out_set_info,
   47453             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DomainInfo")
   47454             :         },
   47455             :         {
   47456             :                 .name = discard_const_p(char, "result"),
   47457             :                 .get = py_netr_LogonGetDomainInfo_get_result,
   47458             :                 .set = py_netr_LogonGetDomainInfo_set_result,
   47459             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   47460             :         },
   47461             :         { .name = NULL }
   47462             : };
   47463             : 
   47464           0 : static PyObject *py_netr_LogonGetDomainInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   47465             : {
   47466           0 :         PyObject *self = pytalloc_new(struct netr_LogonGetDomainInfo, type);
   47467           0 :         struct netr_LogonGetDomainInfo *_self = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(self);
   47468           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   47469           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   47470           0 :         _self->in.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   47471           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   47472           0 :         _self->in.query = talloc_zero(mem_ctx, union netr_WorkstationInfo);
   47473           0 :         _self->out.info = talloc_zero(mem_ctx, union netr_DomainInfo);
   47474           0 :         return self;
   47475             : }
   47476             : 
   47477           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   47478             : {
   47479             : 
   47480             : 
   47481           0 :         return PyLong_FromLong(29);
   47482             : }
   47483             : 
   47484           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   47485             : {
   47486           0 :         const struct ndr_interface_call *call = NULL;
   47487           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(py_obj);
   47488           0 :         PyObject *ret = NULL;
   47489           0 :         struct ndr_push *push = NULL;
   47490             :         DATA_BLOB blob;
   47491             :         enum ndr_err_code err;
   47492             : 
   47493           0 :         if (ndr_table_netlogon.num_calls < 30) {
   47494           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetDomainInfo_ndr_pack");
   47495           0 :                 return NULL;
   47496             :         }
   47497           0 :         call = &ndr_table_netlogon.calls[29];
   47498             : 
   47499           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   47500           0 :         if (push == NULL) {
   47501           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   47502           0 :                 return NULL;
   47503             :         }
   47504             : 
   47505           0 :         push->flags |= ndr_push_flags;
   47506             : 
   47507           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   47508           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   47509           0 :                 TALLOC_FREE(push);
   47510           0 :                 PyErr_SetNdrError(err);
   47511           0 :                 return NULL;
   47512             :         }
   47513           0 :         blob = ndr_push_blob(push);
   47514           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   47515           0 :         TALLOC_FREE(push);
   47516           0 :         return ret;
   47517             : }
   47518             : 
   47519           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47520             : {
   47521           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   47522           0 :         PyObject *bigendian_obj = NULL;
   47523           0 :         PyObject *ndr64_obj = NULL;
   47524           0 :         uint32_t ndr_push_flags = 0;
   47525             : 
   47526           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   47527             :                 discard_const_p(char *, kwnames),
   47528             :                 &bigendian_obj,
   47529             :                 &ndr64_obj)) {
   47530           0 :                 return NULL;
   47531             :         }
   47532             : 
   47533           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47534           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   47535             :         }
   47536           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47537           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   47538             :         }
   47539             : 
   47540           0 :         return py_netr_LogonGetDomainInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   47541             : }
   47542             : 
   47543           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47544             : {
   47545           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   47546           0 :         PyObject *bigendian_obj = NULL;
   47547           0 :         PyObject *ndr64_obj = NULL;
   47548           0 :         uint32_t ndr_push_flags = 0;
   47549             : 
   47550           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   47551             :                 discard_const_p(char *, kwnames),
   47552             :                 &bigendian_obj,
   47553             :                 &ndr64_obj)) {
   47554           0 :                 return NULL;
   47555             :         }
   47556             : 
   47557           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47558           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   47559             :         }
   47560           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47561           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   47562             :         }
   47563             : 
   47564           0 :         return py_netr_LogonGetDomainInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   47565             : }
   47566             : 
   47567           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   47568             : {
   47569           0 :         const struct ndr_interface_call *call = NULL;
   47570           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(py_obj);
   47571           0 :         struct ndr_pull *pull = NULL;
   47572             :         enum ndr_err_code err;
   47573             : 
   47574           0 :         if (ndr_table_netlogon.num_calls < 30) {
   47575           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetDomainInfo_ndr_unpack");
   47576           0 :                 return NULL;
   47577             :         }
   47578           0 :         call = &ndr_table_netlogon.calls[29];
   47579             : 
   47580           0 :         pull = ndr_pull_init_blob(blob, object);
   47581           0 :         if (pull == NULL) {
   47582           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   47583           0 :                 return NULL;
   47584             :         }
   47585             : 
   47586           0 :         pull->flags |= ndr_pull_flags;
   47587             : 
   47588           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   47589           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   47590           0 :                 TALLOC_FREE(pull);
   47591           0 :                 PyErr_SetNdrError(err);
   47592           0 :                 return NULL;
   47593             :         }
   47594           0 :         if (!allow_remaining) {
   47595             :                 uint32_t highest_ofs;
   47596             : 
   47597           0 :                 if (pull->offset > pull->relative_highest_offset) {
   47598           0 :                         highest_ofs = pull->offset;
   47599             :                 } else {
   47600           0 :                         highest_ofs = pull->relative_highest_offset;
   47601             :                 }
   47602           0 :                 if (highest_ofs < pull->data_size) {
   47603           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   47604             :                                 "not all bytes consumed ofs[%u] size[%u]",
   47605             :                                 highest_ofs, pull->data_size);
   47606           0 :                         TALLOC_FREE(pull);
   47607           0 :                         PyErr_SetNdrError(err);
   47608           0 :                         return NULL;
   47609             :                 }
   47610             :         }
   47611             : 
   47612           0 :         TALLOC_FREE(pull);
   47613           0 :         Py_RETURN_NONE;
   47614             : }
   47615             : 
   47616           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47617             : {
   47618             :         DATA_BLOB blob;
   47619           0 :         Py_ssize_t blob_length = 0;
   47620           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   47621           0 :         PyObject *bigendian_obj = NULL;
   47622           0 :         PyObject *ndr64_obj = NULL;
   47623           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   47624           0 :         PyObject *allow_remaining_obj = NULL;
   47625           0 :         bool allow_remaining = false;
   47626             : 
   47627           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   47628             :                 discard_const_p(char *, kwnames),
   47629             :                 &blob.data, &blob_length,
   47630             :                 &bigendian_obj,
   47631             :                 &ndr64_obj,
   47632             :                 &allow_remaining_obj)) {
   47633           0 :                 return NULL;
   47634             :         }
   47635           0 :         blob.length = blob_length;
   47636             : 
   47637           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47638           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   47639             :         }
   47640           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47641           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   47642             :         }
   47643             : 
   47644           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   47645           0 :                 allow_remaining = true;
   47646             :         }
   47647             : 
   47648           0 :         return py_netr_LogonGetDomainInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   47649             : }
   47650             : 
   47651           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   47652             : {
   47653             :         DATA_BLOB blob;
   47654           0 :         Py_ssize_t blob_length = 0;
   47655           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   47656           0 :         PyObject *bigendian_obj = NULL;
   47657           0 :         PyObject *ndr64_obj = NULL;
   47658           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   47659           0 :         PyObject *allow_remaining_obj = NULL;
   47660           0 :         bool allow_remaining = false;
   47661             : 
   47662           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   47663             :                 discard_const_p(char *, kwnames),
   47664             :                 &blob.data, &blob_length,
   47665             :                 &bigendian_obj,
   47666             :                 &ndr64_obj,
   47667             :                 &allow_remaining_obj)) {
   47668           0 :                 return NULL;
   47669             :         }
   47670           0 :         blob.length = blob_length;
   47671             : 
   47672           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   47673           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   47674             :         }
   47675           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   47676           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   47677             :         }
   47678             : 
   47679           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   47680           0 :                 allow_remaining = true;
   47681             :         }
   47682             : 
   47683           0 :         return py_netr_LogonGetDomainInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   47684             : }
   47685             : 
   47686           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   47687             : {
   47688           0 :         const struct ndr_interface_call *call = NULL;
   47689           0 :         struct netr_LogonGetDomainInfo *object = (struct netr_LogonGetDomainInfo *)pytalloc_get_ptr(py_obj);
   47690             :         PyObject *ret;
   47691             :         char *retstr;
   47692             : 
   47693           0 :         if (ndr_table_netlogon.num_calls < 30) {
   47694           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonGetDomainInfo_ndr_print");
   47695           0 :                 return NULL;
   47696             :         }
   47697           0 :         call = &ndr_table_netlogon.calls[29];
   47698             : 
   47699           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   47700           0 :         ret = PyUnicode_FromString(retstr);
   47701           0 :         TALLOC_FREE(retstr);
   47702             : 
   47703           0 :         return ret;
   47704             : }
   47705             : 
   47706           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   47707             : {
   47708           0 :         return py_netr_LogonGetDomainInfo_ndr_print(py_obj, "netr_LogonGetDomainInfo_in", NDR_IN);
   47709             : }
   47710             : 
   47711           0 : static PyObject *py_netr_LogonGetDomainInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   47712             : {
   47713           0 :         return py_netr_LogonGetDomainInfo_ndr_print(py_obj, "netr_LogonGetDomainInfo_out", NDR_OUT);
   47714             : }
   47715             : 
   47716             : static PyMethodDef py_netr_LogonGetDomainInfo_methods[] = {
   47717             :         { "opnum", (PyCFunction)py_netr_LogonGetDomainInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
   47718             :                 "netlogon.netr_LogonGetDomainInfo.opnum() -> 29 (0x1d) " },
   47719             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetDomainInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   47720             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   47721             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetDomainInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   47722             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   47723             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetDomainInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   47724             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   47725             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonGetDomainInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   47726             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   47727             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonGetDomainInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   47728             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonGetDomainInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   47729             :         { NULL, NULL, 0, NULL }
   47730             : };
   47731             : 
   47732             : 
   47733             : static PyTypeObject netr_LogonGetDomainInfo_Type = {
   47734             :         PyVarObject_HEAD_INIT(NULL, 0)
   47735             :         .tp_name = "netlogon.netr_LogonGetDomainInfo",
   47736             :         .tp_getset = py_netr_LogonGetDomainInfo_getsetters,
   47737             :         .tp_methods = py_netr_LogonGetDomainInfo_methods,
   47738             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   47739             :         .tp_new = py_netr_LogonGetDomainInfo_new,
   47740             : };
   47741             : 
   47742          11 : static bool pack_py_netr_LogonGetDomainInfo_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonGetDomainInfo *r)
   47743             : {
   47744             :         PyObject *py_server_name;
   47745             :         PyObject *py_computer_name;
   47746             :         PyObject *py_credential;
   47747             :         PyObject *py_return_authenticator;
   47748             :         PyObject *py_level;
   47749             :         PyObject *py_query;
   47750          11 :         const char *kwnames[] = {
   47751             :                 "server_name", "computer_name", "credential", "return_authenticator", "level", "query", NULL
   47752             :         };
   47753             : 
   47754          11 :         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)) {
   47755           0 :                 return false;
   47756             :         }
   47757             : 
   47758          11 :         if (py_server_name == NULL) {
   47759           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   47760           0 :                 return false;
   47761             :         }
   47762          11 :         r->in.server_name = talloc_ptrtype(r, r->in.server_name);
   47763          11 :         if (r->in.server_name == NULL) {
   47764           0 :                 PyErr_NoMemory();
   47765           0 :                 return false;
   47766             :         }
   47767             :         {
   47768             :                 const char *test_str;
   47769             :                 const char *talloc_str;
   47770          11 :                 PyObject *unicode = NULL;
   47771          11 :                 if (PyUnicode_Check(py_server_name)) {
   47772          11 :                         unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   47773          11 :                         if (unicode == NULL) {
   47774           0 :                                 PyErr_NoMemory();
   47775           0 :                                 return false;
   47776             :                         }
   47777          11 :                         test_str = PyBytes_AS_STRING(unicode);
   47778           0 :                 } else if (PyBytes_Check(py_server_name)) {
   47779           0 :                         test_str = PyBytes_AS_STRING(py_server_name);
   47780             :                 } else {
   47781           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   47782           0 :                         return false;
   47783             :                 }
   47784          11 :                 talloc_str = talloc_strdup(r, test_str);
   47785          11 :                 if (unicode != NULL) {
   47786          11 :                         Py_DECREF(unicode);
   47787             :                 }
   47788          11 :                 if (talloc_str == NULL) {
   47789           0 :                         PyErr_NoMemory();
   47790           0 :                         return false;
   47791             :                 }
   47792          11 :                 r->in.server_name = talloc_str;
   47793             :         }
   47794          11 :         if (py_computer_name == NULL) {
   47795           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   47796           0 :                 return false;
   47797             :         }
   47798          11 :         if (py_computer_name == Py_None) {
   47799           0 :                 r->in.computer_name = NULL;
   47800             :         } else {
   47801          11 :                 r->in.computer_name = NULL;
   47802             :                 {
   47803             :                         const char *test_str;
   47804             :                         const char *talloc_str;
   47805          11 :                         PyObject *unicode = NULL;
   47806          11 :                         if (PyUnicode_Check(py_computer_name)) {
   47807          11 :                                 unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   47808          11 :                                 if (unicode == NULL) {
   47809           0 :                                         PyErr_NoMemory();
   47810           0 :                                         return false;
   47811             :                                 }
   47812          11 :                                 test_str = PyBytes_AS_STRING(unicode);
   47813           0 :                         } else if (PyBytes_Check(py_computer_name)) {
   47814           0 :                                 test_str = PyBytes_AS_STRING(py_computer_name);
   47815             :                         } else {
   47816           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   47817           0 :                                 return false;
   47818             :                         }
   47819          11 :                         talloc_str = talloc_strdup(r, test_str);
   47820          11 :                         if (unicode != NULL) {
   47821          11 :                                 Py_DECREF(unicode);
   47822             :                         }
   47823          11 :                         if (talloc_str == NULL) {
   47824           0 :                                 PyErr_NoMemory();
   47825           0 :                                 return false;
   47826             :                         }
   47827          11 :                         r->in.computer_name = talloc_str;
   47828             :                 }
   47829             :         }
   47830          11 :         if (py_credential == NULL) {
   47831           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   47832           0 :                 return false;
   47833             :         }
   47834          11 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   47835          11 :         if (r->in.credential == NULL) {
   47836           0 :                 PyErr_NoMemory();
   47837           0 :                 return false;
   47838             :         }
   47839          11 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   47840          11 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   47841           0 :                 PyErr_NoMemory();
   47842           0 :                 return false;
   47843             :         }
   47844          11 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   47845          11 :         if (py_return_authenticator == NULL) {
   47846           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.return_authenticator");
   47847           0 :                 return false;
   47848             :         }
   47849          11 :         r->in.return_authenticator = talloc_ptrtype(r, r->in.return_authenticator);
   47850          11 :         if (r->in.return_authenticator == NULL) {
   47851           0 :                 PyErr_NoMemory();
   47852           0 :                 return false;
   47853             :         }
   47854          11 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   47855          11 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   47856           0 :                 PyErr_NoMemory();
   47857           0 :                 return false;
   47858             :         }
   47859          11 :         r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   47860          11 :         if (py_level == NULL) {
   47861           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   47862           0 :                 return false;
   47863             :         }
   47864             :         {
   47865          11 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   47866          11 :                 if (PyLong_Check(py_level)) {
   47867             :                         unsigned long long test_var;
   47868          11 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   47869          11 :                         if (PyErr_Occurred() != NULL) {
   47870           0 :                                 return false;
   47871             :                         }
   47872          11 :                         if (test_var > uint_max) {
   47873           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   47874             :                                   PyLong_Type.tp_name, uint_max, test_var);
   47875           0 :                                 return false;
   47876             :                         }
   47877          11 :                         r->in.level = test_var;
   47878             :                 } else {
   47879           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   47880             :                           PyLong_Type.tp_name);
   47881           0 :                         return false;
   47882             :                 }
   47883             :         }
   47884          11 :         if (py_query == NULL) {
   47885           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.query");
   47886           0 :                 return false;
   47887             :         }
   47888          11 :         r->in.query = talloc_ptrtype(r, r->in.query);
   47889          11 :         if (r->in.query == NULL) {
   47890           0 :                 PyErr_NoMemory();
   47891           0 :                 return false;
   47892             :         }
   47893             :         {
   47894             :                 union netr_WorkstationInfo *query_switch_1;
   47895          11 :                 query_switch_1 = (union netr_WorkstationInfo *)pyrpc_export_union(&netr_WorkstationInfo_Type, r, r->in.level, py_query, "union netr_WorkstationInfo");
   47896          11 :                 if (query_switch_1 == NULL) {
   47897           0 :                         return false;
   47898             :                 }
   47899          11 :                 r->in.query = query_switch_1;
   47900             :         }
   47901          11 :         return true;
   47902             : }
   47903             : 
   47904          11 : static PyObject *unpack_py_netr_LogonGetDomainInfo_args_out(struct netr_LogonGetDomainInfo *r)
   47905             : {
   47906             :         PyObject *result;
   47907             :         PyObject *py_return_authenticator;
   47908             :         PyObject *py_info;
   47909          11 :         result = PyTuple_New(2);
   47910          11 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   47911          11 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   47912          11 :         py_info = pyrpc_import_union(&netr_DomainInfo_Type, r->out.info, r->in.level, r->out.info, "union netr_DomainInfo");
   47913          11 :         if (py_info == NULL) {
   47914           0 :                 return NULL;
   47915             :         }
   47916          11 :         PyTuple_SetItem(result, 1, py_info);
   47917          11 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   47918           0 :                 PyErr_SetNTSTATUS(r->out.result);
   47919           0 :                 return NULL;
   47920             :         }
   47921             : 
   47922          11 :         return result;
   47923             : }
   47924             : 
   47925             : 
   47926           0 : static PyObject *py_netr_ServerPasswordSet2_in_get_server_name(PyObject *obj, void *closure)
   47927             : {
   47928           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(obj);
   47929             :         PyObject *py_server_name;
   47930           0 :         if (object->in.server_name == NULL) {
   47931           0 :                 Py_RETURN_NONE;
   47932             :         }
   47933           0 :         if (object->in.server_name == NULL) {
   47934           0 :                 py_server_name = Py_None;
   47935           0 :                 Py_INCREF(py_server_name);
   47936             :         } else {
   47937           0 :                 if (object->in.server_name == NULL) {
   47938           0 :                         py_server_name = Py_None;
   47939           0 :                         Py_INCREF(py_server_name);
   47940             :                 } else {
   47941           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   47942             :                 }
   47943             :         }
   47944           0 :         return py_server_name;
   47945             : }
   47946             : 
   47947           0 : static int py_netr_ServerPasswordSet2_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   47948             : {
   47949           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(py_obj);
   47950           0 :         if (value == NULL) {
   47951           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   47952           0 :                 return -1;
   47953             :         }
   47954           0 :         if (value == Py_None) {
   47955           0 :                 object->in.server_name = NULL;
   47956             :         } else {
   47957           0 :                 object->in.server_name = NULL;
   47958             :                 {
   47959             :                         const char *test_str;
   47960             :                         const char *talloc_str;
   47961           0 :                         PyObject *unicode = NULL;
   47962           0 :                         if (PyUnicode_Check(value)) {
   47963           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   47964           0 :                                 if (unicode == NULL) {
   47965           0 :                                         PyErr_NoMemory();
   47966           0 :                                         return -1;
   47967             :                                 }
   47968           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   47969           0 :                         } else if (PyBytes_Check(value)) {
   47970           0 :                                 test_str = PyBytes_AS_STRING(value);
   47971             :                         } else {
   47972           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   47973           0 :                                 return -1;
   47974             :                         }
   47975           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   47976           0 :                         if (unicode != NULL) {
   47977           0 :                                 Py_DECREF(unicode);
   47978             :                         }
   47979           0 :                         if (talloc_str == NULL) {
   47980           0 :                                 PyErr_NoMemory();
   47981           0 :                                 return -1;
   47982             :                         }
   47983           0 :                         object->in.server_name = talloc_str;
   47984             :                 }
   47985             :         }
   47986           0 :         return 0;
   47987             : }
   47988             : 
   47989           0 : static PyObject *py_netr_ServerPasswordSet2_in_get_account_name(PyObject *obj, void *closure)
   47990             : {
   47991           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(obj);
   47992             :         PyObject *py_account_name;
   47993           0 :         if (object->in.account_name == NULL) {
   47994           0 :                 Py_RETURN_NONE;
   47995             :         }
   47996           0 :         if (object->in.account_name == NULL) {
   47997           0 :                 py_account_name = Py_None;
   47998           0 :                 Py_INCREF(py_account_name);
   47999             :         } else {
   48000           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   48001             :         }
   48002           0 :         return py_account_name;
   48003             : }
   48004             : 
   48005           0 : static int py_netr_ServerPasswordSet2_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   48006             : {
   48007           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(py_obj);
   48008           0 :         if (value == NULL) {
   48009           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.account_name");
   48010           0 :                 return -1;
   48011             :         }
   48012           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   48013           0 :         if (object->in.account_name == NULL) {
   48014           0 :                 PyErr_NoMemory();
   48015           0 :                 return -1;
   48016             :         }
   48017             :         {
   48018             :                 const char *test_str;
   48019             :                 const char *talloc_str;
   48020           0 :                 PyObject *unicode = NULL;
   48021           0 :                 if (PyUnicode_Check(value)) {
   48022           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   48023           0 :                         if (unicode == NULL) {
   48024           0 :                                 PyErr_NoMemory();
   48025           0 :                                 return -1;
   48026             :                         }
   48027           0 :                         test_str = PyBytes_AS_STRING(unicode);
   48028           0 :                 } else if (PyBytes_Check(value)) {
   48029           0 :                         test_str = PyBytes_AS_STRING(value);
   48030             :                 } else {
   48031           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   48032           0 :                         return -1;
   48033             :                 }
   48034           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   48035           0 :                 if (unicode != NULL) {
   48036           0 :                         Py_DECREF(unicode);
   48037             :                 }
   48038           0 :                 if (talloc_str == NULL) {
   48039           0 :                         PyErr_NoMemory();
   48040           0 :                         return -1;
   48041             :                 }
   48042           0 :                 object->in.account_name = talloc_str;
   48043             :         }
   48044           0 :         return 0;
   48045             : }
   48046             : 
   48047           0 : static PyObject *py_netr_ServerPasswordSet2_in_get_secure_channel_type(PyObject *obj, void *closure)
   48048             : {
   48049           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(obj);
   48050             :         PyObject *py_secure_channel_type;
   48051           0 :         py_secure_channel_type = PyLong_FromLong((uint16_t)object->in.secure_channel_type);
   48052           0 :         return py_secure_channel_type;
   48053             : }
   48054             : 
   48055           0 : static int py_netr_ServerPasswordSet2_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
   48056             : {
   48057           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(py_obj);
   48058           0 :         if (value == NULL) {
   48059           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.secure_channel_type");
   48060           0 :                 return -1;
   48061             :         }
   48062             :         {
   48063           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
   48064           0 :                 if (PyLong_Check(value)) {
   48065             :                         unsigned long long test_var;
   48066           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   48067           0 :                         if (PyErr_Occurred() != NULL) {
   48068           0 :                                 return -1;
   48069             :                         }
   48070           0 :                         if (test_var > uint_max) {
   48071           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   48072             :                                   PyLong_Type.tp_name, uint_max, test_var);
   48073           0 :                                 return -1;
   48074             :                         }
   48075           0 :                         object->in.secure_channel_type = test_var;
   48076             :                 } else {
   48077           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   48078             :                           PyLong_Type.tp_name);
   48079           0 :                         return -1;
   48080             :                 }
   48081             :         }
   48082           0 :         return 0;
   48083             : }
   48084             : 
   48085           0 : static PyObject *py_netr_ServerPasswordSet2_in_get_computer_name(PyObject *obj, void *closure)
   48086             : {
   48087           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(obj);
   48088             :         PyObject *py_computer_name;
   48089           0 :         if (object->in.computer_name == NULL) {
   48090           0 :                 Py_RETURN_NONE;
   48091             :         }
   48092           0 :         if (object->in.computer_name == NULL) {
   48093           0 :                 py_computer_name = Py_None;
   48094           0 :                 Py_INCREF(py_computer_name);
   48095             :         } else {
   48096           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   48097             :         }
   48098           0 :         return py_computer_name;
   48099             : }
   48100             : 
   48101           0 : static int py_netr_ServerPasswordSet2_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   48102             : {
   48103           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(py_obj);
   48104           0 :         if (value == NULL) {
   48105           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   48106           0 :                 return -1;
   48107             :         }
   48108           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   48109           0 :         if (object->in.computer_name == NULL) {
   48110           0 :                 PyErr_NoMemory();
   48111           0 :                 return -1;
   48112             :         }
   48113             :         {
   48114             :                 const char *test_str;
   48115             :                 const char *talloc_str;
   48116           0 :                 PyObject *unicode = NULL;
   48117           0 :                 if (PyUnicode_Check(value)) {
   48118           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   48119           0 :                         if (unicode == NULL) {
   48120           0 :                                 PyErr_NoMemory();
   48121           0 :                                 return -1;
   48122             :                         }
   48123           0 :                         test_str = PyBytes_AS_STRING(unicode);
   48124           0 :                 } else if (PyBytes_Check(value)) {
   48125           0 :                         test_str = PyBytes_AS_STRING(value);
   48126             :                 } else {
   48127           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   48128           0 :                         return -1;
   48129             :                 }
   48130           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   48131           0 :                 if (unicode != NULL) {
   48132           0 :                         Py_DECREF(unicode);
   48133             :                 }
   48134           0 :                 if (talloc_str == NULL) {
   48135           0 :                         PyErr_NoMemory();
   48136           0 :                         return -1;
   48137             :                 }
   48138           0 :                 object->in.computer_name = talloc_str;
   48139             :         }
   48140           0 :         return 0;
   48141             : }
   48142             : 
   48143           0 : static PyObject *py_netr_ServerPasswordSet2_in_get_credential(PyObject *obj, void *closure)
   48144             : {
   48145           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(obj);
   48146             :         PyObject *py_credential;
   48147           0 :         if (object->in.credential == NULL) {
   48148           0 :                 Py_RETURN_NONE;
   48149             :         }
   48150           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   48151           0 :         return py_credential;
   48152             : }
   48153             : 
   48154           0 : static int py_netr_ServerPasswordSet2_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   48155             : {
   48156           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(py_obj);
   48157           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   48158           0 :         if (value == NULL) {
   48159           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   48160           0 :                 return -1;
   48161             :         }
   48162           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   48163           0 :         if (object->in.credential == NULL) {
   48164           0 :                 PyErr_NoMemory();
   48165           0 :                 return -1;
   48166             :         }
   48167           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   48168           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   48169           0 :                 PyErr_NoMemory();
   48170           0 :                 return -1;
   48171             :         }
   48172           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   48173           0 :         return 0;
   48174             : }
   48175             : 
   48176           0 : static PyObject *py_netr_ServerPasswordSet2_out_get_return_authenticator(PyObject *obj, void *closure)
   48177             : {
   48178           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(obj);
   48179             :         PyObject *py_return_authenticator;
   48180           0 :         if (object->out.return_authenticator == NULL) {
   48181           0 :                 Py_RETURN_NONE;
   48182             :         }
   48183           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   48184           0 :         return py_return_authenticator;
   48185             : }
   48186             : 
   48187           0 : static int py_netr_ServerPasswordSet2_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   48188             : {
   48189           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(py_obj);
   48190           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   48191           0 :         if (value == NULL) {
   48192           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   48193           0 :                 return -1;
   48194             :         }
   48195           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   48196           0 :         if (object->out.return_authenticator == NULL) {
   48197           0 :                 PyErr_NoMemory();
   48198           0 :                 return -1;
   48199             :         }
   48200           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   48201           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   48202           0 :                 PyErr_NoMemory();
   48203           0 :                 return -1;
   48204             :         }
   48205           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   48206           0 :         return 0;
   48207             : }
   48208             : 
   48209           0 : static PyObject *py_netr_ServerPasswordSet2_in_get_new_password(PyObject *obj, void *closure)
   48210             : {
   48211           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(obj);
   48212             :         PyObject *py_new_password;
   48213           0 :         if (object->in.new_password == NULL) {
   48214           0 :                 Py_RETURN_NONE;
   48215             :         }
   48216           0 :         py_new_password = pytalloc_reference_ex(&netr_CryptPassword_Type, object->in.new_password, object->in.new_password);
   48217           0 :         return py_new_password;
   48218             : }
   48219             : 
   48220           0 : static int py_netr_ServerPasswordSet2_in_set_new_password(PyObject *py_obj, PyObject *value, void *closure)
   48221             : {
   48222           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(py_obj);
   48223           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.new_password));
   48224           0 :         if (value == NULL) {
   48225           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.new_password");
   48226           0 :                 return -1;
   48227             :         }
   48228           0 :         object->in.new_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.new_password);
   48229           0 :         if (object->in.new_password == NULL) {
   48230           0 :                 PyErr_NoMemory();
   48231           0 :                 return -1;
   48232             :         }
   48233           0 :         PY_CHECK_TYPE(&netr_CryptPassword_Type, value, return -1;);
   48234           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   48235           0 :                 PyErr_NoMemory();
   48236           0 :                 return -1;
   48237             :         }
   48238           0 :         object->in.new_password = (struct netr_CryptPassword *)pytalloc_get_ptr(value);
   48239           0 :         return 0;
   48240             : }
   48241             : 
   48242           0 : static PyObject *py_netr_ServerPasswordSet2_get_result(PyObject *obj, void *closure)
   48243             : {
   48244           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(obj);
   48245             :         PyObject *py_result;
   48246           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   48247           0 :         return py_result;
   48248             : }
   48249             : 
   48250           0 : static int py_netr_ServerPasswordSet2_set_result(PyObject *py_obj, PyObject *value, void *closure)
   48251             : {
   48252           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(py_obj);
   48253           0 :         if (value == NULL) {
   48254           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   48255           0 :                 return -1;
   48256             :         }
   48257           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   48258           0 :         return 0;
   48259             : }
   48260             : 
   48261             : static PyGetSetDef py_netr_ServerPasswordSet2_getsetters[] = {
   48262             :         {
   48263             :                 .name = discard_const_p(char, "in_server_name"),
   48264             :                 .get = py_netr_ServerPasswordSet2_in_get_server_name,
   48265             :                 .set = py_netr_ServerPasswordSet2_in_set_server_name,
   48266             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   48267             :         },
   48268             :         {
   48269             :                 .name = discard_const_p(char, "in_account_name"),
   48270             :                 .get = py_netr_ServerPasswordSet2_in_get_account_name,
   48271             :                 .set = py_netr_ServerPasswordSet2_in_set_account_name,
   48272             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   48273             :         },
   48274             :         {
   48275             :                 .name = discard_const_p(char, "in_secure_channel_type"),
   48276             :                 .get = py_netr_ServerPasswordSet2_in_get_secure_channel_type,
   48277             :                 .set = py_netr_ServerPasswordSet2_in_set_secure_channel_type,
   48278             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
   48279             :         },
   48280             :         {
   48281             :                 .name = discard_const_p(char, "in_computer_name"),
   48282             :                 .get = py_netr_ServerPasswordSet2_in_get_computer_name,
   48283             :                 .set = py_netr_ServerPasswordSet2_in_set_computer_name,
   48284             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   48285             :         },
   48286             :         {
   48287             :                 .name = discard_const_p(char, "in_credential"),
   48288             :                 .get = py_netr_ServerPasswordSet2_in_get_credential,
   48289             :                 .set = py_netr_ServerPasswordSet2_in_set_credential,
   48290             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   48291             :         },
   48292             :         {
   48293             :                 .name = discard_const_p(char, "out_return_authenticator"),
   48294             :                 .get = py_netr_ServerPasswordSet2_out_get_return_authenticator,
   48295             :                 .set = py_netr_ServerPasswordSet2_out_set_return_authenticator,
   48296             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   48297             :         },
   48298             :         {
   48299             :                 .name = discard_const_p(char, "in_new_password"),
   48300             :                 .get = py_netr_ServerPasswordSet2_in_get_new_password,
   48301             :                 .set = py_netr_ServerPasswordSet2_in_set_new_password,
   48302             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_CryptPassword")
   48303             :         },
   48304             :         {
   48305             :                 .name = discard_const_p(char, "result"),
   48306             :                 .get = py_netr_ServerPasswordSet2_get_result,
   48307             :                 .set = py_netr_ServerPasswordSet2_set_result,
   48308             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   48309             :         },
   48310             :         { .name = NULL }
   48311             : };
   48312             : 
   48313           0 : static PyObject *py_netr_ServerPasswordSet2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   48314             : {
   48315           0 :         PyObject *self = pytalloc_new(struct netr_ServerPasswordSet2, type);
   48316           0 :         struct netr_ServerPasswordSet2 *_self = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(self);
   48317           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   48318           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   48319           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   48320           0 :         _self->in.new_password = talloc_zero(mem_ctx, struct netr_CryptPassword);
   48321           0 :         return self;
   48322             : }
   48323             : 
   48324           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   48325             : {
   48326             : 
   48327             : 
   48328           0 :         return PyLong_FromLong(30);
   48329             : }
   48330             : 
   48331           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   48332             : {
   48333           0 :         const struct ndr_interface_call *call = NULL;
   48334           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(py_obj);
   48335           0 :         PyObject *ret = NULL;
   48336           0 :         struct ndr_push *push = NULL;
   48337             :         DATA_BLOB blob;
   48338             :         enum ndr_err_code err;
   48339             : 
   48340           0 :         if (ndr_table_netlogon.num_calls < 31) {
   48341           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordSet2_ndr_pack");
   48342           0 :                 return NULL;
   48343             :         }
   48344           0 :         call = &ndr_table_netlogon.calls[30];
   48345             : 
   48346           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   48347           0 :         if (push == NULL) {
   48348           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   48349           0 :                 return NULL;
   48350             :         }
   48351             : 
   48352           0 :         push->flags |= ndr_push_flags;
   48353             : 
   48354           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   48355           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   48356           0 :                 TALLOC_FREE(push);
   48357           0 :                 PyErr_SetNdrError(err);
   48358           0 :                 return NULL;
   48359             :         }
   48360           0 :         blob = ndr_push_blob(push);
   48361           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   48362           0 :         TALLOC_FREE(push);
   48363           0 :         return ret;
   48364             : }
   48365             : 
   48366           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48367             : {
   48368           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   48369           0 :         PyObject *bigendian_obj = NULL;
   48370           0 :         PyObject *ndr64_obj = NULL;
   48371           0 :         uint32_t ndr_push_flags = 0;
   48372             : 
   48373           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   48374             :                 discard_const_p(char *, kwnames),
   48375             :                 &bigendian_obj,
   48376             :                 &ndr64_obj)) {
   48377           0 :                 return NULL;
   48378             :         }
   48379             : 
   48380           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48381           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   48382             :         }
   48383           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48384           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   48385             :         }
   48386             : 
   48387           0 :         return py_netr_ServerPasswordSet2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   48388             : }
   48389             : 
   48390           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48391             : {
   48392           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   48393           0 :         PyObject *bigendian_obj = NULL;
   48394           0 :         PyObject *ndr64_obj = NULL;
   48395           0 :         uint32_t ndr_push_flags = 0;
   48396             : 
   48397           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   48398             :                 discard_const_p(char *, kwnames),
   48399             :                 &bigendian_obj,
   48400             :                 &ndr64_obj)) {
   48401           0 :                 return NULL;
   48402             :         }
   48403             : 
   48404           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48405           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   48406             :         }
   48407           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48408           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   48409             :         }
   48410             : 
   48411           0 :         return py_netr_ServerPasswordSet2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   48412             : }
   48413             : 
   48414           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   48415             : {
   48416           0 :         const struct ndr_interface_call *call = NULL;
   48417           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(py_obj);
   48418           0 :         struct ndr_pull *pull = NULL;
   48419             :         enum ndr_err_code err;
   48420             : 
   48421           0 :         if (ndr_table_netlogon.num_calls < 31) {
   48422           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordSet2_ndr_unpack");
   48423           0 :                 return NULL;
   48424             :         }
   48425           0 :         call = &ndr_table_netlogon.calls[30];
   48426             : 
   48427           0 :         pull = ndr_pull_init_blob(blob, object);
   48428           0 :         if (pull == NULL) {
   48429           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   48430           0 :                 return NULL;
   48431             :         }
   48432             : 
   48433           0 :         pull->flags |= ndr_pull_flags;
   48434             : 
   48435           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   48436           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   48437           0 :                 TALLOC_FREE(pull);
   48438           0 :                 PyErr_SetNdrError(err);
   48439           0 :                 return NULL;
   48440             :         }
   48441           0 :         if (!allow_remaining) {
   48442             :                 uint32_t highest_ofs;
   48443             : 
   48444           0 :                 if (pull->offset > pull->relative_highest_offset) {
   48445           0 :                         highest_ofs = pull->offset;
   48446             :                 } else {
   48447           0 :                         highest_ofs = pull->relative_highest_offset;
   48448             :                 }
   48449           0 :                 if (highest_ofs < pull->data_size) {
   48450           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   48451             :                                 "not all bytes consumed ofs[%u] size[%u]",
   48452             :                                 highest_ofs, pull->data_size);
   48453           0 :                         TALLOC_FREE(pull);
   48454           0 :                         PyErr_SetNdrError(err);
   48455           0 :                         return NULL;
   48456             :                 }
   48457             :         }
   48458             : 
   48459           0 :         TALLOC_FREE(pull);
   48460           0 :         Py_RETURN_NONE;
   48461             : }
   48462             : 
   48463           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48464             : {
   48465             :         DATA_BLOB blob;
   48466           0 :         Py_ssize_t blob_length = 0;
   48467           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   48468           0 :         PyObject *bigendian_obj = NULL;
   48469           0 :         PyObject *ndr64_obj = NULL;
   48470           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   48471           0 :         PyObject *allow_remaining_obj = NULL;
   48472           0 :         bool allow_remaining = false;
   48473             : 
   48474           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   48475             :                 discard_const_p(char *, kwnames),
   48476             :                 &blob.data, &blob_length,
   48477             :                 &bigendian_obj,
   48478             :                 &ndr64_obj,
   48479             :                 &allow_remaining_obj)) {
   48480           0 :                 return NULL;
   48481             :         }
   48482           0 :         blob.length = blob_length;
   48483             : 
   48484           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48485           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   48486             :         }
   48487           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48488           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   48489             :         }
   48490             : 
   48491           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   48492           0 :                 allow_remaining = true;
   48493             :         }
   48494             : 
   48495           0 :         return py_netr_ServerPasswordSet2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   48496             : }
   48497             : 
   48498           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   48499             : {
   48500             :         DATA_BLOB blob;
   48501           0 :         Py_ssize_t blob_length = 0;
   48502           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   48503           0 :         PyObject *bigendian_obj = NULL;
   48504           0 :         PyObject *ndr64_obj = NULL;
   48505           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   48506           0 :         PyObject *allow_remaining_obj = NULL;
   48507           0 :         bool allow_remaining = false;
   48508             : 
   48509           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   48510             :                 discard_const_p(char *, kwnames),
   48511             :                 &blob.data, &blob_length,
   48512             :                 &bigendian_obj,
   48513             :                 &ndr64_obj,
   48514             :                 &allow_remaining_obj)) {
   48515           0 :                 return NULL;
   48516             :         }
   48517           0 :         blob.length = blob_length;
   48518             : 
   48519           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   48520           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   48521             :         }
   48522           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   48523           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   48524             :         }
   48525             : 
   48526           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   48527           0 :                 allow_remaining = true;
   48528             :         }
   48529             : 
   48530           0 :         return py_netr_ServerPasswordSet2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   48531             : }
   48532             : 
   48533           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   48534             : {
   48535           0 :         const struct ndr_interface_call *call = NULL;
   48536           0 :         struct netr_ServerPasswordSet2 *object = (struct netr_ServerPasswordSet2 *)pytalloc_get_ptr(py_obj);
   48537             :         PyObject *ret;
   48538             :         char *retstr;
   48539             : 
   48540           0 :         if (ndr_table_netlogon.num_calls < 31) {
   48541           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordSet2_ndr_print");
   48542           0 :                 return NULL;
   48543             :         }
   48544           0 :         call = &ndr_table_netlogon.calls[30];
   48545             : 
   48546           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   48547           0 :         ret = PyUnicode_FromString(retstr);
   48548           0 :         TALLOC_FREE(retstr);
   48549             : 
   48550           0 :         return ret;
   48551             : }
   48552             : 
   48553           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   48554             : {
   48555           0 :         return py_netr_ServerPasswordSet2_ndr_print(py_obj, "netr_ServerPasswordSet2_in", NDR_IN);
   48556             : }
   48557             : 
   48558           0 : static PyObject *py_netr_ServerPasswordSet2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   48559             : {
   48560           0 :         return py_netr_ServerPasswordSet2_ndr_print(py_obj, "netr_ServerPasswordSet2_out", NDR_OUT);
   48561             : }
   48562             : 
   48563             : static PyMethodDef py_netr_ServerPasswordSet2_methods[] = {
   48564             :         { "opnum", (PyCFunction)py_netr_ServerPasswordSet2_ndr_opnum, METH_NOARGS|METH_CLASS,
   48565             :                 "netlogon.netr_ServerPasswordSet2.opnum() -> 30 (0x1e) " },
   48566             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   48567             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   48568             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   48569             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   48570             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   48571             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   48572             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordSet2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   48573             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   48574             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerPasswordSet2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   48575             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerPasswordSet2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   48576             :         { NULL, NULL, 0, NULL }
   48577             : };
   48578             : 
   48579             : 
   48580             : static PyTypeObject netr_ServerPasswordSet2_Type = {
   48581             :         PyVarObject_HEAD_INIT(NULL, 0)
   48582             :         .tp_name = "netlogon.netr_ServerPasswordSet2",
   48583             :         .tp_getset = py_netr_ServerPasswordSet2_getsetters,
   48584             :         .tp_methods = py_netr_ServerPasswordSet2_methods,
   48585             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   48586             :         .tp_new = py_netr_ServerPasswordSet2_new,
   48587             : };
   48588             : 
   48589           4 : static bool pack_py_netr_ServerPasswordSet2_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerPasswordSet2 *r)
   48590             : {
   48591             :         PyObject *py_server_name;
   48592             :         PyObject *py_account_name;
   48593             :         PyObject *py_secure_channel_type;
   48594             :         PyObject *py_computer_name;
   48595             :         PyObject *py_credential;
   48596             :         PyObject *py_new_password;
   48597           4 :         const char *kwnames[] = {
   48598             :                 "server_name", "account_name", "secure_channel_type", "computer_name", "credential", "new_password", NULL
   48599             :         };
   48600             : 
   48601           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)) {
   48602           0 :                 return false;
   48603             :         }
   48604             : 
   48605           4 :         if (py_server_name == NULL) {
   48606           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   48607           0 :                 return false;
   48608             :         }
   48609           4 :         if (py_server_name == Py_None) {
   48610           0 :                 r->in.server_name = NULL;
   48611             :         } else {
   48612           4 :                 r->in.server_name = NULL;
   48613             :                 {
   48614             :                         const char *test_str;
   48615             :                         const char *talloc_str;
   48616           4 :                         PyObject *unicode = NULL;
   48617           4 :                         if (PyUnicode_Check(py_server_name)) {
   48618           4 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   48619           4 :                                 if (unicode == NULL) {
   48620           0 :                                         PyErr_NoMemory();
   48621           0 :                                         return false;
   48622             :                                 }
   48623           4 :                                 test_str = PyBytes_AS_STRING(unicode);
   48624           0 :                         } else if (PyBytes_Check(py_server_name)) {
   48625           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   48626             :                         } else {
   48627           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   48628           0 :                                 return false;
   48629             :                         }
   48630           4 :                         talloc_str = talloc_strdup(r, test_str);
   48631           4 :                         if (unicode != NULL) {
   48632           4 :                                 Py_DECREF(unicode);
   48633             :                         }
   48634           4 :                         if (talloc_str == NULL) {
   48635           0 :                                 PyErr_NoMemory();
   48636           0 :                                 return false;
   48637             :                         }
   48638           4 :                         r->in.server_name = talloc_str;
   48639             :                 }
   48640             :         }
   48641           4 :         if (py_account_name == NULL) {
   48642           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.account_name");
   48643           0 :                 return false;
   48644             :         }
   48645           4 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   48646           4 :         if (r->in.account_name == NULL) {
   48647           0 :                 PyErr_NoMemory();
   48648           0 :                 return false;
   48649             :         }
   48650             :         {
   48651             :                 const char *test_str;
   48652             :                 const char *talloc_str;
   48653           4 :                 PyObject *unicode = NULL;
   48654           4 :                 if (PyUnicode_Check(py_account_name)) {
   48655           4 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   48656           4 :                         if (unicode == NULL) {
   48657           0 :                                 PyErr_NoMemory();
   48658           0 :                                 return false;
   48659             :                         }
   48660           4 :                         test_str = PyBytes_AS_STRING(unicode);
   48661           0 :                 } else if (PyBytes_Check(py_account_name)) {
   48662           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   48663             :                 } else {
   48664           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   48665           0 :                         return false;
   48666             :                 }
   48667           4 :                 talloc_str = talloc_strdup(r, test_str);
   48668           4 :                 if (unicode != NULL) {
   48669           4 :                         Py_DECREF(unicode);
   48670             :                 }
   48671           4 :                 if (talloc_str == NULL) {
   48672           0 :                         PyErr_NoMemory();
   48673           0 :                         return false;
   48674             :                 }
   48675           4 :                 r->in.account_name = talloc_str;
   48676             :         }
   48677           4 :         if (py_secure_channel_type == NULL) {
   48678           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.secure_channel_type");
   48679           0 :                 return false;
   48680             :         }
   48681             :         {
   48682           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
   48683           4 :                 if (PyLong_Check(py_secure_channel_type)) {
   48684             :                         unsigned long long test_var;
   48685           4 :                         test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
   48686           4 :                         if (PyErr_Occurred() != NULL) {
   48687           0 :                                 return false;
   48688             :                         }
   48689           4 :                         if (test_var > uint_max) {
   48690           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   48691             :                                   PyLong_Type.tp_name, uint_max, test_var);
   48692           0 :                                 return false;
   48693             :                         }
   48694           4 :                         r->in.secure_channel_type = test_var;
   48695             :                 } else {
   48696           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   48697             :                           PyLong_Type.tp_name);
   48698           0 :                         return false;
   48699             :                 }
   48700             :         }
   48701           4 :         if (py_computer_name == NULL) {
   48702           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   48703           0 :                 return false;
   48704             :         }
   48705           4 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   48706           4 :         if (r->in.computer_name == NULL) {
   48707           0 :                 PyErr_NoMemory();
   48708           0 :                 return false;
   48709             :         }
   48710             :         {
   48711             :                 const char *test_str;
   48712             :                 const char *talloc_str;
   48713           4 :                 PyObject *unicode = NULL;
   48714           4 :                 if (PyUnicode_Check(py_computer_name)) {
   48715           4 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   48716           4 :                         if (unicode == NULL) {
   48717           0 :                                 PyErr_NoMemory();
   48718           0 :                                 return false;
   48719             :                         }
   48720           4 :                         test_str = PyBytes_AS_STRING(unicode);
   48721           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   48722           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   48723             :                 } else {
   48724           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   48725           0 :                         return false;
   48726             :                 }
   48727           4 :                 talloc_str = talloc_strdup(r, test_str);
   48728           4 :                 if (unicode != NULL) {
   48729           4 :                         Py_DECREF(unicode);
   48730             :                 }
   48731           4 :                 if (talloc_str == NULL) {
   48732           0 :                         PyErr_NoMemory();
   48733           0 :                         return false;
   48734             :                 }
   48735           4 :                 r->in.computer_name = talloc_str;
   48736             :         }
   48737           4 :         if (py_credential == NULL) {
   48738           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   48739           0 :                 return false;
   48740             :         }
   48741           4 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   48742           4 :         if (r->in.credential == NULL) {
   48743           0 :                 PyErr_NoMemory();
   48744           0 :                 return false;
   48745             :         }
   48746           4 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   48747           4 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   48748           0 :                 PyErr_NoMemory();
   48749           0 :                 return false;
   48750             :         }
   48751           4 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   48752           4 :         if (py_new_password == NULL) {
   48753           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.new_password");
   48754           0 :                 return false;
   48755             :         }
   48756           4 :         r->in.new_password = talloc_ptrtype(r, r->in.new_password);
   48757           4 :         if (r->in.new_password == NULL) {
   48758           0 :                 PyErr_NoMemory();
   48759           0 :                 return false;
   48760             :         }
   48761           4 :         PY_CHECK_TYPE(&netr_CryptPassword_Type, py_new_password, return false;);
   48762           4 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_new_password)) == NULL) {
   48763           0 :                 PyErr_NoMemory();
   48764           0 :                 return false;
   48765             :         }
   48766           4 :         r->in.new_password = (struct netr_CryptPassword *)pytalloc_get_ptr(py_new_password);
   48767           4 :         return true;
   48768             : }
   48769             : 
   48770           4 : static PyObject *unpack_py_netr_ServerPasswordSet2_args_out(struct netr_ServerPasswordSet2 *r)
   48771             : {
   48772             :         PyObject *result;
   48773             :         PyObject *py_return_authenticator;
   48774           4 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   48775           4 :         result = py_return_authenticator;
   48776           4 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   48777           0 :                 PyErr_SetNTSTATUS(r->out.result);
   48778           0 :                 return NULL;
   48779             :         }
   48780             : 
   48781           4 :         return result;
   48782             : }
   48783             : 
   48784             : 
   48785           0 : static PyObject *py_netr_ServerPasswordGet_in_get_server_name(PyObject *obj, void *closure)
   48786             : {
   48787           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(obj);
   48788             :         PyObject *py_server_name;
   48789           0 :         if (object->in.server_name == NULL) {
   48790           0 :                 Py_RETURN_NONE;
   48791             :         }
   48792           0 :         if (object->in.server_name == NULL) {
   48793           0 :                 py_server_name = Py_None;
   48794           0 :                 Py_INCREF(py_server_name);
   48795             :         } else {
   48796           0 :                 if (object->in.server_name == NULL) {
   48797           0 :                         py_server_name = Py_None;
   48798           0 :                         Py_INCREF(py_server_name);
   48799             :                 } else {
   48800           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   48801             :                 }
   48802             :         }
   48803           0 :         return py_server_name;
   48804             : }
   48805             : 
   48806           0 : static int py_netr_ServerPasswordGet_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   48807             : {
   48808           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(py_obj);
   48809           0 :         if (value == NULL) {
   48810           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   48811           0 :                 return -1;
   48812             :         }
   48813           0 :         if (value == Py_None) {
   48814           0 :                 object->in.server_name = NULL;
   48815             :         } else {
   48816           0 :                 object->in.server_name = NULL;
   48817             :                 {
   48818             :                         const char *test_str;
   48819             :                         const char *talloc_str;
   48820           0 :                         PyObject *unicode = NULL;
   48821           0 :                         if (PyUnicode_Check(value)) {
   48822           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   48823           0 :                                 if (unicode == NULL) {
   48824           0 :                                         PyErr_NoMemory();
   48825           0 :                                         return -1;
   48826             :                                 }
   48827           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   48828           0 :                         } else if (PyBytes_Check(value)) {
   48829           0 :                                 test_str = PyBytes_AS_STRING(value);
   48830             :                         } else {
   48831           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   48832           0 :                                 return -1;
   48833             :                         }
   48834           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   48835           0 :                         if (unicode != NULL) {
   48836           0 :                                 Py_DECREF(unicode);
   48837             :                         }
   48838           0 :                         if (talloc_str == NULL) {
   48839           0 :                                 PyErr_NoMemory();
   48840           0 :                                 return -1;
   48841             :                         }
   48842           0 :                         object->in.server_name = talloc_str;
   48843             :                 }
   48844             :         }
   48845           0 :         return 0;
   48846             : }
   48847             : 
   48848           0 : static PyObject *py_netr_ServerPasswordGet_in_get_account_name(PyObject *obj, void *closure)
   48849             : {
   48850           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(obj);
   48851             :         PyObject *py_account_name;
   48852           0 :         if (object->in.account_name == NULL) {
   48853           0 :                 Py_RETURN_NONE;
   48854             :         }
   48855           0 :         if (object->in.account_name == NULL) {
   48856           0 :                 py_account_name = Py_None;
   48857           0 :                 Py_INCREF(py_account_name);
   48858             :         } else {
   48859           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   48860             :         }
   48861           0 :         return py_account_name;
   48862             : }
   48863             : 
   48864           0 : static int py_netr_ServerPasswordGet_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   48865             : {
   48866           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(py_obj);
   48867           0 :         if (value == NULL) {
   48868           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.account_name");
   48869           0 :                 return -1;
   48870             :         }
   48871           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   48872           0 :         if (object->in.account_name == NULL) {
   48873           0 :                 PyErr_NoMemory();
   48874           0 :                 return -1;
   48875             :         }
   48876             :         {
   48877             :                 const char *test_str;
   48878             :                 const char *talloc_str;
   48879           0 :                 PyObject *unicode = NULL;
   48880           0 :                 if (PyUnicode_Check(value)) {
   48881           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   48882           0 :                         if (unicode == NULL) {
   48883           0 :                                 PyErr_NoMemory();
   48884           0 :                                 return -1;
   48885             :                         }
   48886           0 :                         test_str = PyBytes_AS_STRING(unicode);
   48887           0 :                 } else if (PyBytes_Check(value)) {
   48888           0 :                         test_str = PyBytes_AS_STRING(value);
   48889             :                 } else {
   48890           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   48891           0 :                         return -1;
   48892             :                 }
   48893           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   48894           0 :                 if (unicode != NULL) {
   48895           0 :                         Py_DECREF(unicode);
   48896             :                 }
   48897           0 :                 if (talloc_str == NULL) {
   48898           0 :                         PyErr_NoMemory();
   48899           0 :                         return -1;
   48900             :                 }
   48901           0 :                 object->in.account_name = talloc_str;
   48902             :         }
   48903           0 :         return 0;
   48904             : }
   48905             : 
   48906           0 : static PyObject *py_netr_ServerPasswordGet_in_get_secure_channel_type(PyObject *obj, void *closure)
   48907             : {
   48908           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(obj);
   48909             :         PyObject *py_secure_channel_type;
   48910           0 :         py_secure_channel_type = PyLong_FromLong((uint16_t)object->in.secure_channel_type);
   48911           0 :         return py_secure_channel_type;
   48912             : }
   48913             : 
   48914           0 : static int py_netr_ServerPasswordGet_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
   48915             : {
   48916           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(py_obj);
   48917           0 :         if (value == NULL) {
   48918           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.secure_channel_type");
   48919           0 :                 return -1;
   48920             :         }
   48921             :         {
   48922           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
   48923           0 :                 if (PyLong_Check(value)) {
   48924             :                         unsigned long long test_var;
   48925           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   48926           0 :                         if (PyErr_Occurred() != NULL) {
   48927           0 :                                 return -1;
   48928             :                         }
   48929           0 :                         if (test_var > uint_max) {
   48930           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   48931             :                                   PyLong_Type.tp_name, uint_max, test_var);
   48932           0 :                                 return -1;
   48933             :                         }
   48934           0 :                         object->in.secure_channel_type = test_var;
   48935             :                 } else {
   48936           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   48937             :                           PyLong_Type.tp_name);
   48938           0 :                         return -1;
   48939             :                 }
   48940             :         }
   48941           0 :         return 0;
   48942             : }
   48943             : 
   48944           0 : static PyObject *py_netr_ServerPasswordGet_in_get_computer_name(PyObject *obj, void *closure)
   48945             : {
   48946           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(obj);
   48947             :         PyObject *py_computer_name;
   48948           0 :         if (object->in.computer_name == NULL) {
   48949           0 :                 Py_RETURN_NONE;
   48950             :         }
   48951           0 :         if (object->in.computer_name == NULL) {
   48952           0 :                 py_computer_name = Py_None;
   48953           0 :                 Py_INCREF(py_computer_name);
   48954             :         } else {
   48955           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   48956             :         }
   48957           0 :         return py_computer_name;
   48958             : }
   48959             : 
   48960           0 : static int py_netr_ServerPasswordGet_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   48961             : {
   48962           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(py_obj);
   48963           0 :         if (value == NULL) {
   48964           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   48965           0 :                 return -1;
   48966             :         }
   48967           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   48968           0 :         if (object->in.computer_name == NULL) {
   48969           0 :                 PyErr_NoMemory();
   48970           0 :                 return -1;
   48971             :         }
   48972             :         {
   48973             :                 const char *test_str;
   48974             :                 const char *talloc_str;
   48975           0 :                 PyObject *unicode = NULL;
   48976           0 :                 if (PyUnicode_Check(value)) {
   48977           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   48978           0 :                         if (unicode == NULL) {
   48979           0 :                                 PyErr_NoMemory();
   48980           0 :                                 return -1;
   48981             :                         }
   48982           0 :                         test_str = PyBytes_AS_STRING(unicode);
   48983           0 :                 } else if (PyBytes_Check(value)) {
   48984           0 :                         test_str = PyBytes_AS_STRING(value);
   48985             :                 } else {
   48986           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   48987           0 :                         return -1;
   48988             :                 }
   48989           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   48990           0 :                 if (unicode != NULL) {
   48991           0 :                         Py_DECREF(unicode);
   48992             :                 }
   48993           0 :                 if (talloc_str == NULL) {
   48994           0 :                         PyErr_NoMemory();
   48995           0 :                         return -1;
   48996             :                 }
   48997           0 :                 object->in.computer_name = talloc_str;
   48998             :         }
   48999           0 :         return 0;
   49000             : }
   49001             : 
   49002           0 : static PyObject *py_netr_ServerPasswordGet_in_get_credential(PyObject *obj, void *closure)
   49003             : {
   49004           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(obj);
   49005             :         PyObject *py_credential;
   49006           0 :         if (object->in.credential == NULL) {
   49007           0 :                 Py_RETURN_NONE;
   49008             :         }
   49009           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   49010           0 :         return py_credential;
   49011             : }
   49012             : 
   49013           0 : static int py_netr_ServerPasswordGet_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   49014             : {
   49015           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(py_obj);
   49016           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   49017           0 :         if (value == NULL) {
   49018           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   49019           0 :                 return -1;
   49020             :         }
   49021           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   49022           0 :         if (object->in.credential == NULL) {
   49023           0 :                 PyErr_NoMemory();
   49024           0 :                 return -1;
   49025             :         }
   49026           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   49027           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   49028           0 :                 PyErr_NoMemory();
   49029           0 :                 return -1;
   49030             :         }
   49031           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   49032           0 :         return 0;
   49033             : }
   49034             : 
   49035           0 : static PyObject *py_netr_ServerPasswordGet_out_get_return_authenticator(PyObject *obj, void *closure)
   49036             : {
   49037           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(obj);
   49038             :         PyObject *py_return_authenticator;
   49039           0 :         if (object->out.return_authenticator == NULL) {
   49040           0 :                 Py_RETURN_NONE;
   49041             :         }
   49042           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   49043           0 :         return py_return_authenticator;
   49044             : }
   49045             : 
   49046           0 : static int py_netr_ServerPasswordGet_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   49047             : {
   49048           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(py_obj);
   49049           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   49050           0 :         if (value == NULL) {
   49051           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   49052           0 :                 return -1;
   49053             :         }
   49054           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   49055           0 :         if (object->out.return_authenticator == NULL) {
   49056           0 :                 PyErr_NoMemory();
   49057           0 :                 return -1;
   49058             :         }
   49059           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   49060           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   49061           0 :                 PyErr_NoMemory();
   49062           0 :                 return -1;
   49063             :         }
   49064           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   49065           0 :         return 0;
   49066             : }
   49067             : 
   49068           0 : static PyObject *py_netr_ServerPasswordGet_out_get_password(PyObject *obj, void *closure)
   49069             : {
   49070           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(obj);
   49071             :         PyObject *py_password;
   49072           0 :         if (object->out.password == NULL) {
   49073           0 :                 Py_RETURN_NONE;
   49074             :         }
   49075           0 :         py_password = pytalloc_reference_ex(samr_Password_Type, object->out.password, object->out.password);
   49076           0 :         return py_password;
   49077             : }
   49078             : 
   49079           0 : static int py_netr_ServerPasswordGet_out_set_password(PyObject *py_obj, PyObject *value, void *closure)
   49080             : {
   49081           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(py_obj);
   49082           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.password));
   49083           0 :         if (value == NULL) {
   49084           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.password");
   49085           0 :                 return -1;
   49086             :         }
   49087           0 :         object->out.password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.password);
   49088           0 :         if (object->out.password == NULL) {
   49089           0 :                 PyErr_NoMemory();
   49090           0 :                 return -1;
   49091             :         }
   49092           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
   49093           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   49094           0 :                 PyErr_NoMemory();
   49095           0 :                 return -1;
   49096             :         }
   49097           0 :         object->out.password = (struct samr_Password *)pytalloc_get_ptr(value);
   49098           0 :         return 0;
   49099             : }
   49100             : 
   49101           0 : static PyObject *py_netr_ServerPasswordGet_get_result(PyObject *obj, void *closure)
   49102             : {
   49103           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(obj);
   49104             :         PyObject *py_result;
   49105           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   49106           0 :         return py_result;
   49107             : }
   49108             : 
   49109           0 : static int py_netr_ServerPasswordGet_set_result(PyObject *py_obj, PyObject *value, void *closure)
   49110             : {
   49111           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(py_obj);
   49112           0 :         if (value == NULL) {
   49113           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   49114           0 :                 return -1;
   49115             :         }
   49116           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   49117           0 :         return 0;
   49118             : }
   49119             : 
   49120             : static PyGetSetDef py_netr_ServerPasswordGet_getsetters[] = {
   49121             :         {
   49122             :                 .name = discard_const_p(char, "in_server_name"),
   49123             :                 .get = py_netr_ServerPasswordGet_in_get_server_name,
   49124             :                 .set = py_netr_ServerPasswordGet_in_set_server_name,
   49125             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   49126             :         },
   49127             :         {
   49128             :                 .name = discard_const_p(char, "in_account_name"),
   49129             :                 .get = py_netr_ServerPasswordGet_in_get_account_name,
   49130             :                 .set = py_netr_ServerPasswordGet_in_set_account_name,
   49131             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   49132             :         },
   49133             :         {
   49134             :                 .name = discard_const_p(char, "in_secure_channel_type"),
   49135             :                 .get = py_netr_ServerPasswordGet_in_get_secure_channel_type,
   49136             :                 .set = py_netr_ServerPasswordGet_in_set_secure_channel_type,
   49137             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
   49138             :         },
   49139             :         {
   49140             :                 .name = discard_const_p(char, "in_computer_name"),
   49141             :                 .get = py_netr_ServerPasswordGet_in_get_computer_name,
   49142             :                 .set = py_netr_ServerPasswordGet_in_set_computer_name,
   49143             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   49144             :         },
   49145             :         {
   49146             :                 .name = discard_const_p(char, "in_credential"),
   49147             :                 .get = py_netr_ServerPasswordGet_in_get_credential,
   49148             :                 .set = py_netr_ServerPasswordGet_in_set_credential,
   49149             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   49150             :         },
   49151             :         {
   49152             :                 .name = discard_const_p(char, "out_return_authenticator"),
   49153             :                 .get = py_netr_ServerPasswordGet_out_get_return_authenticator,
   49154             :                 .set = py_netr_ServerPasswordGet_out_set_return_authenticator,
   49155             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   49156             :         },
   49157             :         {
   49158             :                 .name = discard_const_p(char, "out_password"),
   49159             :                 .get = py_netr_ServerPasswordGet_out_get_password,
   49160             :                 .set = py_netr_ServerPasswordGet_out_set_password,
   49161             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
   49162             :         },
   49163             :         {
   49164             :                 .name = discard_const_p(char, "result"),
   49165             :                 .get = py_netr_ServerPasswordGet_get_result,
   49166             :                 .set = py_netr_ServerPasswordGet_set_result,
   49167             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   49168             :         },
   49169             :         { .name = NULL }
   49170             : };
   49171             : 
   49172           0 : static PyObject *py_netr_ServerPasswordGet_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   49173             : {
   49174           0 :         PyObject *self = pytalloc_new(struct netr_ServerPasswordGet, type);
   49175           0 :         struct netr_ServerPasswordGet *_self = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(self);
   49176           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   49177           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   49178           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   49179           0 :         _self->out.password = talloc_zero(mem_ctx, struct samr_Password);
   49180           0 :         return self;
   49181             : }
   49182             : 
   49183           0 : static PyObject *py_netr_ServerPasswordGet_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   49184             : {
   49185             : 
   49186             : 
   49187           0 :         return PyLong_FromLong(31);
   49188             : }
   49189             : 
   49190           0 : static PyObject *py_netr_ServerPasswordGet_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   49191             : {
   49192           0 :         const struct ndr_interface_call *call = NULL;
   49193           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(py_obj);
   49194           0 :         PyObject *ret = NULL;
   49195           0 :         struct ndr_push *push = NULL;
   49196             :         DATA_BLOB blob;
   49197             :         enum ndr_err_code err;
   49198             : 
   49199           0 :         if (ndr_table_netlogon.num_calls < 32) {
   49200           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordGet_ndr_pack");
   49201           0 :                 return NULL;
   49202             :         }
   49203           0 :         call = &ndr_table_netlogon.calls[31];
   49204             : 
   49205           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   49206           0 :         if (push == NULL) {
   49207           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   49208           0 :                 return NULL;
   49209             :         }
   49210             : 
   49211           0 :         push->flags |= ndr_push_flags;
   49212             : 
   49213           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   49214           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   49215           0 :                 TALLOC_FREE(push);
   49216           0 :                 PyErr_SetNdrError(err);
   49217           0 :                 return NULL;
   49218             :         }
   49219           0 :         blob = ndr_push_blob(push);
   49220           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   49221           0 :         TALLOC_FREE(push);
   49222           0 :         return ret;
   49223             : }
   49224             : 
   49225           0 : static PyObject *py_netr_ServerPasswordGet_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49226             : {
   49227           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   49228           0 :         PyObject *bigendian_obj = NULL;
   49229           0 :         PyObject *ndr64_obj = NULL;
   49230           0 :         uint32_t ndr_push_flags = 0;
   49231             : 
   49232           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   49233             :                 discard_const_p(char *, kwnames),
   49234             :                 &bigendian_obj,
   49235             :                 &ndr64_obj)) {
   49236           0 :                 return NULL;
   49237             :         }
   49238             : 
   49239           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49240           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   49241             :         }
   49242           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49243           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   49244             :         }
   49245             : 
   49246           0 :         return py_netr_ServerPasswordGet_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   49247             : }
   49248             : 
   49249           0 : static PyObject *py_netr_ServerPasswordGet_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49250             : {
   49251           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   49252           0 :         PyObject *bigendian_obj = NULL;
   49253           0 :         PyObject *ndr64_obj = NULL;
   49254           0 :         uint32_t ndr_push_flags = 0;
   49255             : 
   49256           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   49257             :                 discard_const_p(char *, kwnames),
   49258             :                 &bigendian_obj,
   49259             :                 &ndr64_obj)) {
   49260           0 :                 return NULL;
   49261             :         }
   49262             : 
   49263           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49264           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   49265             :         }
   49266           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49267           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   49268             :         }
   49269             : 
   49270           0 :         return py_netr_ServerPasswordGet_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   49271             : }
   49272             : 
   49273           0 : static PyObject *py_netr_ServerPasswordGet_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   49274             : {
   49275           0 :         const struct ndr_interface_call *call = NULL;
   49276           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(py_obj);
   49277           0 :         struct ndr_pull *pull = NULL;
   49278             :         enum ndr_err_code err;
   49279             : 
   49280           0 :         if (ndr_table_netlogon.num_calls < 32) {
   49281           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordGet_ndr_unpack");
   49282           0 :                 return NULL;
   49283             :         }
   49284           0 :         call = &ndr_table_netlogon.calls[31];
   49285             : 
   49286           0 :         pull = ndr_pull_init_blob(blob, object);
   49287           0 :         if (pull == NULL) {
   49288           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   49289           0 :                 return NULL;
   49290             :         }
   49291             : 
   49292           0 :         pull->flags |= ndr_pull_flags;
   49293             : 
   49294           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   49295           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   49296           0 :                 TALLOC_FREE(pull);
   49297           0 :                 PyErr_SetNdrError(err);
   49298           0 :                 return NULL;
   49299             :         }
   49300           0 :         if (!allow_remaining) {
   49301             :                 uint32_t highest_ofs;
   49302             : 
   49303           0 :                 if (pull->offset > pull->relative_highest_offset) {
   49304           0 :                         highest_ofs = pull->offset;
   49305             :                 } else {
   49306           0 :                         highest_ofs = pull->relative_highest_offset;
   49307             :                 }
   49308           0 :                 if (highest_ofs < pull->data_size) {
   49309           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   49310             :                                 "not all bytes consumed ofs[%u] size[%u]",
   49311             :                                 highest_ofs, pull->data_size);
   49312           0 :                         TALLOC_FREE(pull);
   49313           0 :                         PyErr_SetNdrError(err);
   49314           0 :                         return NULL;
   49315             :                 }
   49316             :         }
   49317             : 
   49318           0 :         TALLOC_FREE(pull);
   49319           0 :         Py_RETURN_NONE;
   49320             : }
   49321             : 
   49322           0 : static PyObject *py_netr_ServerPasswordGet_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49323             : {
   49324             :         DATA_BLOB blob;
   49325           0 :         Py_ssize_t blob_length = 0;
   49326           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   49327           0 :         PyObject *bigendian_obj = NULL;
   49328           0 :         PyObject *ndr64_obj = NULL;
   49329           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   49330           0 :         PyObject *allow_remaining_obj = NULL;
   49331           0 :         bool allow_remaining = false;
   49332             : 
   49333           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   49334             :                 discard_const_p(char *, kwnames),
   49335             :                 &blob.data, &blob_length,
   49336             :                 &bigendian_obj,
   49337             :                 &ndr64_obj,
   49338             :                 &allow_remaining_obj)) {
   49339           0 :                 return NULL;
   49340             :         }
   49341           0 :         blob.length = blob_length;
   49342             : 
   49343           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49344           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   49345             :         }
   49346           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49347           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   49348             :         }
   49349             : 
   49350           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   49351           0 :                 allow_remaining = true;
   49352             :         }
   49353             : 
   49354           0 :         return py_netr_ServerPasswordGet_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   49355             : }
   49356             : 
   49357           0 : static PyObject *py_netr_ServerPasswordGet_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   49358             : {
   49359             :         DATA_BLOB blob;
   49360           0 :         Py_ssize_t blob_length = 0;
   49361           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   49362           0 :         PyObject *bigendian_obj = NULL;
   49363           0 :         PyObject *ndr64_obj = NULL;
   49364           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   49365           0 :         PyObject *allow_remaining_obj = NULL;
   49366           0 :         bool allow_remaining = false;
   49367             : 
   49368           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   49369             :                 discard_const_p(char *, kwnames),
   49370             :                 &blob.data, &blob_length,
   49371             :                 &bigendian_obj,
   49372             :                 &ndr64_obj,
   49373             :                 &allow_remaining_obj)) {
   49374           0 :                 return NULL;
   49375             :         }
   49376           0 :         blob.length = blob_length;
   49377             : 
   49378           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   49379           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   49380             :         }
   49381           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   49382           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   49383             :         }
   49384             : 
   49385           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   49386           0 :                 allow_remaining = true;
   49387             :         }
   49388             : 
   49389           0 :         return py_netr_ServerPasswordGet_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   49390             : }
   49391             : 
   49392           0 : static PyObject *py_netr_ServerPasswordGet_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   49393             : {
   49394           0 :         const struct ndr_interface_call *call = NULL;
   49395           0 :         struct netr_ServerPasswordGet *object = (struct netr_ServerPasswordGet *)pytalloc_get_ptr(py_obj);
   49396             :         PyObject *ret;
   49397             :         char *retstr;
   49398             : 
   49399           0 :         if (ndr_table_netlogon.num_calls < 32) {
   49400           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerPasswordGet_ndr_print");
   49401           0 :                 return NULL;
   49402             :         }
   49403           0 :         call = &ndr_table_netlogon.calls[31];
   49404             : 
   49405           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   49406           0 :         ret = PyUnicode_FromString(retstr);
   49407           0 :         TALLOC_FREE(retstr);
   49408             : 
   49409           0 :         return ret;
   49410             : }
   49411             : 
   49412           0 : static PyObject *py_netr_ServerPasswordGet_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   49413             : {
   49414           0 :         return py_netr_ServerPasswordGet_ndr_print(py_obj, "netr_ServerPasswordGet_in", NDR_IN);
   49415             : }
   49416             : 
   49417           0 : static PyObject *py_netr_ServerPasswordGet_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   49418             : {
   49419           0 :         return py_netr_ServerPasswordGet_ndr_print(py_obj, "netr_ServerPasswordGet_out", NDR_OUT);
   49420             : }
   49421             : 
   49422             : static PyMethodDef py_netr_ServerPasswordGet_methods[] = {
   49423             :         { "opnum", (PyCFunction)py_netr_ServerPasswordGet_ndr_opnum, METH_NOARGS|METH_CLASS,
   49424             :                 "netlogon.netr_ServerPasswordGet.opnum() -> 31 (0x1f) " },
   49425             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordGet_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   49426             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   49427             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordGet_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   49428             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   49429             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordGet_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   49430             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   49431             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerPasswordGet_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   49432             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   49433             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerPasswordGet_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   49434             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerPasswordGet_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   49435             :         { NULL, NULL, 0, NULL }
   49436             : };
   49437             : 
   49438             : 
   49439             : static PyTypeObject netr_ServerPasswordGet_Type = {
   49440             :         PyVarObject_HEAD_INIT(NULL, 0)
   49441             :         .tp_name = "netlogon.netr_ServerPasswordGet",
   49442             :         .tp_getset = py_netr_ServerPasswordGet_getsetters,
   49443             :         .tp_methods = py_netr_ServerPasswordGet_methods,
   49444             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   49445             :         .tp_new = py_netr_ServerPasswordGet_new,
   49446             : };
   49447             : 
   49448           0 : static bool pack_py_netr_ServerPasswordGet_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerPasswordGet *r)
   49449             : {
   49450             :         PyObject *py_server_name;
   49451             :         PyObject *py_account_name;
   49452             :         PyObject *py_secure_channel_type;
   49453             :         PyObject *py_computer_name;
   49454             :         PyObject *py_credential;
   49455           0 :         const char *kwnames[] = {
   49456             :                 "server_name", "account_name", "secure_channel_type", "computer_name", "credential", NULL
   49457             :         };
   49458             : 
   49459           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)) {
   49460           0 :                 return false;
   49461             :         }
   49462             : 
   49463           0 :         if (py_server_name == NULL) {
   49464           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   49465           0 :                 return false;
   49466             :         }
   49467           0 :         if (py_server_name == Py_None) {
   49468           0 :                 r->in.server_name = NULL;
   49469             :         } else {
   49470           0 :                 r->in.server_name = NULL;
   49471             :                 {
   49472             :                         const char *test_str;
   49473             :                         const char *talloc_str;
   49474           0 :                         PyObject *unicode = NULL;
   49475           0 :                         if (PyUnicode_Check(py_server_name)) {
   49476           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   49477           0 :                                 if (unicode == NULL) {
   49478           0 :                                         PyErr_NoMemory();
   49479           0 :                                         return false;
   49480             :                                 }
   49481           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   49482           0 :                         } else if (PyBytes_Check(py_server_name)) {
   49483           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   49484             :                         } else {
   49485           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   49486           0 :                                 return false;
   49487             :                         }
   49488           0 :                         talloc_str = talloc_strdup(r, test_str);
   49489           0 :                         if (unicode != NULL) {
   49490           0 :                                 Py_DECREF(unicode);
   49491             :                         }
   49492           0 :                         if (talloc_str == NULL) {
   49493           0 :                                 PyErr_NoMemory();
   49494           0 :                                 return false;
   49495             :                         }
   49496           0 :                         r->in.server_name = talloc_str;
   49497             :                 }
   49498             :         }
   49499           0 :         if (py_account_name == NULL) {
   49500           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.account_name");
   49501           0 :                 return false;
   49502             :         }
   49503           0 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   49504           0 :         if (r->in.account_name == NULL) {
   49505           0 :                 PyErr_NoMemory();
   49506           0 :                 return false;
   49507             :         }
   49508             :         {
   49509             :                 const char *test_str;
   49510             :                 const char *talloc_str;
   49511           0 :                 PyObject *unicode = NULL;
   49512           0 :                 if (PyUnicode_Check(py_account_name)) {
   49513           0 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   49514           0 :                         if (unicode == NULL) {
   49515           0 :                                 PyErr_NoMemory();
   49516           0 :                                 return false;
   49517             :                         }
   49518           0 :                         test_str = PyBytes_AS_STRING(unicode);
   49519           0 :                 } else if (PyBytes_Check(py_account_name)) {
   49520           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   49521             :                 } else {
   49522           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   49523           0 :                         return false;
   49524             :                 }
   49525           0 :                 talloc_str = talloc_strdup(r, test_str);
   49526           0 :                 if (unicode != NULL) {
   49527           0 :                         Py_DECREF(unicode);
   49528             :                 }
   49529           0 :                 if (talloc_str == NULL) {
   49530           0 :                         PyErr_NoMemory();
   49531           0 :                         return false;
   49532             :                 }
   49533           0 :                 r->in.account_name = talloc_str;
   49534             :         }
   49535           0 :         if (py_secure_channel_type == NULL) {
   49536           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.secure_channel_type");
   49537           0 :                 return false;
   49538             :         }
   49539             :         {
   49540           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
   49541           0 :                 if (PyLong_Check(py_secure_channel_type)) {
   49542             :                         unsigned long long test_var;
   49543           0 :                         test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
   49544           0 :                         if (PyErr_Occurred() != NULL) {
   49545           0 :                                 return false;
   49546             :                         }
   49547           0 :                         if (test_var > uint_max) {
   49548           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   49549             :                                   PyLong_Type.tp_name, uint_max, test_var);
   49550           0 :                                 return false;
   49551             :                         }
   49552           0 :                         r->in.secure_channel_type = test_var;
   49553             :                 } else {
   49554           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   49555             :                           PyLong_Type.tp_name);
   49556           0 :                         return false;
   49557             :                 }
   49558             :         }
   49559           0 :         if (py_computer_name == NULL) {
   49560           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   49561           0 :                 return false;
   49562             :         }
   49563           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   49564           0 :         if (r->in.computer_name == NULL) {
   49565           0 :                 PyErr_NoMemory();
   49566           0 :                 return false;
   49567             :         }
   49568             :         {
   49569             :                 const char *test_str;
   49570             :                 const char *talloc_str;
   49571           0 :                 PyObject *unicode = NULL;
   49572           0 :                 if (PyUnicode_Check(py_computer_name)) {
   49573           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   49574           0 :                         if (unicode == NULL) {
   49575           0 :                                 PyErr_NoMemory();
   49576           0 :                                 return false;
   49577             :                         }
   49578           0 :                         test_str = PyBytes_AS_STRING(unicode);
   49579           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   49580           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   49581             :                 } else {
   49582           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   49583           0 :                         return false;
   49584             :                 }
   49585           0 :                 talloc_str = talloc_strdup(r, test_str);
   49586           0 :                 if (unicode != NULL) {
   49587           0 :                         Py_DECREF(unicode);
   49588             :                 }
   49589           0 :                 if (talloc_str == NULL) {
   49590           0 :                         PyErr_NoMemory();
   49591           0 :                         return false;
   49592             :                 }
   49593           0 :                 r->in.computer_name = talloc_str;
   49594             :         }
   49595           0 :         if (py_credential == NULL) {
   49596           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   49597           0 :                 return false;
   49598             :         }
   49599           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   49600           0 :         if (r->in.credential == NULL) {
   49601           0 :                 PyErr_NoMemory();
   49602           0 :                 return false;
   49603             :         }
   49604           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   49605           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   49606           0 :                 PyErr_NoMemory();
   49607           0 :                 return false;
   49608             :         }
   49609           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   49610           0 :         return true;
   49611             : }
   49612             : 
   49613           0 : static PyObject *unpack_py_netr_ServerPasswordGet_args_out(struct netr_ServerPasswordGet *r)
   49614             : {
   49615             :         PyObject *result;
   49616             :         PyObject *py_return_authenticator;
   49617             :         PyObject *py_password;
   49618           0 :         result = PyTuple_New(2);
   49619           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   49620           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   49621           0 :         py_password = pytalloc_reference_ex(samr_Password_Type, r->out.password, r->out.password);
   49622           0 :         PyTuple_SetItem(result, 1, py_password);
   49623           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   49624           0 :                 PyErr_SetNTSTATUS(r->out.result);
   49625           0 :                 return NULL;
   49626             :         }
   49627             : 
   49628           0 :         return result;
   49629             : }
   49630             : 
   49631             : 
   49632           0 : static PyObject *py_netr_NetrLogonSendToSam_in_get_server_name(PyObject *obj, void *closure)
   49633             : {
   49634           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(obj);
   49635             :         PyObject *py_server_name;
   49636           0 :         if (object->in.server_name == NULL) {
   49637           0 :                 Py_RETURN_NONE;
   49638             :         }
   49639           0 :         if (object->in.server_name == NULL) {
   49640           0 :                 py_server_name = Py_None;
   49641           0 :                 Py_INCREF(py_server_name);
   49642             :         } else {
   49643           0 :                 if (object->in.server_name == NULL) {
   49644           0 :                         py_server_name = Py_None;
   49645           0 :                         Py_INCREF(py_server_name);
   49646             :                 } else {
   49647           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   49648             :                 }
   49649             :         }
   49650           0 :         return py_server_name;
   49651             : }
   49652             : 
   49653           0 : static int py_netr_NetrLogonSendToSam_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   49654             : {
   49655           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(py_obj);
   49656           0 :         if (value == NULL) {
   49657           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   49658           0 :                 return -1;
   49659             :         }
   49660           0 :         if (value == Py_None) {
   49661           0 :                 object->in.server_name = NULL;
   49662             :         } else {
   49663           0 :                 object->in.server_name = NULL;
   49664             :                 {
   49665             :                         const char *test_str;
   49666             :                         const char *talloc_str;
   49667           0 :                         PyObject *unicode = NULL;
   49668           0 :                         if (PyUnicode_Check(value)) {
   49669           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   49670           0 :                                 if (unicode == NULL) {
   49671           0 :                                         PyErr_NoMemory();
   49672           0 :                                         return -1;
   49673             :                                 }
   49674           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   49675           0 :                         } else if (PyBytes_Check(value)) {
   49676           0 :                                 test_str = PyBytes_AS_STRING(value);
   49677             :                         } else {
   49678           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   49679           0 :                                 return -1;
   49680             :                         }
   49681           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   49682           0 :                         if (unicode != NULL) {
   49683           0 :                                 Py_DECREF(unicode);
   49684             :                         }
   49685           0 :                         if (talloc_str == NULL) {
   49686           0 :                                 PyErr_NoMemory();
   49687           0 :                                 return -1;
   49688             :                         }
   49689           0 :                         object->in.server_name = talloc_str;
   49690             :                 }
   49691             :         }
   49692           0 :         return 0;
   49693             : }
   49694             : 
   49695           0 : static PyObject *py_netr_NetrLogonSendToSam_in_get_computer_name(PyObject *obj, void *closure)
   49696             : {
   49697           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(obj);
   49698             :         PyObject *py_computer_name;
   49699           0 :         if (object->in.computer_name == NULL) {
   49700           0 :                 Py_RETURN_NONE;
   49701             :         }
   49702           0 :         if (object->in.computer_name == NULL) {
   49703           0 :                 py_computer_name = Py_None;
   49704           0 :                 Py_INCREF(py_computer_name);
   49705             :         } else {
   49706           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   49707             :         }
   49708           0 :         return py_computer_name;
   49709             : }
   49710             : 
   49711           0 : static int py_netr_NetrLogonSendToSam_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   49712             : {
   49713           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(py_obj);
   49714           0 :         if (value == NULL) {
   49715           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   49716           0 :                 return -1;
   49717             :         }
   49718           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   49719           0 :         if (object->in.computer_name == NULL) {
   49720           0 :                 PyErr_NoMemory();
   49721           0 :                 return -1;
   49722             :         }
   49723             :         {
   49724             :                 const char *test_str;
   49725             :                 const char *talloc_str;
   49726           0 :                 PyObject *unicode = NULL;
   49727           0 :                 if (PyUnicode_Check(value)) {
   49728           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   49729           0 :                         if (unicode == NULL) {
   49730           0 :                                 PyErr_NoMemory();
   49731           0 :                                 return -1;
   49732             :                         }
   49733           0 :                         test_str = PyBytes_AS_STRING(unicode);
   49734           0 :                 } else if (PyBytes_Check(value)) {
   49735           0 :                         test_str = PyBytes_AS_STRING(value);
   49736             :                 } else {
   49737           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   49738           0 :                         return -1;
   49739             :                 }
   49740           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   49741           0 :                 if (unicode != NULL) {
   49742           0 :                         Py_DECREF(unicode);
   49743             :                 }
   49744           0 :                 if (talloc_str == NULL) {
   49745           0 :                         PyErr_NoMemory();
   49746           0 :                         return -1;
   49747             :                 }
   49748           0 :                 object->in.computer_name = talloc_str;
   49749             :         }
   49750           0 :         return 0;
   49751             : }
   49752             : 
   49753           0 : static PyObject *py_netr_NetrLogonSendToSam_in_get_credential(PyObject *obj, void *closure)
   49754             : {
   49755           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(obj);
   49756             :         PyObject *py_credential;
   49757           0 :         if (object->in.credential == NULL) {
   49758           0 :                 Py_RETURN_NONE;
   49759             :         }
   49760           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   49761           0 :         return py_credential;
   49762             : }
   49763             : 
   49764           0 : static int py_netr_NetrLogonSendToSam_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   49765             : {
   49766           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(py_obj);
   49767           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   49768           0 :         if (value == NULL) {
   49769           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   49770           0 :                 return -1;
   49771             :         }
   49772           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   49773           0 :         if (object->in.credential == NULL) {
   49774           0 :                 PyErr_NoMemory();
   49775           0 :                 return -1;
   49776             :         }
   49777           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   49778           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   49779           0 :                 PyErr_NoMemory();
   49780           0 :                 return -1;
   49781             :         }
   49782           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   49783           0 :         return 0;
   49784             : }
   49785             : 
   49786           0 : static PyObject *py_netr_NetrLogonSendToSam_out_get_return_authenticator(PyObject *obj, void *closure)
   49787             : {
   49788           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(obj);
   49789             :         PyObject *py_return_authenticator;
   49790           0 :         if (object->out.return_authenticator == NULL) {
   49791           0 :                 Py_RETURN_NONE;
   49792             :         }
   49793           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   49794           0 :         return py_return_authenticator;
   49795             : }
   49796             : 
   49797           0 : static int py_netr_NetrLogonSendToSam_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   49798             : {
   49799           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(py_obj);
   49800           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   49801           0 :         if (value == NULL) {
   49802           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   49803           0 :                 return -1;
   49804             :         }
   49805           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   49806           0 :         if (object->out.return_authenticator == NULL) {
   49807           0 :                 PyErr_NoMemory();
   49808           0 :                 return -1;
   49809             :         }
   49810           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   49811           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   49812           0 :                 PyErr_NoMemory();
   49813           0 :                 return -1;
   49814             :         }
   49815           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   49816           0 :         return 0;
   49817             : }
   49818             : 
   49819           0 : static PyObject *py_netr_NetrLogonSendToSam_in_get_opaque_buffer(PyObject *obj, void *closure)
   49820             : {
   49821           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(obj);
   49822             :         PyObject *py_opaque_buffer;
   49823           0 :         if (object->in.opaque_buffer == NULL) {
   49824           0 :                 Py_RETURN_NONE;
   49825             :         }
   49826           0 :         py_opaque_buffer = PyList_New(object->in.buffer_len);
   49827           0 :         if (py_opaque_buffer == NULL) {
   49828           0 :                 return NULL;
   49829             :         }
   49830             :         {
   49831             :                 int opaque_buffer_cntr_1;
   49832           0 :                 for (opaque_buffer_cntr_1 = 0; opaque_buffer_cntr_1 < (object->in.buffer_len); opaque_buffer_cntr_1++) {
   49833             :                         PyObject *py_opaque_buffer_1;
   49834           0 :                         py_opaque_buffer_1 = PyLong_FromLong((uint16_t)object->in.opaque_buffer[opaque_buffer_cntr_1]);
   49835           0 :                         PyList_SetItem(py_opaque_buffer, opaque_buffer_cntr_1, py_opaque_buffer_1);
   49836             :                 }
   49837             :         }
   49838           0 :         return py_opaque_buffer;
   49839             : }
   49840             : 
   49841           0 : static int py_netr_NetrLogonSendToSam_in_set_opaque_buffer(PyObject *py_obj, PyObject *value, void *closure)
   49842             : {
   49843           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(py_obj);
   49844           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.opaque_buffer));
   49845           0 :         if (value == NULL) {
   49846           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.opaque_buffer");
   49847           0 :                 return -1;
   49848             :         }
   49849           0 :         object->in.opaque_buffer = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.opaque_buffer);
   49850           0 :         if (object->in.opaque_buffer == NULL) {
   49851           0 :                 PyErr_NoMemory();
   49852           0 :                 return -1;
   49853             :         }
   49854           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   49855             :         {
   49856             :                 int opaque_buffer_cntr_1;
   49857           0 :                 object->in.opaque_buffer = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.opaque_buffer, PyList_GET_SIZE(value));
   49858           0 :                 if (!object->in.opaque_buffer) { return -1;; }
   49859           0 :                 talloc_set_name_const(object->in.opaque_buffer, "ARRAY: object->in.opaque_buffer");
   49860           0 :                 for (opaque_buffer_cntr_1 = 0; opaque_buffer_cntr_1 < PyList_GET_SIZE(value); opaque_buffer_cntr_1++) {
   49861           0 :                         if (PyList_GET_ITEM(value, opaque_buffer_cntr_1) == NULL) {
   49862           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.opaque_buffer[opaque_buffer_cntr_1]");
   49863           0 :                                 return -1;
   49864             :                         }
   49865             :                         {
   49866           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.opaque_buffer[opaque_buffer_cntr_1]));
   49867           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, opaque_buffer_cntr_1))) {
   49868             :                                         unsigned long long test_var;
   49869           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, opaque_buffer_cntr_1));
   49870           0 :                                         if (PyErr_Occurred() != NULL) {
   49871           0 :                                                 return -1;
   49872             :                                         }
   49873           0 :                                         if (test_var > uint_max) {
   49874           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   49875             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   49876           0 :                                                 return -1;
   49877             :                                         }
   49878           0 :                                         object->in.opaque_buffer[opaque_buffer_cntr_1] = test_var;
   49879             :                                 } else {
   49880           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   49881             :                                           PyLong_Type.tp_name);
   49882           0 :                                         return -1;
   49883             :                                 }
   49884             :                         }
   49885             :                 }
   49886             :         }
   49887           0 :         return 0;
   49888             : }
   49889             : 
   49890           0 : static PyObject *py_netr_NetrLogonSendToSam_in_get_buffer_len(PyObject *obj, void *closure)
   49891             : {
   49892           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(obj);
   49893             :         PyObject *py_buffer_len;
   49894           0 :         py_buffer_len = PyLong_FromUnsignedLongLong((uint32_t)object->in.buffer_len);
   49895           0 :         return py_buffer_len;
   49896             : }
   49897             : 
   49898           0 : static int py_netr_NetrLogonSendToSam_in_set_buffer_len(PyObject *py_obj, PyObject *value, void *closure)
   49899             : {
   49900           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(py_obj);
   49901           0 :         if (value == NULL) {
   49902           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.buffer_len");
   49903           0 :                 return -1;
   49904             :         }
   49905             :         {
   49906           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.buffer_len));
   49907           0 :                 if (PyLong_Check(value)) {
   49908             :                         unsigned long long test_var;
   49909           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   49910           0 :                         if (PyErr_Occurred() != NULL) {
   49911           0 :                                 return -1;
   49912             :                         }
   49913           0 :                         if (test_var > uint_max) {
   49914           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   49915             :                                   PyLong_Type.tp_name, uint_max, test_var);
   49916           0 :                                 return -1;
   49917             :                         }
   49918           0 :                         object->in.buffer_len = test_var;
   49919             :                 } else {
   49920           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   49921             :                           PyLong_Type.tp_name);
   49922           0 :                         return -1;
   49923             :                 }
   49924             :         }
   49925           0 :         return 0;
   49926             : }
   49927             : 
   49928           0 : static PyObject *py_netr_NetrLogonSendToSam_get_result(PyObject *obj, void *closure)
   49929             : {
   49930           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(obj);
   49931             :         PyObject *py_result;
   49932           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   49933           0 :         return py_result;
   49934             : }
   49935             : 
   49936           0 : static int py_netr_NetrLogonSendToSam_set_result(PyObject *py_obj, PyObject *value, void *closure)
   49937             : {
   49938           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(py_obj);
   49939           0 :         if (value == NULL) {
   49940           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   49941           0 :                 return -1;
   49942             :         }
   49943           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   49944           0 :         return 0;
   49945             : }
   49946             : 
   49947             : static PyGetSetDef py_netr_NetrLogonSendToSam_getsetters[] = {
   49948             :         {
   49949             :                 .name = discard_const_p(char, "in_server_name"),
   49950             :                 .get = py_netr_NetrLogonSendToSam_in_get_server_name,
   49951             :                 .set = py_netr_NetrLogonSendToSam_in_set_server_name,
   49952             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   49953             :         },
   49954             :         {
   49955             :                 .name = discard_const_p(char, "in_computer_name"),
   49956             :                 .get = py_netr_NetrLogonSendToSam_in_get_computer_name,
   49957             :                 .set = py_netr_NetrLogonSendToSam_in_set_computer_name,
   49958             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   49959             :         },
   49960             :         {
   49961             :                 .name = discard_const_p(char, "in_credential"),
   49962             :                 .get = py_netr_NetrLogonSendToSam_in_get_credential,
   49963             :                 .set = py_netr_NetrLogonSendToSam_in_set_credential,
   49964             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   49965             :         },
   49966             :         {
   49967             :                 .name = discard_const_p(char, "out_return_authenticator"),
   49968             :                 .get = py_netr_NetrLogonSendToSam_out_get_return_authenticator,
   49969             :                 .set = py_netr_NetrLogonSendToSam_out_set_return_authenticator,
   49970             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   49971             :         },
   49972             :         {
   49973             :                 .name = discard_const_p(char, "in_opaque_buffer"),
   49974             :                 .get = py_netr_NetrLogonSendToSam_in_get_opaque_buffer,
   49975             :                 .set = py_netr_NetrLogonSendToSam_in_set_opaque_buffer,
   49976             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   49977             :         },
   49978             :         {
   49979             :                 .name = discard_const_p(char, "in_buffer_len"),
   49980             :                 .get = py_netr_NetrLogonSendToSam_in_get_buffer_len,
   49981             :                 .set = py_netr_NetrLogonSendToSam_in_set_buffer_len,
   49982             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   49983             :         },
   49984             :         {
   49985             :                 .name = discard_const_p(char, "result"),
   49986             :                 .get = py_netr_NetrLogonSendToSam_get_result,
   49987             :                 .set = py_netr_NetrLogonSendToSam_set_result,
   49988             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   49989             :         },
   49990             :         { .name = NULL }
   49991             : };
   49992             : 
   49993           0 : static PyObject *py_netr_NetrLogonSendToSam_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   49994             : {
   49995           0 :         PyObject *self = pytalloc_new(struct netr_NetrLogonSendToSam, type);
   49996           0 :         struct netr_NetrLogonSendToSam *_self = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(self);
   49997           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   49998           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   49999           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   50000           0 :         _self->in.opaque_buffer = talloc_zero(mem_ctx, uint8_t);
   50001           0 :         return self;
   50002             : }
   50003             : 
   50004           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   50005             : {
   50006             : 
   50007             : 
   50008           0 :         return PyLong_FromLong(32);
   50009             : }
   50010             : 
   50011           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   50012             : {
   50013           0 :         const struct ndr_interface_call *call = NULL;
   50014           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(py_obj);
   50015           0 :         PyObject *ret = NULL;
   50016           0 :         struct ndr_push *push = NULL;
   50017             :         DATA_BLOB blob;
   50018             :         enum ndr_err_code err;
   50019             : 
   50020           0 :         if (ndr_table_netlogon.num_calls < 33) {
   50021           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrLogonSendToSam_ndr_pack");
   50022           0 :                 return NULL;
   50023             :         }
   50024           0 :         call = &ndr_table_netlogon.calls[32];
   50025             : 
   50026           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   50027           0 :         if (push == NULL) {
   50028           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   50029           0 :                 return NULL;
   50030             :         }
   50031             : 
   50032           0 :         push->flags |= ndr_push_flags;
   50033             : 
   50034           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   50035           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   50036           0 :                 TALLOC_FREE(push);
   50037           0 :                 PyErr_SetNdrError(err);
   50038           0 :                 return NULL;
   50039             :         }
   50040           0 :         blob = ndr_push_blob(push);
   50041           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   50042           0 :         TALLOC_FREE(push);
   50043           0 :         return ret;
   50044             : }
   50045             : 
   50046           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50047             : {
   50048           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   50049           0 :         PyObject *bigendian_obj = NULL;
   50050           0 :         PyObject *ndr64_obj = NULL;
   50051           0 :         uint32_t ndr_push_flags = 0;
   50052             : 
   50053           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   50054             :                 discard_const_p(char *, kwnames),
   50055             :                 &bigendian_obj,
   50056             :                 &ndr64_obj)) {
   50057           0 :                 return NULL;
   50058             :         }
   50059             : 
   50060           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50061           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   50062             :         }
   50063           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50064           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   50065             :         }
   50066             : 
   50067           0 :         return py_netr_NetrLogonSendToSam_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   50068             : }
   50069             : 
   50070           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50071             : {
   50072           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   50073           0 :         PyObject *bigendian_obj = NULL;
   50074           0 :         PyObject *ndr64_obj = NULL;
   50075           0 :         uint32_t ndr_push_flags = 0;
   50076             : 
   50077           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   50078             :                 discard_const_p(char *, kwnames),
   50079             :                 &bigendian_obj,
   50080             :                 &ndr64_obj)) {
   50081           0 :                 return NULL;
   50082             :         }
   50083             : 
   50084           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50085           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   50086             :         }
   50087           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50088           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   50089             :         }
   50090             : 
   50091           0 :         return py_netr_NetrLogonSendToSam_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   50092             : }
   50093             : 
   50094           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   50095             : {
   50096           0 :         const struct ndr_interface_call *call = NULL;
   50097           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(py_obj);
   50098           0 :         struct ndr_pull *pull = NULL;
   50099             :         enum ndr_err_code err;
   50100             : 
   50101           0 :         if (ndr_table_netlogon.num_calls < 33) {
   50102           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrLogonSendToSam_ndr_unpack");
   50103           0 :                 return NULL;
   50104             :         }
   50105           0 :         call = &ndr_table_netlogon.calls[32];
   50106             : 
   50107           0 :         pull = ndr_pull_init_blob(blob, object);
   50108           0 :         if (pull == NULL) {
   50109           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   50110           0 :                 return NULL;
   50111             :         }
   50112             : 
   50113           0 :         pull->flags |= ndr_pull_flags;
   50114             : 
   50115           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   50116           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   50117           0 :                 TALLOC_FREE(pull);
   50118           0 :                 PyErr_SetNdrError(err);
   50119           0 :                 return NULL;
   50120             :         }
   50121           0 :         if (!allow_remaining) {
   50122             :                 uint32_t highest_ofs;
   50123             : 
   50124           0 :                 if (pull->offset > pull->relative_highest_offset) {
   50125           0 :                         highest_ofs = pull->offset;
   50126             :                 } else {
   50127           0 :                         highest_ofs = pull->relative_highest_offset;
   50128             :                 }
   50129           0 :                 if (highest_ofs < pull->data_size) {
   50130           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   50131             :                                 "not all bytes consumed ofs[%u] size[%u]",
   50132             :                                 highest_ofs, pull->data_size);
   50133           0 :                         TALLOC_FREE(pull);
   50134           0 :                         PyErr_SetNdrError(err);
   50135           0 :                         return NULL;
   50136             :                 }
   50137             :         }
   50138             : 
   50139           0 :         TALLOC_FREE(pull);
   50140           0 :         Py_RETURN_NONE;
   50141             : }
   50142             : 
   50143           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50144             : {
   50145             :         DATA_BLOB blob;
   50146           0 :         Py_ssize_t blob_length = 0;
   50147           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   50148           0 :         PyObject *bigendian_obj = NULL;
   50149           0 :         PyObject *ndr64_obj = NULL;
   50150           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   50151           0 :         PyObject *allow_remaining_obj = NULL;
   50152           0 :         bool allow_remaining = false;
   50153             : 
   50154           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   50155             :                 discard_const_p(char *, kwnames),
   50156             :                 &blob.data, &blob_length,
   50157             :                 &bigendian_obj,
   50158             :                 &ndr64_obj,
   50159             :                 &allow_remaining_obj)) {
   50160           0 :                 return NULL;
   50161             :         }
   50162           0 :         blob.length = blob_length;
   50163             : 
   50164           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50165           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   50166             :         }
   50167           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50168           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   50169             :         }
   50170             : 
   50171           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   50172           0 :                 allow_remaining = true;
   50173             :         }
   50174             : 
   50175           0 :         return py_netr_NetrLogonSendToSam_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   50176             : }
   50177             : 
   50178           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50179             : {
   50180             :         DATA_BLOB blob;
   50181           0 :         Py_ssize_t blob_length = 0;
   50182           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   50183           0 :         PyObject *bigendian_obj = NULL;
   50184           0 :         PyObject *ndr64_obj = NULL;
   50185           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   50186           0 :         PyObject *allow_remaining_obj = NULL;
   50187           0 :         bool allow_remaining = false;
   50188             : 
   50189           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   50190             :                 discard_const_p(char *, kwnames),
   50191             :                 &blob.data, &blob_length,
   50192             :                 &bigendian_obj,
   50193             :                 &ndr64_obj,
   50194             :                 &allow_remaining_obj)) {
   50195           0 :                 return NULL;
   50196             :         }
   50197           0 :         blob.length = blob_length;
   50198             : 
   50199           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50200           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   50201             :         }
   50202           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50203           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   50204             :         }
   50205             : 
   50206           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   50207           0 :                 allow_remaining = true;
   50208             :         }
   50209             : 
   50210           0 :         return py_netr_NetrLogonSendToSam_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   50211             : }
   50212             : 
   50213           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   50214             : {
   50215           0 :         const struct ndr_interface_call *call = NULL;
   50216           0 :         struct netr_NetrLogonSendToSam *object = (struct netr_NetrLogonSendToSam *)pytalloc_get_ptr(py_obj);
   50217             :         PyObject *ret;
   50218             :         char *retstr;
   50219             : 
   50220           0 :         if (ndr_table_netlogon.num_calls < 33) {
   50221           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrLogonSendToSam_ndr_print");
   50222           0 :                 return NULL;
   50223             :         }
   50224           0 :         call = &ndr_table_netlogon.calls[32];
   50225             : 
   50226           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   50227           0 :         ret = PyUnicode_FromString(retstr);
   50228           0 :         TALLOC_FREE(retstr);
   50229             : 
   50230           0 :         return ret;
   50231             : }
   50232             : 
   50233           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   50234             : {
   50235           0 :         return py_netr_NetrLogonSendToSam_ndr_print(py_obj, "netr_NetrLogonSendToSam_in", NDR_IN);
   50236             : }
   50237             : 
   50238           0 : static PyObject *py_netr_NetrLogonSendToSam_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   50239             : {
   50240           0 :         return py_netr_NetrLogonSendToSam_ndr_print(py_obj, "netr_NetrLogonSendToSam_out", NDR_OUT);
   50241             : }
   50242             : 
   50243             : static PyMethodDef py_netr_NetrLogonSendToSam_methods[] = {
   50244             :         { "opnum", (PyCFunction)py_netr_NetrLogonSendToSam_ndr_opnum, METH_NOARGS|METH_CLASS,
   50245             :                 "netlogon.netr_NetrLogonSendToSam.opnum() -> 32 (0x20) " },
   50246             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrLogonSendToSam_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   50247             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   50248             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrLogonSendToSam_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   50249             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   50250             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrLogonSendToSam_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   50251             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   50252             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrLogonSendToSam_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   50253             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   50254             :         { "__ndr_print_in__", (PyCFunction)py_netr_NetrLogonSendToSam_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   50255             :         { "__ndr_print_out__", (PyCFunction)py_netr_NetrLogonSendToSam_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   50256             :         { NULL, NULL, 0, NULL }
   50257             : };
   50258             : 
   50259             : 
   50260             : static PyTypeObject netr_NetrLogonSendToSam_Type = {
   50261             :         PyVarObject_HEAD_INIT(NULL, 0)
   50262             :         .tp_name = "netlogon.netr_NetrLogonSendToSam",
   50263             :         .tp_getset = py_netr_NetrLogonSendToSam_getsetters,
   50264             :         .tp_methods = py_netr_NetrLogonSendToSam_methods,
   50265             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   50266             :         .tp_new = py_netr_NetrLogonSendToSam_new,
   50267             : };
   50268             : 
   50269           0 : static bool pack_py_netr_NetrLogonSendToSam_args_in(PyObject *args, PyObject *kwargs, struct netr_NetrLogonSendToSam *r)
   50270             : {
   50271             :         PyObject *py_server_name;
   50272             :         PyObject *py_computer_name;
   50273             :         PyObject *py_credential;
   50274             :         PyObject *py_opaque_buffer;
   50275           0 :         const char *kwnames[] = {
   50276             :                 "server_name", "computer_name", "credential", "opaque_buffer", NULL
   50277             :         };
   50278             : 
   50279           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)) {
   50280           0 :                 return false;
   50281             :         }
   50282             : 
   50283           0 :         if (py_server_name == NULL) {
   50284           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   50285           0 :                 return false;
   50286             :         }
   50287           0 :         if (py_server_name == Py_None) {
   50288           0 :                 r->in.server_name = NULL;
   50289             :         } else {
   50290           0 :                 r->in.server_name = NULL;
   50291             :                 {
   50292             :                         const char *test_str;
   50293             :                         const char *talloc_str;
   50294           0 :                         PyObject *unicode = NULL;
   50295           0 :                         if (PyUnicode_Check(py_server_name)) {
   50296           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   50297           0 :                                 if (unicode == NULL) {
   50298           0 :                                         PyErr_NoMemory();
   50299           0 :                                         return false;
   50300             :                                 }
   50301           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   50302           0 :                         } else if (PyBytes_Check(py_server_name)) {
   50303           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   50304             :                         } else {
   50305           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   50306           0 :                                 return false;
   50307             :                         }
   50308           0 :                         talloc_str = talloc_strdup(r, test_str);
   50309           0 :                         if (unicode != NULL) {
   50310           0 :                                 Py_DECREF(unicode);
   50311             :                         }
   50312           0 :                         if (talloc_str == NULL) {
   50313           0 :                                 PyErr_NoMemory();
   50314           0 :                                 return false;
   50315             :                         }
   50316           0 :                         r->in.server_name = talloc_str;
   50317             :                 }
   50318             :         }
   50319           0 :         if (py_computer_name == NULL) {
   50320           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   50321           0 :                 return false;
   50322             :         }
   50323           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   50324           0 :         if (r->in.computer_name == NULL) {
   50325           0 :                 PyErr_NoMemory();
   50326           0 :                 return false;
   50327             :         }
   50328             :         {
   50329             :                 const char *test_str;
   50330             :                 const char *talloc_str;
   50331           0 :                 PyObject *unicode = NULL;
   50332           0 :                 if (PyUnicode_Check(py_computer_name)) {
   50333           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   50334           0 :                         if (unicode == NULL) {
   50335           0 :                                 PyErr_NoMemory();
   50336           0 :                                 return false;
   50337             :                         }
   50338           0 :                         test_str = PyBytes_AS_STRING(unicode);
   50339           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   50340           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   50341             :                 } else {
   50342           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   50343           0 :                         return false;
   50344             :                 }
   50345           0 :                 talloc_str = talloc_strdup(r, test_str);
   50346           0 :                 if (unicode != NULL) {
   50347           0 :                         Py_DECREF(unicode);
   50348             :                 }
   50349           0 :                 if (talloc_str == NULL) {
   50350           0 :                         PyErr_NoMemory();
   50351           0 :                         return false;
   50352             :                 }
   50353           0 :                 r->in.computer_name = talloc_str;
   50354             :         }
   50355           0 :         if (py_credential == NULL) {
   50356           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   50357           0 :                 return false;
   50358             :         }
   50359           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   50360           0 :         if (r->in.credential == NULL) {
   50361           0 :                 PyErr_NoMemory();
   50362           0 :                 return false;
   50363             :         }
   50364           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   50365           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   50366           0 :                 PyErr_NoMemory();
   50367           0 :                 return false;
   50368             :         }
   50369           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   50370           0 :         if (py_opaque_buffer == NULL) {
   50371           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.opaque_buffer");
   50372           0 :                 return false;
   50373             :         }
   50374           0 :         r->in.opaque_buffer = talloc_ptrtype(r, r->in.opaque_buffer);
   50375           0 :         if (r->in.opaque_buffer == NULL) {
   50376           0 :                 PyErr_NoMemory();
   50377           0 :                 return false;
   50378             :         }
   50379           0 :         PY_CHECK_TYPE(&PyList_Type, py_opaque_buffer, return false;);
   50380             :         {
   50381             :                 int opaque_buffer_cntr_1;
   50382           0 :                 r->in.opaque_buffer = talloc_array_ptrtype(r, r->in.opaque_buffer, PyList_GET_SIZE(py_opaque_buffer));
   50383           0 :                 if (!r->in.opaque_buffer) { return false;; }
   50384           0 :                 talloc_set_name_const(r->in.opaque_buffer, "ARRAY: r->in.opaque_buffer");
   50385           0 :                 for (opaque_buffer_cntr_1 = 0; opaque_buffer_cntr_1 < PyList_GET_SIZE(py_opaque_buffer); opaque_buffer_cntr_1++) {
   50386           0 :                         if (PyList_GET_ITEM(py_opaque_buffer, opaque_buffer_cntr_1) == NULL) {
   50387           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.opaque_buffer[opaque_buffer_cntr_1]");
   50388           0 :                                 return false;
   50389             :                         }
   50390             :                         {
   50391           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.opaque_buffer[opaque_buffer_cntr_1]));
   50392           0 :                                 if (PyLong_Check(PyList_GET_ITEM(py_opaque_buffer, opaque_buffer_cntr_1))) {
   50393             :                                         unsigned long long test_var;
   50394           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(py_opaque_buffer, opaque_buffer_cntr_1));
   50395           0 :                                         if (PyErr_Occurred() != NULL) {
   50396           0 :                                                 return false;
   50397             :                                         }
   50398           0 :                                         if (test_var > uint_max) {
   50399           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   50400             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   50401           0 :                                                 return false;
   50402             :                                         }
   50403           0 :                                         r->in.opaque_buffer[opaque_buffer_cntr_1] = test_var;
   50404             :                                 } else {
   50405           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   50406             :                                           PyLong_Type.tp_name);
   50407           0 :                                         return false;
   50408             :                                 }
   50409             :                         }
   50410             :                 }
   50411             :         }
   50412           0 :         PY_CHECK_TYPE(&PyList_Type, py_opaque_buffer, return false;);
   50413           0 :         r->in.buffer_len = PyList_GET_SIZE(py_opaque_buffer);
   50414           0 :         return true;
   50415             : }
   50416             : 
   50417           0 : static PyObject *unpack_py_netr_NetrLogonSendToSam_args_out(struct netr_NetrLogonSendToSam *r)
   50418             : {
   50419             :         PyObject *result;
   50420             :         PyObject *py_return_authenticator;
   50421           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   50422           0 :         result = py_return_authenticator;
   50423           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   50424           0 :                 PyErr_SetNTSTATUS(r->out.result);
   50425           0 :                 return NULL;
   50426             :         }
   50427             : 
   50428           0 :         return result;
   50429             : }
   50430             : 
   50431             : 
   50432           0 : static PyObject *py_netr_DsRAddressToSitenamesW_in_get_server_name(PyObject *obj, void *closure)
   50433             : {
   50434           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(obj);
   50435             :         PyObject *py_server_name;
   50436           0 :         if (object->in.server_name == NULL) {
   50437           0 :                 Py_RETURN_NONE;
   50438             :         }
   50439           0 :         if (object->in.server_name == NULL) {
   50440           0 :                 py_server_name = Py_None;
   50441           0 :                 Py_INCREF(py_server_name);
   50442             :         } else {
   50443           0 :                 if (object->in.server_name == NULL) {
   50444           0 :                         py_server_name = Py_None;
   50445           0 :                         Py_INCREF(py_server_name);
   50446             :                 } else {
   50447           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   50448             :                 }
   50449             :         }
   50450           0 :         return py_server_name;
   50451             : }
   50452             : 
   50453           0 : static int py_netr_DsRAddressToSitenamesW_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   50454             : {
   50455           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(py_obj);
   50456           0 :         if (value == NULL) {
   50457           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   50458           0 :                 return -1;
   50459             :         }
   50460           0 :         if (value == Py_None) {
   50461           0 :                 object->in.server_name = NULL;
   50462             :         } else {
   50463           0 :                 object->in.server_name = NULL;
   50464             :                 {
   50465             :                         const char *test_str;
   50466             :                         const char *talloc_str;
   50467           0 :                         PyObject *unicode = NULL;
   50468           0 :                         if (PyUnicode_Check(value)) {
   50469           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   50470           0 :                                 if (unicode == NULL) {
   50471           0 :                                         PyErr_NoMemory();
   50472           0 :                                         return -1;
   50473             :                                 }
   50474           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   50475           0 :                         } else if (PyBytes_Check(value)) {
   50476           0 :                                 test_str = PyBytes_AS_STRING(value);
   50477             :                         } else {
   50478           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   50479           0 :                                 return -1;
   50480             :                         }
   50481           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   50482           0 :                         if (unicode != NULL) {
   50483           0 :                                 Py_DECREF(unicode);
   50484             :                         }
   50485           0 :                         if (talloc_str == NULL) {
   50486           0 :                                 PyErr_NoMemory();
   50487           0 :                                 return -1;
   50488             :                         }
   50489           0 :                         object->in.server_name = talloc_str;
   50490             :                 }
   50491             :         }
   50492           0 :         return 0;
   50493             : }
   50494             : 
   50495           0 : static PyObject *py_netr_DsRAddressToSitenamesW_in_get_count(PyObject *obj, void *closure)
   50496             : {
   50497           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(obj);
   50498             :         PyObject *py_count;
   50499           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->in.count);
   50500           0 :         return py_count;
   50501             : }
   50502             : 
   50503           0 : static int py_netr_DsRAddressToSitenamesW_in_set_count(PyObject *py_obj, PyObject *value, void *closure)
   50504             : {
   50505           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(py_obj);
   50506           0 :         if (value == NULL) {
   50507           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.count");
   50508           0 :                 return -1;
   50509             :         }
   50510             :         {
   50511           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.count));
   50512           0 :                 if (PyLong_Check(value)) {
   50513             :                         unsigned long long test_var;
   50514           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   50515           0 :                         if (PyErr_Occurred() != NULL) {
   50516           0 :                                 return -1;
   50517             :                         }
   50518           0 :                         if (test_var > uint_max) {
   50519           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   50520             :                                   PyLong_Type.tp_name, uint_max, test_var);
   50521           0 :                                 return -1;
   50522             :                         }
   50523           0 :                         object->in.count = test_var;
   50524             :                 } else {
   50525           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   50526             :                           PyLong_Type.tp_name);
   50527           0 :                         return -1;
   50528             :                 }
   50529             :         }
   50530           0 :         return 0;
   50531             : }
   50532             : 
   50533           0 : static PyObject *py_netr_DsRAddressToSitenamesW_in_get_addresses(PyObject *obj, void *closure)
   50534             : {
   50535           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(obj);
   50536             :         PyObject *py_addresses;
   50537           0 :         if (object->in.addresses == NULL) {
   50538           0 :                 Py_RETURN_NONE;
   50539             :         }
   50540           0 :         py_addresses = PyList_New(object->in.count);
   50541           0 :         if (py_addresses == NULL) {
   50542           0 :                 return NULL;
   50543             :         }
   50544             :         {
   50545             :                 int addresses_cntr_1;
   50546           0 :                 for (addresses_cntr_1 = 0; addresses_cntr_1 < (object->in.count); addresses_cntr_1++) {
   50547             :                         PyObject *py_addresses_1;
   50548           0 :                         py_addresses_1 = pytalloc_reference_ex(&netr_DsRAddress_Type, object->in.addresses, &object->in.addresses[addresses_cntr_1]);
   50549           0 :                         PyList_SetItem(py_addresses, addresses_cntr_1, py_addresses_1);
   50550             :                 }
   50551             :         }
   50552           0 :         return py_addresses;
   50553             : }
   50554             : 
   50555           0 : static int py_netr_DsRAddressToSitenamesW_in_set_addresses(PyObject *py_obj, PyObject *value, void *closure)
   50556             : {
   50557           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(py_obj);
   50558           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.addresses));
   50559           0 :         if (value == NULL) {
   50560           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.addresses");
   50561           0 :                 return -1;
   50562             :         }
   50563           0 :         object->in.addresses = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.addresses);
   50564           0 :         if (object->in.addresses == NULL) {
   50565           0 :                 PyErr_NoMemory();
   50566           0 :                 return -1;
   50567             :         }
   50568           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   50569             :         {
   50570             :                 int addresses_cntr_1;
   50571           0 :                 object->in.addresses = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.addresses, PyList_GET_SIZE(value));
   50572           0 :                 if (!object->in.addresses) { return -1;; }
   50573           0 :                 talloc_set_name_const(object->in.addresses, "ARRAY: object->in.addresses");
   50574           0 :                 for (addresses_cntr_1 = 0; addresses_cntr_1 < PyList_GET_SIZE(value); addresses_cntr_1++) {
   50575           0 :                         if (PyList_GET_ITEM(value, addresses_cntr_1) == NULL) {
   50576           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.addresses[addresses_cntr_1]");
   50577           0 :                                 return -1;
   50578             :                         }
   50579           0 :                         PY_CHECK_TYPE(&netr_DsRAddress_Type, PyList_GET_ITEM(value, addresses_cntr_1), return -1;);
   50580           0 :                         if (talloc_reference(object->in.addresses, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, addresses_cntr_1))) == NULL) {
   50581           0 :                                 PyErr_NoMemory();
   50582           0 :                                 return -1;
   50583             :                         }
   50584           0 :                         object->in.addresses[addresses_cntr_1] = *(struct netr_DsRAddress *)pytalloc_get_ptr(PyList_GET_ITEM(value, addresses_cntr_1));
   50585             :                 }
   50586             :         }
   50587           0 :         return 0;
   50588             : }
   50589             : 
   50590           0 : static PyObject *py_netr_DsRAddressToSitenamesW_out_get_ctr(PyObject *obj, void *closure)
   50591             : {
   50592           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(obj);
   50593             :         PyObject *py_ctr;
   50594           0 :         if (object->out.ctr == NULL) {
   50595           0 :                 Py_RETURN_NONE;
   50596             :         }
   50597           0 :         if (*object->out.ctr == NULL) {
   50598           0 :                 py_ctr = Py_None;
   50599           0 :                 Py_INCREF(py_ctr);
   50600             :         } else {
   50601           0 :                 py_ctr = pytalloc_reference_ex(&netr_DsRAddressToSitenamesWCtr_Type, *object->out.ctr, *object->out.ctr);
   50602             :         }
   50603           0 :         return py_ctr;
   50604             : }
   50605             : 
   50606           0 : static int py_netr_DsRAddressToSitenamesW_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
   50607             : {
   50608           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(py_obj);
   50609           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
   50610           0 :         if (value == NULL) {
   50611           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ctr");
   50612           0 :                 return -1;
   50613             :         }
   50614           0 :         object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
   50615           0 :         if (object->out.ctr == NULL) {
   50616           0 :                 PyErr_NoMemory();
   50617           0 :                 return -1;
   50618             :         }
   50619           0 :         if (value == Py_None) {
   50620           0 :                 *object->out.ctr = NULL;
   50621             :         } else {
   50622           0 :                 *object->out.ctr = NULL;
   50623           0 :                 PY_CHECK_TYPE(&netr_DsRAddressToSitenamesWCtr_Type, value, return -1;);
   50624           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   50625           0 :                         PyErr_NoMemory();
   50626           0 :                         return -1;
   50627             :                 }
   50628           0 :                 *object->out.ctr = (struct netr_DsRAddressToSitenamesWCtr *)pytalloc_get_ptr(value);
   50629             :         }
   50630           0 :         return 0;
   50631             : }
   50632             : 
   50633           0 : static PyObject *py_netr_DsRAddressToSitenamesW_get_result(PyObject *obj, void *closure)
   50634             : {
   50635           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(obj);
   50636             :         PyObject *py_result;
   50637           0 :         py_result = PyErr_FromWERROR(object->out.result);
   50638           0 :         return py_result;
   50639             : }
   50640             : 
   50641           0 : static int py_netr_DsRAddressToSitenamesW_set_result(PyObject *py_obj, PyObject *value, void *closure)
   50642             : {
   50643           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(py_obj);
   50644           0 :         if (value == NULL) {
   50645           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   50646           0 :                 return -1;
   50647             :         }
   50648           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   50649           0 :         return 0;
   50650             : }
   50651             : 
   50652             : static PyGetSetDef py_netr_DsRAddressToSitenamesW_getsetters[] = {
   50653             :         {
   50654             :                 .name = discard_const_p(char, "in_server_name"),
   50655             :                 .get = py_netr_DsRAddressToSitenamesW_in_get_server_name,
   50656             :                 .set = py_netr_DsRAddressToSitenamesW_in_set_server_name,
   50657             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   50658             :         },
   50659             :         {
   50660             :                 .name = discard_const_p(char, "in_count"),
   50661             :                 .get = py_netr_DsRAddressToSitenamesW_in_get_count,
   50662             :                 .set = py_netr_DsRAddressToSitenamesW_in_set_count,
   50663             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   50664             :         },
   50665             :         {
   50666             :                 .name = discard_const_p(char, "in_addresses"),
   50667             :                 .get = py_netr_DsRAddressToSitenamesW_in_get_addresses,
   50668             :                 .set = py_netr_DsRAddressToSitenamesW_in_set_addresses,
   50669             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRAddress")
   50670             :         },
   50671             :         {
   50672             :                 .name = discard_const_p(char, "out_ctr"),
   50673             :                 .get = py_netr_DsRAddressToSitenamesW_out_get_ctr,
   50674             :                 .set = py_netr_DsRAddressToSitenamesW_out_set_ctr,
   50675             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRAddressToSitenamesWCtr")
   50676             :         },
   50677             :         {
   50678             :                 .name = discard_const_p(char, "result"),
   50679             :                 .get = py_netr_DsRAddressToSitenamesW_get_result,
   50680             :                 .set = py_netr_DsRAddressToSitenamesW_set_result,
   50681             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   50682             :         },
   50683             :         { .name = NULL }
   50684             : };
   50685             : 
   50686           0 : static PyObject *py_netr_DsRAddressToSitenamesW_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   50687             : {
   50688           0 :         PyObject *self = pytalloc_new(struct netr_DsRAddressToSitenamesW, type);
   50689           0 :         struct netr_DsRAddressToSitenamesW *_self = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(self);
   50690           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   50691           0 :         _self->in.addresses = talloc_zero(mem_ctx, struct netr_DsRAddress);
   50692             :         /* a pointer to a NULL pointer */
   50693           0 :         _self->out.ctr = talloc_zero(mem_ctx, struct netr_DsRAddressToSitenamesWCtr *);
   50694           0 :         return self;
   50695             : }
   50696             : 
   50697           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   50698             : {
   50699             : 
   50700             : 
   50701           0 :         return PyLong_FromLong(33);
   50702             : }
   50703             : 
   50704           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   50705             : {
   50706           0 :         const struct ndr_interface_call *call = NULL;
   50707           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(py_obj);
   50708           0 :         PyObject *ret = NULL;
   50709           0 :         struct ndr_push *push = NULL;
   50710             :         DATA_BLOB blob;
   50711             :         enum ndr_err_code err;
   50712             : 
   50713           0 :         if (ndr_table_netlogon.num_calls < 34) {
   50714           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRAddressToSitenamesW_ndr_pack");
   50715           0 :                 return NULL;
   50716             :         }
   50717           0 :         call = &ndr_table_netlogon.calls[33];
   50718             : 
   50719           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   50720           0 :         if (push == NULL) {
   50721           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   50722           0 :                 return NULL;
   50723             :         }
   50724             : 
   50725           0 :         push->flags |= ndr_push_flags;
   50726             : 
   50727           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   50728           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   50729           0 :                 TALLOC_FREE(push);
   50730           0 :                 PyErr_SetNdrError(err);
   50731           0 :                 return NULL;
   50732             :         }
   50733           0 :         blob = ndr_push_blob(push);
   50734           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   50735           0 :         TALLOC_FREE(push);
   50736           0 :         return ret;
   50737             : }
   50738             : 
   50739           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50740             : {
   50741           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   50742           0 :         PyObject *bigendian_obj = NULL;
   50743           0 :         PyObject *ndr64_obj = NULL;
   50744           0 :         uint32_t ndr_push_flags = 0;
   50745             : 
   50746           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   50747             :                 discard_const_p(char *, kwnames),
   50748             :                 &bigendian_obj,
   50749             :                 &ndr64_obj)) {
   50750           0 :                 return NULL;
   50751             :         }
   50752             : 
   50753           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50754           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   50755             :         }
   50756           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50757           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   50758             :         }
   50759             : 
   50760           0 :         return py_netr_DsRAddressToSitenamesW_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   50761             : }
   50762             : 
   50763           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50764             : {
   50765           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   50766           0 :         PyObject *bigendian_obj = NULL;
   50767           0 :         PyObject *ndr64_obj = NULL;
   50768           0 :         uint32_t ndr_push_flags = 0;
   50769             : 
   50770           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   50771             :                 discard_const_p(char *, kwnames),
   50772             :                 &bigendian_obj,
   50773             :                 &ndr64_obj)) {
   50774           0 :                 return NULL;
   50775             :         }
   50776             : 
   50777           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50778           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   50779             :         }
   50780           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50781           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   50782             :         }
   50783             : 
   50784           0 :         return py_netr_DsRAddressToSitenamesW_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   50785             : }
   50786             : 
   50787           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   50788             : {
   50789           0 :         const struct ndr_interface_call *call = NULL;
   50790           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(py_obj);
   50791           0 :         struct ndr_pull *pull = NULL;
   50792             :         enum ndr_err_code err;
   50793             : 
   50794           0 :         if (ndr_table_netlogon.num_calls < 34) {
   50795           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRAddressToSitenamesW_ndr_unpack");
   50796           0 :                 return NULL;
   50797             :         }
   50798           0 :         call = &ndr_table_netlogon.calls[33];
   50799             : 
   50800           0 :         pull = ndr_pull_init_blob(blob, object);
   50801           0 :         if (pull == NULL) {
   50802           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   50803           0 :                 return NULL;
   50804             :         }
   50805             : 
   50806           0 :         pull->flags |= ndr_pull_flags;
   50807             : 
   50808           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   50809           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   50810           0 :                 TALLOC_FREE(pull);
   50811           0 :                 PyErr_SetNdrError(err);
   50812           0 :                 return NULL;
   50813             :         }
   50814           0 :         if (!allow_remaining) {
   50815             :                 uint32_t highest_ofs;
   50816             : 
   50817           0 :                 if (pull->offset > pull->relative_highest_offset) {
   50818           0 :                         highest_ofs = pull->offset;
   50819             :                 } else {
   50820           0 :                         highest_ofs = pull->relative_highest_offset;
   50821             :                 }
   50822           0 :                 if (highest_ofs < pull->data_size) {
   50823           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   50824             :                                 "not all bytes consumed ofs[%u] size[%u]",
   50825             :                                 highest_ofs, pull->data_size);
   50826           0 :                         TALLOC_FREE(pull);
   50827           0 :                         PyErr_SetNdrError(err);
   50828           0 :                         return NULL;
   50829             :                 }
   50830             :         }
   50831             : 
   50832           0 :         TALLOC_FREE(pull);
   50833           0 :         Py_RETURN_NONE;
   50834             : }
   50835             : 
   50836           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50837             : {
   50838             :         DATA_BLOB blob;
   50839           0 :         Py_ssize_t blob_length = 0;
   50840           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   50841           0 :         PyObject *bigendian_obj = NULL;
   50842           0 :         PyObject *ndr64_obj = NULL;
   50843           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   50844           0 :         PyObject *allow_remaining_obj = NULL;
   50845           0 :         bool allow_remaining = false;
   50846             : 
   50847           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   50848             :                 discard_const_p(char *, kwnames),
   50849             :                 &blob.data, &blob_length,
   50850             :                 &bigendian_obj,
   50851             :                 &ndr64_obj,
   50852             :                 &allow_remaining_obj)) {
   50853           0 :                 return NULL;
   50854             :         }
   50855           0 :         blob.length = blob_length;
   50856             : 
   50857           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50858           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   50859             :         }
   50860           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50861           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   50862             :         }
   50863             : 
   50864           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   50865           0 :                 allow_remaining = true;
   50866             :         }
   50867             : 
   50868           0 :         return py_netr_DsRAddressToSitenamesW_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   50869             : }
   50870             : 
   50871           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   50872             : {
   50873             :         DATA_BLOB blob;
   50874           0 :         Py_ssize_t blob_length = 0;
   50875           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   50876           0 :         PyObject *bigendian_obj = NULL;
   50877           0 :         PyObject *ndr64_obj = NULL;
   50878           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   50879           0 :         PyObject *allow_remaining_obj = NULL;
   50880           0 :         bool allow_remaining = false;
   50881             : 
   50882           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   50883             :                 discard_const_p(char *, kwnames),
   50884             :                 &blob.data, &blob_length,
   50885             :                 &bigendian_obj,
   50886             :                 &ndr64_obj,
   50887             :                 &allow_remaining_obj)) {
   50888           0 :                 return NULL;
   50889             :         }
   50890           0 :         blob.length = blob_length;
   50891             : 
   50892           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   50893           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   50894             :         }
   50895           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   50896           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   50897             :         }
   50898             : 
   50899           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   50900           0 :                 allow_remaining = true;
   50901             :         }
   50902             : 
   50903           0 :         return py_netr_DsRAddressToSitenamesW_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   50904             : }
   50905             : 
   50906           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   50907             : {
   50908           0 :         const struct ndr_interface_call *call = NULL;
   50909           0 :         struct netr_DsRAddressToSitenamesW *object = (struct netr_DsRAddressToSitenamesW *)pytalloc_get_ptr(py_obj);
   50910             :         PyObject *ret;
   50911             :         char *retstr;
   50912             : 
   50913           0 :         if (ndr_table_netlogon.num_calls < 34) {
   50914           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRAddressToSitenamesW_ndr_print");
   50915           0 :                 return NULL;
   50916             :         }
   50917           0 :         call = &ndr_table_netlogon.calls[33];
   50918             : 
   50919           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   50920           0 :         ret = PyUnicode_FromString(retstr);
   50921           0 :         TALLOC_FREE(retstr);
   50922             : 
   50923           0 :         return ret;
   50924             : }
   50925             : 
   50926           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   50927             : {
   50928           0 :         return py_netr_DsRAddressToSitenamesW_ndr_print(py_obj, "netr_DsRAddressToSitenamesW_in", NDR_IN);
   50929             : }
   50930             : 
   50931           0 : static PyObject *py_netr_DsRAddressToSitenamesW_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   50932             : {
   50933           0 :         return py_netr_DsRAddressToSitenamesW_ndr_print(py_obj, "netr_DsRAddressToSitenamesW_out", NDR_OUT);
   50934             : }
   50935             : 
   50936             : static PyMethodDef py_netr_DsRAddressToSitenamesW_methods[] = {
   50937             :         { "opnum", (PyCFunction)py_netr_DsRAddressToSitenamesW_ndr_opnum, METH_NOARGS|METH_CLASS,
   50938             :                 "netlogon.netr_DsRAddressToSitenamesW.opnum() -> 33 (0x21) " },
   50939             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesW_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   50940             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   50941             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesW_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   50942             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   50943             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesW_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   50944             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   50945             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesW_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   50946             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   50947             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsRAddressToSitenamesW_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   50948             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsRAddressToSitenamesW_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   50949             :         { NULL, NULL, 0, NULL }
   50950             : };
   50951             : 
   50952             : 
   50953             : static PyTypeObject netr_DsRAddressToSitenamesW_Type = {
   50954             :         PyVarObject_HEAD_INIT(NULL, 0)
   50955             :         .tp_name = "netlogon.netr_DsRAddressToSitenamesW",
   50956             :         .tp_getset = py_netr_DsRAddressToSitenamesW_getsetters,
   50957             :         .tp_methods = py_netr_DsRAddressToSitenamesW_methods,
   50958             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   50959             :         .tp_new = py_netr_DsRAddressToSitenamesW_new,
   50960             : };
   50961             : 
   50962           0 : static bool pack_py_netr_DsRAddressToSitenamesW_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRAddressToSitenamesW *r)
   50963             : {
   50964             :         PyObject *py_server_name;
   50965             :         PyObject *py_addresses;
   50966           0 :         const char *kwnames[] = {
   50967             :                 "server_name", "addresses", NULL
   50968             :         };
   50969             : 
   50970           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:netr_DsRAddressToSitenamesW", discard_const_p(char *, kwnames), &py_server_name, &py_addresses)) {
   50971           0 :                 return false;
   50972             :         }
   50973             : 
   50974           0 :         if (py_server_name == NULL) {
   50975           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   50976           0 :                 return false;
   50977             :         }
   50978           0 :         if (py_server_name == Py_None) {
   50979           0 :                 r->in.server_name = NULL;
   50980             :         } else {
   50981           0 :                 r->in.server_name = NULL;
   50982             :                 {
   50983             :                         const char *test_str;
   50984             :                         const char *talloc_str;
   50985           0 :                         PyObject *unicode = NULL;
   50986           0 :                         if (PyUnicode_Check(py_server_name)) {
   50987           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   50988           0 :                                 if (unicode == NULL) {
   50989           0 :                                         PyErr_NoMemory();
   50990           0 :                                         return false;
   50991             :                                 }
   50992           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   50993           0 :                         } else if (PyBytes_Check(py_server_name)) {
   50994           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   50995             :                         } else {
   50996           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   50997           0 :                                 return false;
   50998             :                         }
   50999           0 :                         talloc_str = talloc_strdup(r, test_str);
   51000           0 :                         if (unicode != NULL) {
   51001           0 :                                 Py_DECREF(unicode);
   51002             :                         }
   51003           0 :                         if (talloc_str == NULL) {
   51004           0 :                                 PyErr_NoMemory();
   51005           0 :                                 return false;
   51006             :                         }
   51007           0 :                         r->in.server_name = talloc_str;
   51008             :                 }
   51009             :         }
   51010           0 :         PY_CHECK_TYPE(&PyList_Type, py_addresses, return false;);
   51011           0 :         r->in.count = PyList_GET_SIZE(py_addresses);
   51012           0 :         if (py_addresses == NULL) {
   51013           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.addresses");
   51014           0 :                 return false;
   51015             :         }
   51016           0 :         r->in.addresses = talloc_ptrtype(r, r->in.addresses);
   51017           0 :         if (r->in.addresses == NULL) {
   51018           0 :                 PyErr_NoMemory();
   51019           0 :                 return false;
   51020             :         }
   51021           0 :         PY_CHECK_TYPE(&PyList_Type, py_addresses, return false;);
   51022             :         {
   51023             :                 int addresses_cntr_1;
   51024           0 :                 r->in.addresses = talloc_array_ptrtype(r, r->in.addresses, PyList_GET_SIZE(py_addresses));
   51025           0 :                 if (!r->in.addresses) { return false;; }
   51026           0 :                 talloc_set_name_const(r->in.addresses, "ARRAY: r->in.addresses");
   51027           0 :                 for (addresses_cntr_1 = 0; addresses_cntr_1 < PyList_GET_SIZE(py_addresses); addresses_cntr_1++) {
   51028           0 :                         if (PyList_GET_ITEM(py_addresses, addresses_cntr_1) == NULL) {
   51029           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.addresses[addresses_cntr_1]");
   51030           0 :                                 return false;
   51031             :                         }
   51032           0 :                         PY_CHECK_TYPE(&netr_DsRAddress_Type, PyList_GET_ITEM(py_addresses, addresses_cntr_1), return false;);
   51033           0 :                         if (talloc_reference(r->in.addresses, pytalloc_get_mem_ctx(PyList_GET_ITEM(py_addresses, addresses_cntr_1))) == NULL) {
   51034           0 :                                 PyErr_NoMemory();
   51035           0 :                                 return false;
   51036             :                         }
   51037           0 :                         r->in.addresses[addresses_cntr_1] = *(struct netr_DsRAddress *)pytalloc_get_ptr(PyList_GET_ITEM(py_addresses, addresses_cntr_1));
   51038             :                 }
   51039             :         }
   51040           0 :         return true;
   51041             : }
   51042             : 
   51043           0 : static PyObject *unpack_py_netr_DsRAddressToSitenamesW_args_out(struct netr_DsRAddressToSitenamesW *r)
   51044             : {
   51045             :         PyObject *result;
   51046             :         PyObject *py_ctr;
   51047           0 :         if (*r->out.ctr == NULL) {
   51048           0 :                 py_ctr = Py_None;
   51049           0 :                 Py_INCREF(py_ctr);
   51050             :         } else {
   51051           0 :                 py_ctr = pytalloc_reference_ex(&netr_DsRAddressToSitenamesWCtr_Type, *r->out.ctr, *r->out.ctr);
   51052             :         }
   51053           0 :         result = py_ctr;
   51054           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   51055           0 :                 PyErr_SetWERROR(r->out.result);
   51056           0 :                 return NULL;
   51057             :         }
   51058             : 
   51059           0 :         return result;
   51060             : }
   51061             : 
   51062             : 
   51063           0 : static PyObject *py_netr_DsRGetDCNameEx2_in_get_server_unc(PyObject *obj, void *closure)
   51064             : {
   51065           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(obj);
   51066             :         PyObject *py_server_unc;
   51067           0 :         if (object->in.server_unc == NULL) {
   51068           0 :                 Py_RETURN_NONE;
   51069             :         }
   51070           0 :         if (object->in.server_unc == NULL) {
   51071           0 :                 py_server_unc = Py_None;
   51072           0 :                 Py_INCREF(py_server_unc);
   51073             :         } else {
   51074           0 :                 if (object->in.server_unc == NULL) {
   51075           0 :                         py_server_unc = Py_None;
   51076           0 :                         Py_INCREF(py_server_unc);
   51077             :                 } else {
   51078           0 :                         py_server_unc = PyUnicode_Decode(object->in.server_unc, strlen(object->in.server_unc), "utf-8", "ignore");
   51079             :                 }
   51080             :         }
   51081           0 :         return py_server_unc;
   51082             : }
   51083             : 
   51084           0 : static int py_netr_DsRGetDCNameEx2_in_set_server_unc(PyObject *py_obj, PyObject *value, void *closure)
   51085             : {
   51086           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(py_obj);
   51087           0 :         if (value == NULL) {
   51088           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_unc");
   51089           0 :                 return -1;
   51090             :         }
   51091           0 :         if (value == Py_None) {
   51092           0 :                 object->in.server_unc = NULL;
   51093             :         } else {
   51094           0 :                 object->in.server_unc = NULL;
   51095             :                 {
   51096             :                         const char *test_str;
   51097             :                         const char *talloc_str;
   51098           0 :                         PyObject *unicode = NULL;
   51099           0 :                         if (PyUnicode_Check(value)) {
   51100           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   51101           0 :                                 if (unicode == NULL) {
   51102           0 :                                         PyErr_NoMemory();
   51103           0 :                                         return -1;
   51104             :                                 }
   51105           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   51106           0 :                         } else if (PyBytes_Check(value)) {
   51107           0 :                                 test_str = PyBytes_AS_STRING(value);
   51108             :                         } else {
   51109           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   51110           0 :                                 return -1;
   51111             :                         }
   51112           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   51113           0 :                         if (unicode != NULL) {
   51114           0 :                                 Py_DECREF(unicode);
   51115             :                         }
   51116           0 :                         if (talloc_str == NULL) {
   51117           0 :                                 PyErr_NoMemory();
   51118           0 :                                 return -1;
   51119             :                         }
   51120           0 :                         object->in.server_unc = talloc_str;
   51121             :                 }
   51122             :         }
   51123           0 :         return 0;
   51124             : }
   51125             : 
   51126           0 : static PyObject *py_netr_DsRGetDCNameEx2_in_get_client_account(PyObject *obj, void *closure)
   51127             : {
   51128           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(obj);
   51129             :         PyObject *py_client_account;
   51130           0 :         if (object->in.client_account == NULL) {
   51131           0 :                 Py_RETURN_NONE;
   51132             :         }
   51133           0 :         if (object->in.client_account == NULL) {
   51134           0 :                 py_client_account = Py_None;
   51135           0 :                 Py_INCREF(py_client_account);
   51136             :         } else {
   51137           0 :                 if (object->in.client_account == NULL) {
   51138           0 :                         py_client_account = Py_None;
   51139           0 :                         Py_INCREF(py_client_account);
   51140             :                 } else {
   51141           0 :                         py_client_account = PyUnicode_Decode(object->in.client_account, strlen(object->in.client_account), "utf-8", "ignore");
   51142             :                 }
   51143             :         }
   51144           0 :         return py_client_account;
   51145             : }
   51146             : 
   51147           0 : static int py_netr_DsRGetDCNameEx2_in_set_client_account(PyObject *py_obj, PyObject *value, void *closure)
   51148             : {
   51149           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(py_obj);
   51150           0 :         if (value == NULL) {
   51151           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.client_account");
   51152           0 :                 return -1;
   51153             :         }
   51154           0 :         if (value == Py_None) {
   51155           0 :                 object->in.client_account = NULL;
   51156             :         } else {
   51157           0 :                 object->in.client_account = NULL;
   51158             :                 {
   51159             :                         const char *test_str;
   51160             :                         const char *talloc_str;
   51161           0 :                         PyObject *unicode = NULL;
   51162           0 :                         if (PyUnicode_Check(value)) {
   51163           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   51164           0 :                                 if (unicode == NULL) {
   51165           0 :                                         PyErr_NoMemory();
   51166           0 :                                         return -1;
   51167             :                                 }
   51168           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   51169           0 :                         } else if (PyBytes_Check(value)) {
   51170           0 :                                 test_str = PyBytes_AS_STRING(value);
   51171             :                         } else {
   51172           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   51173           0 :                                 return -1;
   51174             :                         }
   51175           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   51176           0 :                         if (unicode != NULL) {
   51177           0 :                                 Py_DECREF(unicode);
   51178             :                         }
   51179           0 :                         if (talloc_str == NULL) {
   51180           0 :                                 PyErr_NoMemory();
   51181           0 :                                 return -1;
   51182             :                         }
   51183           0 :                         object->in.client_account = talloc_str;
   51184             :                 }
   51185             :         }
   51186           0 :         return 0;
   51187             : }
   51188             : 
   51189           0 : static PyObject *py_netr_DsRGetDCNameEx2_in_get_mask(PyObject *obj, void *closure)
   51190             : {
   51191           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(obj);
   51192             :         PyObject *py_mask;
   51193           0 :         py_mask = PyLong_FromUnsignedLongLong((uint32_t)object->in.mask);
   51194           0 :         return py_mask;
   51195             : }
   51196             : 
   51197           0 : static int py_netr_DsRGetDCNameEx2_in_set_mask(PyObject *py_obj, PyObject *value, void *closure)
   51198             : {
   51199           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(py_obj);
   51200           0 :         if (value == NULL) {
   51201           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.mask");
   51202           0 :                 return -1;
   51203             :         }
   51204             :         {
   51205           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.mask));
   51206           0 :                 if (PyLong_Check(value)) {
   51207             :                         unsigned long long test_var;
   51208           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   51209           0 :                         if (PyErr_Occurred() != NULL) {
   51210           0 :                                 return -1;
   51211             :                         }
   51212           0 :                         if (test_var > uint_max) {
   51213           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   51214             :                                   PyLong_Type.tp_name, uint_max, test_var);
   51215           0 :                                 return -1;
   51216             :                         }
   51217           0 :                         object->in.mask = test_var;
   51218             :                 } else {
   51219           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   51220             :                           PyLong_Type.tp_name);
   51221           0 :                         return -1;
   51222             :                 }
   51223             :         }
   51224           0 :         return 0;
   51225             : }
   51226             : 
   51227           0 : static PyObject *py_netr_DsRGetDCNameEx2_in_get_domain_name(PyObject *obj, void *closure)
   51228             : {
   51229           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(obj);
   51230             :         PyObject *py_domain_name;
   51231           0 :         if (object->in.domain_name == NULL) {
   51232           0 :                 Py_RETURN_NONE;
   51233             :         }
   51234           0 :         if (object->in.domain_name == NULL) {
   51235           0 :                 py_domain_name = Py_None;
   51236           0 :                 Py_INCREF(py_domain_name);
   51237             :         } else {
   51238           0 :                 if (object->in.domain_name == NULL) {
   51239           0 :                         py_domain_name = Py_None;
   51240           0 :                         Py_INCREF(py_domain_name);
   51241             :                 } else {
   51242           0 :                         py_domain_name = PyUnicode_Decode(object->in.domain_name, strlen(object->in.domain_name), "utf-8", "ignore");
   51243             :                 }
   51244             :         }
   51245           0 :         return py_domain_name;
   51246             : }
   51247             : 
   51248           0 : static int py_netr_DsRGetDCNameEx2_in_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   51249             : {
   51250           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(py_obj);
   51251           0 :         if (value == NULL) {
   51252           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_name");
   51253           0 :                 return -1;
   51254             :         }
   51255           0 :         if (value == Py_None) {
   51256           0 :                 object->in.domain_name = NULL;
   51257             :         } else {
   51258           0 :                 object->in.domain_name = NULL;
   51259             :                 {
   51260             :                         const char *test_str;
   51261             :                         const char *talloc_str;
   51262           0 :                         PyObject *unicode = NULL;
   51263           0 :                         if (PyUnicode_Check(value)) {
   51264           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   51265           0 :                                 if (unicode == NULL) {
   51266           0 :                                         PyErr_NoMemory();
   51267           0 :                                         return -1;
   51268             :                                 }
   51269           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   51270           0 :                         } else if (PyBytes_Check(value)) {
   51271           0 :                                 test_str = PyBytes_AS_STRING(value);
   51272             :                         } else {
   51273           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   51274           0 :                                 return -1;
   51275             :                         }
   51276           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   51277           0 :                         if (unicode != NULL) {
   51278           0 :                                 Py_DECREF(unicode);
   51279             :                         }
   51280           0 :                         if (talloc_str == NULL) {
   51281           0 :                                 PyErr_NoMemory();
   51282           0 :                                 return -1;
   51283             :                         }
   51284           0 :                         object->in.domain_name = talloc_str;
   51285             :                 }
   51286             :         }
   51287           0 :         return 0;
   51288             : }
   51289             : 
   51290           0 : static PyObject *py_netr_DsRGetDCNameEx2_in_get_domain_guid(PyObject *obj, void *closure)
   51291             : {
   51292           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(obj);
   51293             :         PyObject *py_domain_guid;
   51294           0 :         if (object->in.domain_guid == NULL) {
   51295           0 :                 Py_RETURN_NONE;
   51296             :         }
   51297           0 :         if (object->in.domain_guid == NULL) {
   51298           0 :                 py_domain_guid = Py_None;
   51299           0 :                 Py_INCREF(py_domain_guid);
   51300             :         } else {
   51301           0 :                 py_domain_guid = pytalloc_reference_ex(GUID_Type, object->in.domain_guid, object->in.domain_guid);
   51302             :         }
   51303           0 :         return py_domain_guid;
   51304             : }
   51305             : 
   51306           0 : static int py_netr_DsRGetDCNameEx2_in_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
   51307             : {
   51308           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(py_obj);
   51309           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.domain_guid));
   51310           0 :         if (value == NULL) {
   51311           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_guid");
   51312           0 :                 return -1;
   51313             :         }
   51314           0 :         if (value == Py_None) {
   51315           0 :                 object->in.domain_guid = NULL;
   51316             :         } else {
   51317           0 :                 object->in.domain_guid = NULL;
   51318           0 :                 PY_CHECK_TYPE(GUID_Type, value, return -1;);
   51319           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   51320           0 :                         PyErr_NoMemory();
   51321           0 :                         return -1;
   51322             :                 }
   51323           0 :                 object->in.domain_guid = (struct GUID *)pytalloc_get_ptr(value);
   51324             :         }
   51325           0 :         return 0;
   51326             : }
   51327             : 
   51328           0 : static PyObject *py_netr_DsRGetDCNameEx2_in_get_site_name(PyObject *obj, void *closure)
   51329             : {
   51330           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(obj);
   51331             :         PyObject *py_site_name;
   51332           0 :         if (object->in.site_name == NULL) {
   51333           0 :                 Py_RETURN_NONE;
   51334             :         }
   51335           0 :         if (object->in.site_name == NULL) {
   51336           0 :                 py_site_name = Py_None;
   51337           0 :                 Py_INCREF(py_site_name);
   51338             :         } else {
   51339           0 :                 if (object->in.site_name == NULL) {
   51340           0 :                         py_site_name = Py_None;
   51341           0 :                         Py_INCREF(py_site_name);
   51342             :                 } else {
   51343           0 :                         py_site_name = PyUnicode_Decode(object->in.site_name, strlen(object->in.site_name), "utf-8", "ignore");
   51344             :                 }
   51345             :         }
   51346           0 :         return py_site_name;
   51347             : }
   51348             : 
   51349           0 : static int py_netr_DsRGetDCNameEx2_in_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
   51350             : {
   51351           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(py_obj);
   51352           0 :         if (value == NULL) {
   51353           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.site_name");
   51354           0 :                 return -1;
   51355             :         }
   51356           0 :         if (value == Py_None) {
   51357           0 :                 object->in.site_name = NULL;
   51358             :         } else {
   51359           0 :                 object->in.site_name = NULL;
   51360             :                 {
   51361             :                         const char *test_str;
   51362             :                         const char *talloc_str;
   51363           0 :                         PyObject *unicode = NULL;
   51364           0 :                         if (PyUnicode_Check(value)) {
   51365           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   51366           0 :                                 if (unicode == NULL) {
   51367           0 :                                         PyErr_NoMemory();
   51368           0 :                                         return -1;
   51369             :                                 }
   51370           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   51371           0 :                         } else if (PyBytes_Check(value)) {
   51372           0 :                                 test_str = PyBytes_AS_STRING(value);
   51373             :                         } else {
   51374           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   51375           0 :                                 return -1;
   51376             :                         }
   51377           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   51378           0 :                         if (unicode != NULL) {
   51379           0 :                                 Py_DECREF(unicode);
   51380             :                         }
   51381           0 :                         if (talloc_str == NULL) {
   51382           0 :                                 PyErr_NoMemory();
   51383           0 :                                 return -1;
   51384             :                         }
   51385           0 :                         object->in.site_name = talloc_str;
   51386             :                 }
   51387             :         }
   51388           0 :         return 0;
   51389             : }
   51390             : 
   51391           0 : static PyObject *py_netr_DsRGetDCNameEx2_in_get_flags(PyObject *obj, void *closure)
   51392             : {
   51393           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(obj);
   51394             :         PyObject *py_flags;
   51395           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
   51396           0 :         return py_flags;
   51397             : }
   51398             : 
   51399           0 : static int py_netr_DsRGetDCNameEx2_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   51400             : {
   51401           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(py_obj);
   51402           0 :         if (value == NULL) {
   51403           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   51404           0 :                 return -1;
   51405             :         }
   51406             :         {
   51407           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   51408           0 :                 if (PyLong_Check(value)) {
   51409             :                         unsigned long long test_var;
   51410           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   51411           0 :                         if (PyErr_Occurred() != NULL) {
   51412           0 :                                 return -1;
   51413             :                         }
   51414           0 :                         if (test_var > uint_max) {
   51415           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   51416             :                                   PyLong_Type.tp_name, uint_max, test_var);
   51417           0 :                                 return -1;
   51418             :                         }
   51419           0 :                         object->in.flags = test_var;
   51420             :                 } else {
   51421           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   51422             :                           PyLong_Type.tp_name);
   51423           0 :                         return -1;
   51424             :                 }
   51425             :         }
   51426           0 :         return 0;
   51427             : }
   51428             : 
   51429           0 : static PyObject *py_netr_DsRGetDCNameEx2_out_get_info(PyObject *obj, void *closure)
   51430             : {
   51431           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(obj);
   51432             :         PyObject *py_info;
   51433           0 :         if (object->out.info == NULL) {
   51434           0 :                 Py_RETURN_NONE;
   51435             :         }
   51436           0 :         if (*object->out.info == NULL) {
   51437           0 :                 py_info = Py_None;
   51438           0 :                 Py_INCREF(py_info);
   51439             :         } else {
   51440           0 :                 py_info = pytalloc_reference_ex(&netr_DsRGetDCNameInfo_Type, *object->out.info, *object->out.info);
   51441             :         }
   51442           0 :         return py_info;
   51443             : }
   51444             : 
   51445           0 : static int py_netr_DsRGetDCNameEx2_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   51446             : {
   51447           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(py_obj);
   51448           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   51449           0 :         if (value == NULL) {
   51450           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
   51451           0 :                 return -1;
   51452             :         }
   51453           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   51454           0 :         if (object->out.info == NULL) {
   51455           0 :                 PyErr_NoMemory();
   51456           0 :                 return -1;
   51457             :         }
   51458           0 :         if (value == Py_None) {
   51459           0 :                 *object->out.info = NULL;
   51460             :         } else {
   51461           0 :                 *object->out.info = NULL;
   51462           0 :                 PY_CHECK_TYPE(&netr_DsRGetDCNameInfo_Type, value, return -1;);
   51463           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   51464           0 :                         PyErr_NoMemory();
   51465           0 :                         return -1;
   51466             :                 }
   51467           0 :                 *object->out.info = (struct netr_DsRGetDCNameInfo *)pytalloc_get_ptr(value);
   51468             :         }
   51469           0 :         return 0;
   51470             : }
   51471             : 
   51472           0 : static PyObject *py_netr_DsRGetDCNameEx2_get_result(PyObject *obj, void *closure)
   51473             : {
   51474           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(obj);
   51475             :         PyObject *py_result;
   51476           0 :         py_result = PyErr_FromWERROR(object->out.result);
   51477           0 :         return py_result;
   51478             : }
   51479             : 
   51480           0 : static int py_netr_DsRGetDCNameEx2_set_result(PyObject *py_obj, PyObject *value, void *closure)
   51481             : {
   51482           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(py_obj);
   51483           0 :         if (value == NULL) {
   51484           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   51485           0 :                 return -1;
   51486             :         }
   51487           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   51488           0 :         return 0;
   51489             : }
   51490             : 
   51491             : static PyGetSetDef py_netr_DsRGetDCNameEx2_getsetters[] = {
   51492             :         {
   51493             :                 .name = discard_const_p(char, "in_server_unc"),
   51494             :                 .get = py_netr_DsRGetDCNameEx2_in_get_server_unc,
   51495             :                 .set = py_netr_DsRGetDCNameEx2_in_set_server_unc,
   51496             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   51497             :         },
   51498             :         {
   51499             :                 .name = discard_const_p(char, "in_client_account"),
   51500             :                 .get = py_netr_DsRGetDCNameEx2_in_get_client_account,
   51501             :                 .set = py_netr_DsRGetDCNameEx2_in_set_client_account,
   51502             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   51503             :         },
   51504             :         {
   51505             :                 .name = discard_const_p(char, "in_mask"),
   51506             :                 .get = py_netr_DsRGetDCNameEx2_in_get_mask,
   51507             :                 .set = py_netr_DsRGetDCNameEx2_in_set_mask,
   51508             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_AcctFlags")
   51509             :         },
   51510             :         {
   51511             :                 .name = discard_const_p(char, "in_domain_name"),
   51512             :                 .get = py_netr_DsRGetDCNameEx2_in_get_domain_name,
   51513             :                 .set = py_netr_DsRGetDCNameEx2_in_set_domain_name,
   51514             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   51515             :         },
   51516             :         {
   51517             :                 .name = discard_const_p(char, "in_domain_guid"),
   51518             :                 .get = py_netr_DsRGetDCNameEx2_in_get_domain_guid,
   51519             :                 .set = py_netr_DsRGetDCNameEx2_in_set_domain_guid,
   51520             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   51521             :         },
   51522             :         {
   51523             :                 .name = discard_const_p(char, "in_site_name"),
   51524             :                 .get = py_netr_DsRGetDCNameEx2_in_get_site_name,
   51525             :                 .set = py_netr_DsRGetDCNameEx2_in_set_site_name,
   51526             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   51527             :         },
   51528             :         {
   51529             :                 .name = discard_const_p(char, "in_flags"),
   51530             :                 .get = py_netr_DsRGetDCNameEx2_in_get_flags,
   51531             :                 .set = py_netr_DsRGetDCNameEx2_in_set_flags,
   51532             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCName_flags")
   51533             :         },
   51534             :         {
   51535             :                 .name = discard_const_p(char, "out_info"),
   51536             :                 .get = py_netr_DsRGetDCNameEx2_out_get_info,
   51537             :                 .set = py_netr_DsRGetDCNameEx2_out_set_info,
   51538             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRGetDCNameInfo")
   51539             :         },
   51540             :         {
   51541             :                 .name = discard_const_p(char, "result"),
   51542             :                 .get = py_netr_DsRGetDCNameEx2_get_result,
   51543             :                 .set = py_netr_DsRGetDCNameEx2_set_result,
   51544             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   51545             :         },
   51546             :         { .name = NULL }
   51547             : };
   51548             : 
   51549           0 : static PyObject *py_netr_DsRGetDCNameEx2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   51550             : {
   51551           0 :         PyObject *self = pytalloc_new(struct netr_DsRGetDCNameEx2, type);
   51552           0 :         struct netr_DsRGetDCNameEx2 *_self = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(self);
   51553           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   51554             :         /* a pointer to a NULL pointer */
   51555           0 :         _self->out.info = talloc_zero(mem_ctx, struct netr_DsRGetDCNameInfo *);
   51556           0 :         return self;
   51557             : }
   51558             : 
   51559           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   51560             : {
   51561             : 
   51562             : 
   51563           0 :         return PyLong_FromLong(34);
   51564             : }
   51565             : 
   51566           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   51567             : {
   51568           0 :         const struct ndr_interface_call *call = NULL;
   51569           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(py_obj);
   51570           0 :         PyObject *ret = NULL;
   51571           0 :         struct ndr_push *push = NULL;
   51572             :         DATA_BLOB blob;
   51573             :         enum ndr_err_code err;
   51574             : 
   51575           0 :         if (ndr_table_netlogon.num_calls < 35) {
   51576           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCNameEx2_ndr_pack");
   51577           0 :                 return NULL;
   51578             :         }
   51579           0 :         call = &ndr_table_netlogon.calls[34];
   51580             : 
   51581           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   51582           0 :         if (push == NULL) {
   51583           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   51584           0 :                 return NULL;
   51585             :         }
   51586             : 
   51587           0 :         push->flags |= ndr_push_flags;
   51588             : 
   51589           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   51590           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   51591           0 :                 TALLOC_FREE(push);
   51592           0 :                 PyErr_SetNdrError(err);
   51593           0 :                 return NULL;
   51594             :         }
   51595           0 :         blob = ndr_push_blob(push);
   51596           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   51597           0 :         TALLOC_FREE(push);
   51598           0 :         return ret;
   51599             : }
   51600             : 
   51601           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   51602             : {
   51603           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   51604           0 :         PyObject *bigendian_obj = NULL;
   51605           0 :         PyObject *ndr64_obj = NULL;
   51606           0 :         uint32_t ndr_push_flags = 0;
   51607             : 
   51608           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   51609             :                 discard_const_p(char *, kwnames),
   51610             :                 &bigendian_obj,
   51611             :                 &ndr64_obj)) {
   51612           0 :                 return NULL;
   51613             :         }
   51614             : 
   51615           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   51616           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   51617             :         }
   51618           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   51619           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   51620             :         }
   51621             : 
   51622           0 :         return py_netr_DsRGetDCNameEx2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   51623             : }
   51624             : 
   51625           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   51626             : {
   51627           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   51628           0 :         PyObject *bigendian_obj = NULL;
   51629           0 :         PyObject *ndr64_obj = NULL;
   51630           0 :         uint32_t ndr_push_flags = 0;
   51631             : 
   51632           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   51633             :                 discard_const_p(char *, kwnames),
   51634             :                 &bigendian_obj,
   51635             :                 &ndr64_obj)) {
   51636           0 :                 return NULL;
   51637             :         }
   51638             : 
   51639           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   51640           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   51641             :         }
   51642           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   51643           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   51644             :         }
   51645             : 
   51646           0 :         return py_netr_DsRGetDCNameEx2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   51647             : }
   51648             : 
   51649           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   51650             : {
   51651           0 :         const struct ndr_interface_call *call = NULL;
   51652           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(py_obj);
   51653           0 :         struct ndr_pull *pull = NULL;
   51654             :         enum ndr_err_code err;
   51655             : 
   51656           0 :         if (ndr_table_netlogon.num_calls < 35) {
   51657           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCNameEx2_ndr_unpack");
   51658           0 :                 return NULL;
   51659             :         }
   51660           0 :         call = &ndr_table_netlogon.calls[34];
   51661             : 
   51662           0 :         pull = ndr_pull_init_blob(blob, object);
   51663           0 :         if (pull == NULL) {
   51664           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   51665           0 :                 return NULL;
   51666             :         }
   51667             : 
   51668           0 :         pull->flags |= ndr_pull_flags;
   51669             : 
   51670           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   51671           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   51672           0 :                 TALLOC_FREE(pull);
   51673           0 :                 PyErr_SetNdrError(err);
   51674           0 :                 return NULL;
   51675             :         }
   51676           0 :         if (!allow_remaining) {
   51677             :                 uint32_t highest_ofs;
   51678             : 
   51679           0 :                 if (pull->offset > pull->relative_highest_offset) {
   51680           0 :                         highest_ofs = pull->offset;
   51681             :                 } else {
   51682           0 :                         highest_ofs = pull->relative_highest_offset;
   51683             :                 }
   51684           0 :                 if (highest_ofs < pull->data_size) {
   51685           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   51686             :                                 "not all bytes consumed ofs[%u] size[%u]",
   51687             :                                 highest_ofs, pull->data_size);
   51688           0 :                         TALLOC_FREE(pull);
   51689           0 :                         PyErr_SetNdrError(err);
   51690           0 :                         return NULL;
   51691             :                 }
   51692             :         }
   51693             : 
   51694           0 :         TALLOC_FREE(pull);
   51695           0 :         Py_RETURN_NONE;
   51696             : }
   51697             : 
   51698           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   51699             : {
   51700             :         DATA_BLOB blob;
   51701           0 :         Py_ssize_t blob_length = 0;
   51702           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   51703           0 :         PyObject *bigendian_obj = NULL;
   51704           0 :         PyObject *ndr64_obj = NULL;
   51705           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   51706           0 :         PyObject *allow_remaining_obj = NULL;
   51707           0 :         bool allow_remaining = false;
   51708             : 
   51709           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   51710             :                 discard_const_p(char *, kwnames),
   51711             :                 &blob.data, &blob_length,
   51712             :                 &bigendian_obj,
   51713             :                 &ndr64_obj,
   51714             :                 &allow_remaining_obj)) {
   51715           0 :                 return NULL;
   51716             :         }
   51717           0 :         blob.length = blob_length;
   51718             : 
   51719           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   51720           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   51721             :         }
   51722           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   51723           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   51724             :         }
   51725             : 
   51726           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   51727           0 :                 allow_remaining = true;
   51728             :         }
   51729             : 
   51730           0 :         return py_netr_DsRGetDCNameEx2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   51731             : }
   51732             : 
   51733           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   51734             : {
   51735             :         DATA_BLOB blob;
   51736           0 :         Py_ssize_t blob_length = 0;
   51737           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   51738           0 :         PyObject *bigendian_obj = NULL;
   51739           0 :         PyObject *ndr64_obj = NULL;
   51740           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   51741           0 :         PyObject *allow_remaining_obj = NULL;
   51742           0 :         bool allow_remaining = false;
   51743             : 
   51744           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   51745             :                 discard_const_p(char *, kwnames),
   51746             :                 &blob.data, &blob_length,
   51747             :                 &bigendian_obj,
   51748             :                 &ndr64_obj,
   51749             :                 &allow_remaining_obj)) {
   51750           0 :                 return NULL;
   51751             :         }
   51752           0 :         blob.length = blob_length;
   51753             : 
   51754           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   51755           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   51756             :         }
   51757           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   51758           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   51759             :         }
   51760             : 
   51761           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   51762           0 :                 allow_remaining = true;
   51763             :         }
   51764             : 
   51765           0 :         return py_netr_DsRGetDCNameEx2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   51766             : }
   51767             : 
   51768           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   51769             : {
   51770           0 :         const struct ndr_interface_call *call = NULL;
   51771           0 :         struct netr_DsRGetDCNameEx2 *object = (struct netr_DsRGetDCNameEx2 *)pytalloc_get_ptr(py_obj);
   51772             :         PyObject *ret;
   51773             :         char *retstr;
   51774             : 
   51775           0 :         if (ndr_table_netlogon.num_calls < 35) {
   51776           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetDCNameEx2_ndr_print");
   51777           0 :                 return NULL;
   51778             :         }
   51779           0 :         call = &ndr_table_netlogon.calls[34];
   51780             : 
   51781           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   51782           0 :         ret = PyUnicode_FromString(retstr);
   51783           0 :         TALLOC_FREE(retstr);
   51784             : 
   51785           0 :         return ret;
   51786             : }
   51787             : 
   51788           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   51789             : {
   51790           0 :         return py_netr_DsRGetDCNameEx2_ndr_print(py_obj, "netr_DsRGetDCNameEx2_in", NDR_IN);
   51791             : }
   51792             : 
   51793           0 : static PyObject *py_netr_DsRGetDCNameEx2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   51794             : {
   51795           0 :         return py_netr_DsRGetDCNameEx2_ndr_print(py_obj, "netr_DsRGetDCNameEx2_out", NDR_OUT);
   51796             : }
   51797             : 
   51798             : static PyMethodDef py_netr_DsRGetDCNameEx2_methods[] = {
   51799             :         { "opnum", (PyCFunction)py_netr_DsRGetDCNameEx2_ndr_opnum, METH_NOARGS|METH_CLASS,
   51800             :                 "netlogon.netr_DsRGetDCNameEx2.opnum() -> 34 (0x22) " },
   51801             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   51802             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   51803             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   51804             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   51805             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   51806             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   51807             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetDCNameEx2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   51808             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   51809             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsRGetDCNameEx2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   51810             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsRGetDCNameEx2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   51811             :         { NULL, NULL, 0, NULL }
   51812             : };
   51813             : 
   51814             : 
   51815             : static PyTypeObject netr_DsRGetDCNameEx2_Type = {
   51816             :         PyVarObject_HEAD_INIT(NULL, 0)
   51817             :         .tp_name = "netlogon.netr_DsRGetDCNameEx2",
   51818             :         .tp_getset = py_netr_DsRGetDCNameEx2_getsetters,
   51819             :         .tp_methods = py_netr_DsRGetDCNameEx2_methods,
   51820             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   51821             :         .tp_new = py_netr_DsRGetDCNameEx2_new,
   51822             : };
   51823             : 
   51824         133 : static bool pack_py_netr_DsRGetDCNameEx2_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRGetDCNameEx2 *r)
   51825             : {
   51826             :         PyObject *py_server_unc;
   51827             :         PyObject *py_client_account;
   51828             :         PyObject *py_mask;
   51829             :         PyObject *py_domain_name;
   51830             :         PyObject *py_domain_guid;
   51831             :         PyObject *py_site_name;
   51832             :         PyObject *py_flags;
   51833         133 :         const char *kwnames[] = {
   51834             :                 "server_unc", "client_account", "mask", "domain_name", "domain_guid", "site_name", "flags", NULL
   51835             :         };
   51836             : 
   51837         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)) {
   51838           0 :                 return false;
   51839             :         }
   51840             : 
   51841         133 :         if (py_server_unc == NULL) {
   51842           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_unc");
   51843           0 :                 return false;
   51844             :         }
   51845         133 :         if (py_server_unc == Py_None) {
   51846           0 :                 r->in.server_unc = NULL;
   51847             :         } else {
   51848         133 :                 r->in.server_unc = NULL;
   51849             :                 {
   51850             :                         const char *test_str;
   51851             :                         const char *talloc_str;
   51852         133 :                         PyObject *unicode = NULL;
   51853         133 :                         if (PyUnicode_Check(py_server_unc)) {
   51854         133 :                                 unicode = PyUnicode_AsEncodedString(py_server_unc, "utf-8", "ignore");
   51855         133 :                                 if (unicode == NULL) {
   51856           0 :                                         PyErr_NoMemory();
   51857           0 :                                         return false;
   51858             :                                 }
   51859         133 :                                 test_str = PyBytes_AS_STRING(unicode);
   51860           0 :                         } else if (PyBytes_Check(py_server_unc)) {
   51861           0 :                                 test_str = PyBytes_AS_STRING(py_server_unc);
   51862             :                         } else {
   51863           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_unc)->tp_name);
   51864           0 :                                 return false;
   51865             :                         }
   51866         133 :                         talloc_str = talloc_strdup(r, test_str);
   51867         133 :                         if (unicode != NULL) {
   51868         133 :                                 Py_DECREF(unicode);
   51869             :                         }
   51870         133 :                         if (talloc_str == NULL) {
   51871           0 :                                 PyErr_NoMemory();
   51872           0 :                                 return false;
   51873             :                         }
   51874         133 :                         r->in.server_unc = talloc_str;
   51875             :                 }
   51876             :         }
   51877         133 :         if (py_client_account == NULL) {
   51878           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.client_account");
   51879           0 :                 return false;
   51880             :         }
   51881         133 :         if (py_client_account == Py_None) {
   51882         133 :                 r->in.client_account = NULL;
   51883             :         } else {
   51884           0 :                 r->in.client_account = NULL;
   51885             :                 {
   51886             :                         const char *test_str;
   51887             :                         const char *talloc_str;
   51888           0 :                         PyObject *unicode = NULL;
   51889           0 :                         if (PyUnicode_Check(py_client_account)) {
   51890           0 :                                 unicode = PyUnicode_AsEncodedString(py_client_account, "utf-8", "ignore");
   51891           0 :                                 if (unicode == NULL) {
   51892           0 :                                         PyErr_NoMemory();
   51893           0 :                                         return false;
   51894             :                                 }
   51895           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   51896           0 :                         } else if (PyBytes_Check(py_client_account)) {
   51897           0 :                                 test_str = PyBytes_AS_STRING(py_client_account);
   51898             :                         } else {
   51899           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_client_account)->tp_name);
   51900           0 :                                 return false;
   51901             :                         }
   51902           0 :                         talloc_str = talloc_strdup(r, test_str);
   51903           0 :                         if (unicode != NULL) {
   51904           0 :                                 Py_DECREF(unicode);
   51905             :                         }
   51906           0 :                         if (talloc_str == NULL) {
   51907           0 :                                 PyErr_NoMemory();
   51908           0 :                                 return false;
   51909             :                         }
   51910           0 :                         r->in.client_account = talloc_str;
   51911             :                 }
   51912             :         }
   51913         133 :         if (py_mask == NULL) {
   51914           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.mask");
   51915           0 :                 return false;
   51916             :         }
   51917             :         {
   51918         133 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.mask));
   51919         133 :                 if (PyLong_Check(py_mask)) {
   51920             :                         unsigned long long test_var;
   51921         133 :                         test_var = PyLong_AsUnsignedLongLong(py_mask);
   51922         133 :                         if (PyErr_Occurred() != NULL) {
   51923           0 :                                 return false;
   51924             :                         }
   51925         133 :                         if (test_var > uint_max) {
   51926           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   51927             :                                   PyLong_Type.tp_name, uint_max, test_var);
   51928           0 :                                 return false;
   51929             :                         }
   51930         133 :                         r->in.mask = test_var;
   51931             :                 } else {
   51932           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   51933             :                           PyLong_Type.tp_name);
   51934           0 :                         return false;
   51935             :                 }
   51936             :         }
   51937         133 :         if (py_domain_name == NULL) {
   51938           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_name");
   51939           0 :                 return false;
   51940             :         }
   51941         133 :         if (py_domain_name == Py_None) {
   51942         121 :                 r->in.domain_name = NULL;
   51943             :         } else {
   51944          12 :                 r->in.domain_name = NULL;
   51945             :                 {
   51946             :                         const char *test_str;
   51947             :                         const char *talloc_str;
   51948          12 :                         PyObject *unicode = NULL;
   51949          12 :                         if (PyUnicode_Check(py_domain_name)) {
   51950          12 :                                 unicode = PyUnicode_AsEncodedString(py_domain_name, "utf-8", "ignore");
   51951          12 :                                 if (unicode == NULL) {
   51952           0 :                                         PyErr_NoMemory();
   51953           0 :                                         return false;
   51954             :                                 }
   51955          12 :                                 test_str = PyBytes_AS_STRING(unicode);
   51956           0 :                         } else if (PyBytes_Check(py_domain_name)) {
   51957           0 :                                 test_str = PyBytes_AS_STRING(py_domain_name);
   51958             :                         } else {
   51959           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain_name)->tp_name);
   51960           0 :                                 return false;
   51961             :                         }
   51962          12 :                         talloc_str = talloc_strdup(r, test_str);
   51963          12 :                         if (unicode != NULL) {
   51964          12 :                                 Py_DECREF(unicode);
   51965             :                         }
   51966          12 :                         if (talloc_str == NULL) {
   51967           0 :                                 PyErr_NoMemory();
   51968           0 :                                 return false;
   51969             :                         }
   51970          12 :                         r->in.domain_name = talloc_str;
   51971             :                 }
   51972             :         }
   51973         133 :         if (py_domain_guid == NULL) {
   51974           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_guid");
   51975           0 :                 return false;
   51976             :         }
   51977         133 :         if (py_domain_guid == Py_None) {
   51978         133 :                 r->in.domain_guid = NULL;
   51979             :         } else {
   51980           0 :                 r->in.domain_guid = NULL;
   51981           0 :                 PY_CHECK_TYPE(GUID_Type, py_domain_guid, return false;);
   51982           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_domain_guid)) == NULL) {
   51983           0 :                         PyErr_NoMemory();
   51984           0 :                         return false;
   51985             :                 }
   51986           0 :                 r->in.domain_guid = (struct GUID *)pytalloc_get_ptr(py_domain_guid);
   51987             :         }
   51988         133 :         if (py_site_name == NULL) {
   51989           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.site_name");
   51990           0 :                 return false;
   51991             :         }
   51992         133 :         if (py_site_name == Py_None) {
   51993         129 :                 r->in.site_name = NULL;
   51994             :         } else {
   51995           4 :                 r->in.site_name = NULL;
   51996             :                 {
   51997             :                         const char *test_str;
   51998             :                         const char *talloc_str;
   51999           4 :                         PyObject *unicode = NULL;
   52000           4 :                         if (PyUnicode_Check(py_site_name)) {
   52001           4 :                                 unicode = PyUnicode_AsEncodedString(py_site_name, "utf-8", "ignore");
   52002           4 :                                 if (unicode == NULL) {
   52003           0 :                                         PyErr_NoMemory();
   52004           0 :                                         return false;
   52005             :                                 }
   52006           4 :                                 test_str = PyBytes_AS_STRING(unicode);
   52007           0 :                         } else if (PyBytes_Check(py_site_name)) {
   52008           0 :                                 test_str = PyBytes_AS_STRING(py_site_name);
   52009             :                         } else {
   52010           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_site_name)->tp_name);
   52011           0 :                                 return false;
   52012             :                         }
   52013           4 :                         talloc_str = talloc_strdup(r, test_str);
   52014           4 :                         if (unicode != NULL) {
   52015           4 :                                 Py_DECREF(unicode);
   52016             :                         }
   52017           4 :                         if (talloc_str == NULL) {
   52018           0 :                                 PyErr_NoMemory();
   52019           0 :                                 return false;
   52020             :                         }
   52021           4 :                         r->in.site_name = talloc_str;
   52022             :                 }
   52023             :         }
   52024         133 :         if (py_flags == NULL) {
   52025           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   52026           0 :                 return false;
   52027             :         }
   52028             :         {
   52029         133 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   52030         133 :                 if (PyLong_Check(py_flags)) {
   52031             :                         unsigned long long test_var;
   52032         133 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   52033         133 :                         if (PyErr_Occurred() != NULL) {
   52034           0 :                                 return false;
   52035             :                         }
   52036         133 :                         if (test_var > uint_max) {
   52037           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   52038             :                                   PyLong_Type.tp_name, uint_max, test_var);
   52039           0 :                                 return false;
   52040             :                         }
   52041         133 :                         r->in.flags = test_var;
   52042             :                 } else {
   52043           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   52044             :                           PyLong_Type.tp_name);
   52045           0 :                         return false;
   52046             :                 }
   52047             :         }
   52048         133 :         return true;
   52049             : }
   52050             : 
   52051         133 : static PyObject *unpack_py_netr_DsRGetDCNameEx2_args_out(struct netr_DsRGetDCNameEx2 *r)
   52052             : {
   52053             :         PyObject *result;
   52054             :         PyObject *py_info;
   52055         133 :         if (*r->out.info == NULL) {
   52056           0 :                 py_info = Py_None;
   52057           0 :                 Py_INCREF(py_info);
   52058             :         } else {
   52059         133 :                 py_info = pytalloc_reference_ex(&netr_DsRGetDCNameInfo_Type, *r->out.info, *r->out.info);
   52060             :         }
   52061         133 :         result = py_info;
   52062         133 :         if (!W_ERROR_IS_OK(r->out.result)) {
   52063           4 :                 PyErr_SetWERROR(r->out.result);
   52064           4 :                 return NULL;
   52065             :         }
   52066             : 
   52067         127 :         return result;
   52068             : }
   52069             : 
   52070             : 
   52071           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_in_get_server_name(PyObject *obj, void *closure)
   52072             : {
   52073           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = (struct netr_NetrEnumerateTrustedDomainsEx *)pytalloc_get_ptr(obj);
   52074             :         PyObject *py_server_name;
   52075           0 :         if (object->in.server_name == NULL) {
   52076           0 :                 Py_RETURN_NONE;
   52077             :         }
   52078           0 :         if (object->in.server_name == NULL) {
   52079           0 :                 py_server_name = Py_None;
   52080           0 :                 Py_INCREF(py_server_name);
   52081             :         } else {
   52082           0 :                 if (object->in.server_name == NULL) {
   52083           0 :                         py_server_name = Py_None;
   52084           0 :                         Py_INCREF(py_server_name);
   52085             :                 } else {
   52086           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   52087             :                 }
   52088             :         }
   52089           0 :         return py_server_name;
   52090             : }
   52091             : 
   52092           0 : static int py_netr_NetrEnumerateTrustedDomainsEx_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   52093             : {
   52094           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = (struct netr_NetrEnumerateTrustedDomainsEx *)pytalloc_get_ptr(py_obj);
   52095           0 :         if (value == NULL) {
   52096           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   52097           0 :                 return -1;
   52098             :         }
   52099           0 :         if (value == Py_None) {
   52100           0 :                 object->in.server_name = NULL;
   52101             :         } else {
   52102           0 :                 object->in.server_name = NULL;
   52103             :                 {
   52104             :                         const char *test_str;
   52105             :                         const char *talloc_str;
   52106           0 :                         PyObject *unicode = NULL;
   52107           0 :                         if (PyUnicode_Check(value)) {
   52108           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   52109           0 :                                 if (unicode == NULL) {
   52110           0 :                                         PyErr_NoMemory();
   52111           0 :                                         return -1;
   52112             :                                 }
   52113           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   52114           0 :                         } else if (PyBytes_Check(value)) {
   52115           0 :                                 test_str = PyBytes_AS_STRING(value);
   52116             :                         } else {
   52117           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   52118           0 :                                 return -1;
   52119             :                         }
   52120           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   52121           0 :                         if (unicode != NULL) {
   52122           0 :                                 Py_DECREF(unicode);
   52123             :                         }
   52124           0 :                         if (talloc_str == NULL) {
   52125           0 :                                 PyErr_NoMemory();
   52126           0 :                                 return -1;
   52127             :                         }
   52128           0 :                         object->in.server_name = talloc_str;
   52129             :                 }
   52130             :         }
   52131           0 :         return 0;
   52132             : }
   52133             : 
   52134           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_out_get_dom_trust_list(PyObject *obj, void *closure)
   52135             : {
   52136           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = (struct netr_NetrEnumerateTrustedDomainsEx *)pytalloc_get_ptr(obj);
   52137             :         PyObject *py_dom_trust_list;
   52138           0 :         if (object->out.dom_trust_list == NULL) {
   52139           0 :                 Py_RETURN_NONE;
   52140             :         }
   52141           0 :         py_dom_trust_list = pytalloc_reference_ex(&netr_DomainTrustList_Type, object->out.dom_trust_list, object->out.dom_trust_list);
   52142           0 :         return py_dom_trust_list;
   52143             : }
   52144             : 
   52145           0 : static int py_netr_NetrEnumerateTrustedDomainsEx_out_set_dom_trust_list(PyObject *py_obj, PyObject *value, void *closure)
   52146             : {
   52147           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = (struct netr_NetrEnumerateTrustedDomainsEx *)pytalloc_get_ptr(py_obj);
   52148           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.dom_trust_list));
   52149           0 :         if (value == NULL) {
   52150           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.dom_trust_list");
   52151           0 :                 return -1;
   52152             :         }
   52153           0 :         object->out.dom_trust_list = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.dom_trust_list);
   52154           0 :         if (object->out.dom_trust_list == NULL) {
   52155           0 :                 PyErr_NoMemory();
   52156           0 :                 return -1;
   52157             :         }
   52158           0 :         PY_CHECK_TYPE(&netr_DomainTrustList_Type, value, return -1;);
   52159           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   52160           0 :                 PyErr_NoMemory();
   52161           0 :                 return -1;
   52162             :         }
   52163           0 :         object->out.dom_trust_list = (struct netr_DomainTrustList *)pytalloc_get_ptr(value);
   52164           0 :         return 0;
   52165             : }
   52166             : 
   52167           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_get_result(PyObject *obj, void *closure)
   52168             : {
   52169           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = (struct netr_NetrEnumerateTrustedDomainsEx *)pytalloc_get_ptr(obj);
   52170             :         PyObject *py_result;
   52171           0 :         py_result = PyErr_FromWERROR(object->out.result);
   52172           0 :         return py_result;
   52173             : }
   52174             : 
   52175           0 : static int py_netr_NetrEnumerateTrustedDomainsEx_set_result(PyObject *py_obj, PyObject *value, void *closure)
   52176             : {
   52177           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = (struct netr_NetrEnumerateTrustedDomainsEx *)pytalloc_get_ptr(py_obj);
   52178           0 :         if (value == NULL) {
   52179           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   52180           0 :                 return -1;
   52181             :         }
   52182           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   52183           0 :         return 0;
   52184             : }
   52185             : 
   52186             : static PyGetSetDef py_netr_NetrEnumerateTrustedDomainsEx_getsetters[] = {
   52187             :         {
   52188             :                 .name = discard_const_p(char, "in_server_name"),
   52189             :                 .get = py_netr_NetrEnumerateTrustedDomainsEx_in_get_server_name,
   52190             :                 .set = py_netr_NetrEnumerateTrustedDomainsEx_in_set_server_name,
   52191             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   52192             :         },
   52193             :         {
   52194             :                 .name = discard_const_p(char, "out_dom_trust_list"),
   52195             :                 .get = py_netr_NetrEnumerateTrustedDomainsEx_out_get_dom_trust_list,
   52196             :                 .set = py_netr_NetrEnumerateTrustedDomainsEx_out_set_dom_trust_list,
   52197             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DomainTrustList")
   52198             :         },
   52199             :         {
   52200             :                 .name = discard_const_p(char, "result"),
   52201             :                 .get = py_netr_NetrEnumerateTrustedDomainsEx_get_result,
   52202             :                 .set = py_netr_NetrEnumerateTrustedDomainsEx_set_result,
   52203             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   52204             :         },
   52205             :         { .name = NULL }
   52206             : };
   52207             : 
   52208           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   52209             : {
   52210           0 :         PyObject *self = pytalloc_new(struct netr_NetrEnumerateTrustedDomainsEx, type);
   52211           0 :         struct netr_NetrEnumerateTrustedDomainsEx *_self = (struct netr_NetrEnumerateTrustedDomainsEx *)pytalloc_get_ptr(self);
   52212           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   52213           0 :         _self->out.dom_trust_list = talloc_zero(mem_ctx, struct netr_DomainTrustList);
   52214           0 :         return self;
   52215             : }
   52216             : 
   52217           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   52218             : {
   52219             : 
   52220             : 
   52221           0 :         return PyLong_FromLong(36);
   52222             : }
   52223             : 
   52224           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   52225             : {
   52226           0 :         const struct ndr_interface_call *call = NULL;
   52227           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = (struct netr_NetrEnumerateTrustedDomainsEx *)pytalloc_get_ptr(py_obj);
   52228           0 :         PyObject *ret = NULL;
   52229           0 :         struct ndr_push *push = NULL;
   52230             :         DATA_BLOB blob;
   52231             :         enum ndr_err_code err;
   52232             : 
   52233           0 :         if (ndr_table_netlogon.num_calls < 37) {
   52234           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack");
   52235           0 :                 return NULL;
   52236             :         }
   52237           0 :         call = &ndr_table_netlogon.calls[36];
   52238             : 
   52239           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   52240           0 :         if (push == NULL) {
   52241           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   52242           0 :                 return NULL;
   52243             :         }
   52244             : 
   52245           0 :         push->flags |= ndr_push_flags;
   52246             : 
   52247           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   52248           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   52249           0 :                 TALLOC_FREE(push);
   52250           0 :                 PyErr_SetNdrError(err);
   52251           0 :                 return NULL;
   52252             :         }
   52253           0 :         blob = ndr_push_blob(push);
   52254           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   52255           0 :         TALLOC_FREE(push);
   52256           0 :         return ret;
   52257             : }
   52258             : 
   52259           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52260             : {
   52261           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   52262           0 :         PyObject *bigendian_obj = NULL;
   52263           0 :         PyObject *ndr64_obj = NULL;
   52264           0 :         uint32_t ndr_push_flags = 0;
   52265             : 
   52266           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   52267             :                 discard_const_p(char *, kwnames),
   52268             :                 &bigendian_obj,
   52269             :                 &ndr64_obj)) {
   52270           0 :                 return NULL;
   52271             :         }
   52272             : 
   52273           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52274           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   52275             :         }
   52276           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52277           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   52278             :         }
   52279             : 
   52280           0 :         return py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   52281             : }
   52282             : 
   52283           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52284             : {
   52285           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   52286           0 :         PyObject *bigendian_obj = NULL;
   52287           0 :         PyObject *ndr64_obj = NULL;
   52288           0 :         uint32_t ndr_push_flags = 0;
   52289             : 
   52290           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   52291             :                 discard_const_p(char *, kwnames),
   52292             :                 &bigendian_obj,
   52293             :                 &ndr64_obj)) {
   52294           0 :                 return NULL;
   52295             :         }
   52296             : 
   52297           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52298           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   52299             :         }
   52300           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52301           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   52302             :         }
   52303             : 
   52304           0 :         return py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   52305             : }
   52306             : 
   52307           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   52308             : {
   52309           0 :         const struct ndr_interface_call *call = NULL;
   52310           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = (struct netr_NetrEnumerateTrustedDomainsEx *)pytalloc_get_ptr(py_obj);
   52311           0 :         struct ndr_pull *pull = NULL;
   52312             :         enum ndr_err_code err;
   52313             : 
   52314           0 :         if (ndr_table_netlogon.num_calls < 37) {
   52315           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack");
   52316           0 :                 return NULL;
   52317             :         }
   52318           0 :         call = &ndr_table_netlogon.calls[36];
   52319             : 
   52320           0 :         pull = ndr_pull_init_blob(blob, object);
   52321           0 :         if (pull == NULL) {
   52322           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   52323           0 :                 return NULL;
   52324             :         }
   52325             : 
   52326           0 :         pull->flags |= ndr_pull_flags;
   52327             : 
   52328           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   52329           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   52330           0 :                 TALLOC_FREE(pull);
   52331           0 :                 PyErr_SetNdrError(err);
   52332           0 :                 return NULL;
   52333             :         }
   52334           0 :         if (!allow_remaining) {
   52335             :                 uint32_t highest_ofs;
   52336             : 
   52337           0 :                 if (pull->offset > pull->relative_highest_offset) {
   52338           0 :                         highest_ofs = pull->offset;
   52339             :                 } else {
   52340           0 :                         highest_ofs = pull->relative_highest_offset;
   52341             :                 }
   52342           0 :                 if (highest_ofs < pull->data_size) {
   52343           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   52344             :                                 "not all bytes consumed ofs[%u] size[%u]",
   52345             :                                 highest_ofs, pull->data_size);
   52346           0 :                         TALLOC_FREE(pull);
   52347           0 :                         PyErr_SetNdrError(err);
   52348           0 :                         return NULL;
   52349             :                 }
   52350             :         }
   52351             : 
   52352           0 :         TALLOC_FREE(pull);
   52353           0 :         Py_RETURN_NONE;
   52354             : }
   52355             : 
   52356           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52357             : {
   52358             :         DATA_BLOB blob;
   52359           0 :         Py_ssize_t blob_length = 0;
   52360           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   52361           0 :         PyObject *bigendian_obj = NULL;
   52362           0 :         PyObject *ndr64_obj = NULL;
   52363           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   52364           0 :         PyObject *allow_remaining_obj = NULL;
   52365           0 :         bool allow_remaining = false;
   52366             : 
   52367           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   52368             :                 discard_const_p(char *, kwnames),
   52369             :                 &blob.data, &blob_length,
   52370             :                 &bigendian_obj,
   52371             :                 &ndr64_obj,
   52372             :                 &allow_remaining_obj)) {
   52373           0 :                 return NULL;
   52374             :         }
   52375           0 :         blob.length = blob_length;
   52376             : 
   52377           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52378           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   52379             :         }
   52380           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52381           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   52382             :         }
   52383             : 
   52384           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   52385           0 :                 allow_remaining = true;
   52386             :         }
   52387             : 
   52388           0 :         return py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   52389             : }
   52390             : 
   52391           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52392             : {
   52393             :         DATA_BLOB blob;
   52394           0 :         Py_ssize_t blob_length = 0;
   52395           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   52396           0 :         PyObject *bigendian_obj = NULL;
   52397           0 :         PyObject *ndr64_obj = NULL;
   52398           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   52399           0 :         PyObject *allow_remaining_obj = NULL;
   52400           0 :         bool allow_remaining = false;
   52401             : 
   52402           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   52403             :                 discard_const_p(char *, kwnames),
   52404             :                 &blob.data, &blob_length,
   52405             :                 &bigendian_obj,
   52406             :                 &ndr64_obj,
   52407             :                 &allow_remaining_obj)) {
   52408           0 :                 return NULL;
   52409             :         }
   52410           0 :         blob.length = blob_length;
   52411             : 
   52412           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52413           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   52414             :         }
   52415           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52416           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   52417             :         }
   52418             : 
   52419           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   52420           0 :                 allow_remaining = true;
   52421             :         }
   52422             : 
   52423           0 :         return py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   52424             : }
   52425             : 
   52426           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   52427             : {
   52428           0 :         const struct ndr_interface_call *call = NULL;
   52429           0 :         struct netr_NetrEnumerateTrustedDomainsEx *object = (struct netr_NetrEnumerateTrustedDomainsEx *)pytalloc_get_ptr(py_obj);
   52430             :         PyObject *ret;
   52431             :         char *retstr;
   52432             : 
   52433           0 :         if (ndr_table_netlogon.num_calls < 37) {
   52434           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_NetrEnumerateTrustedDomainsEx_ndr_print");
   52435           0 :                 return NULL;
   52436             :         }
   52437           0 :         call = &ndr_table_netlogon.calls[36];
   52438             : 
   52439           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   52440           0 :         ret = PyUnicode_FromString(retstr);
   52441           0 :         TALLOC_FREE(retstr);
   52442             : 
   52443           0 :         return ret;
   52444             : }
   52445             : 
   52446           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   52447             : {
   52448           0 :         return py_netr_NetrEnumerateTrustedDomainsEx_ndr_print(py_obj, "netr_NetrEnumerateTrustedDomainsEx_in", NDR_IN);
   52449             : }
   52450             : 
   52451           0 : static PyObject *py_netr_NetrEnumerateTrustedDomainsEx_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   52452             : {
   52453           0 :         return py_netr_NetrEnumerateTrustedDomainsEx_ndr_print(py_obj, "netr_NetrEnumerateTrustedDomainsEx_out", NDR_OUT);
   52454             : }
   52455             : 
   52456             : static PyMethodDef py_netr_NetrEnumerateTrustedDomainsEx_methods[] = {
   52457             :         { "opnum", (PyCFunction)py_netr_NetrEnumerateTrustedDomainsEx_ndr_opnum, METH_NOARGS|METH_CLASS,
   52458             :                 "netlogon.netr_NetrEnumerateTrustedDomainsEx.opnum() -> 36 (0x24) " },
   52459             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   52460             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   52461             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomainsEx_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   52462             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   52463             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   52464             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   52465             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_NetrEnumerateTrustedDomainsEx_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   52466             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   52467             :         { "__ndr_print_in__", (PyCFunction)py_netr_NetrEnumerateTrustedDomainsEx_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   52468             :         { "__ndr_print_out__", (PyCFunction)py_netr_NetrEnumerateTrustedDomainsEx_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   52469             :         { NULL, NULL, 0, NULL }
   52470             : };
   52471             : 
   52472             : 
   52473             : static PyTypeObject netr_NetrEnumerateTrustedDomainsEx_Type = {
   52474             :         PyVarObject_HEAD_INIT(NULL, 0)
   52475             :         .tp_name = "netlogon.netr_NetrEnumerateTrustedDomainsEx",
   52476             :         .tp_getset = py_netr_NetrEnumerateTrustedDomainsEx_getsetters,
   52477             :         .tp_methods = py_netr_NetrEnumerateTrustedDomainsEx_methods,
   52478             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   52479             :         .tp_new = py_netr_NetrEnumerateTrustedDomainsEx_new,
   52480             : };
   52481             : 
   52482           0 : static bool pack_py_netr_NetrEnumerateTrustedDomainsEx_args_in(PyObject *args, PyObject *kwargs, struct netr_NetrEnumerateTrustedDomainsEx *r)
   52483             : {
   52484             :         PyObject *py_server_name;
   52485           0 :         const char *kwnames[] = {
   52486             :                 "server_name", NULL
   52487             :         };
   52488             : 
   52489           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:netr_NetrEnumerateTrustedDomainsEx", discard_const_p(char *, kwnames), &py_server_name)) {
   52490           0 :                 return false;
   52491             :         }
   52492             : 
   52493           0 :         if (py_server_name == NULL) {
   52494           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   52495           0 :                 return false;
   52496             :         }
   52497           0 :         if (py_server_name == Py_None) {
   52498           0 :                 r->in.server_name = NULL;
   52499             :         } else {
   52500           0 :                 r->in.server_name = NULL;
   52501             :                 {
   52502             :                         const char *test_str;
   52503             :                         const char *talloc_str;
   52504           0 :                         PyObject *unicode = NULL;
   52505           0 :                         if (PyUnicode_Check(py_server_name)) {
   52506           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   52507           0 :                                 if (unicode == NULL) {
   52508           0 :                                         PyErr_NoMemory();
   52509           0 :                                         return false;
   52510             :                                 }
   52511           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   52512           0 :                         } else if (PyBytes_Check(py_server_name)) {
   52513           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   52514             :                         } else {
   52515           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   52516           0 :                                 return false;
   52517             :                         }
   52518           0 :                         talloc_str = talloc_strdup(r, test_str);
   52519           0 :                         if (unicode != NULL) {
   52520           0 :                                 Py_DECREF(unicode);
   52521             :                         }
   52522           0 :                         if (talloc_str == NULL) {
   52523           0 :                                 PyErr_NoMemory();
   52524           0 :                                 return false;
   52525             :                         }
   52526           0 :                         r->in.server_name = talloc_str;
   52527             :                 }
   52528             :         }
   52529           0 :         return true;
   52530             : }
   52531             : 
   52532           0 : static PyObject *unpack_py_netr_NetrEnumerateTrustedDomainsEx_args_out(struct netr_NetrEnumerateTrustedDomainsEx *r)
   52533             : {
   52534             :         PyObject *result;
   52535             :         PyObject *py_dom_trust_list;
   52536           0 :         py_dom_trust_list = pytalloc_reference_ex(&netr_DomainTrustList_Type, r->out.dom_trust_list, r->out.dom_trust_list);
   52537           0 :         result = py_dom_trust_list;
   52538           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   52539           0 :                 PyErr_SetWERROR(r->out.result);
   52540           0 :                 return NULL;
   52541             :         }
   52542             : 
   52543           0 :         return result;
   52544             : }
   52545             : 
   52546             : 
   52547           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_in_get_server_name(PyObject *obj, void *closure)
   52548             : {
   52549           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(obj);
   52550             :         PyObject *py_server_name;
   52551           0 :         if (object->in.server_name == NULL) {
   52552           0 :                 Py_RETURN_NONE;
   52553             :         }
   52554           0 :         if (object->in.server_name == NULL) {
   52555           0 :                 py_server_name = Py_None;
   52556           0 :                 Py_INCREF(py_server_name);
   52557             :         } else {
   52558           0 :                 if (object->in.server_name == NULL) {
   52559           0 :                         py_server_name = Py_None;
   52560           0 :                         Py_INCREF(py_server_name);
   52561             :                 } else {
   52562           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   52563             :                 }
   52564             :         }
   52565           0 :         return py_server_name;
   52566             : }
   52567             : 
   52568           0 : static int py_netr_DsRAddressToSitenamesExW_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   52569             : {
   52570           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(py_obj);
   52571           0 :         if (value == NULL) {
   52572           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   52573           0 :                 return -1;
   52574             :         }
   52575           0 :         if (value == Py_None) {
   52576           0 :                 object->in.server_name = NULL;
   52577             :         } else {
   52578           0 :                 object->in.server_name = NULL;
   52579             :                 {
   52580             :                         const char *test_str;
   52581             :                         const char *talloc_str;
   52582           0 :                         PyObject *unicode = NULL;
   52583           0 :                         if (PyUnicode_Check(value)) {
   52584           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   52585           0 :                                 if (unicode == NULL) {
   52586           0 :                                         PyErr_NoMemory();
   52587           0 :                                         return -1;
   52588             :                                 }
   52589           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   52590           0 :                         } else if (PyBytes_Check(value)) {
   52591           0 :                                 test_str = PyBytes_AS_STRING(value);
   52592             :                         } else {
   52593           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   52594           0 :                                 return -1;
   52595             :                         }
   52596           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   52597           0 :                         if (unicode != NULL) {
   52598           0 :                                 Py_DECREF(unicode);
   52599             :                         }
   52600           0 :                         if (talloc_str == NULL) {
   52601           0 :                                 PyErr_NoMemory();
   52602           0 :                                 return -1;
   52603             :                         }
   52604           0 :                         object->in.server_name = talloc_str;
   52605             :                 }
   52606             :         }
   52607           0 :         return 0;
   52608             : }
   52609             : 
   52610           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_in_get_count(PyObject *obj, void *closure)
   52611             : {
   52612           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(obj);
   52613             :         PyObject *py_count;
   52614           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)object->in.count);
   52615           0 :         return py_count;
   52616             : }
   52617             : 
   52618           0 : static int py_netr_DsRAddressToSitenamesExW_in_set_count(PyObject *py_obj, PyObject *value, void *closure)
   52619             : {
   52620           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(py_obj);
   52621           0 :         if (value == NULL) {
   52622           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.count");
   52623           0 :                 return -1;
   52624             :         }
   52625             :         {
   52626           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.count));
   52627           0 :                 if (PyLong_Check(value)) {
   52628             :                         unsigned long long test_var;
   52629           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   52630           0 :                         if (PyErr_Occurred() != NULL) {
   52631           0 :                                 return -1;
   52632             :                         }
   52633           0 :                         if (test_var > uint_max) {
   52634           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   52635             :                                   PyLong_Type.tp_name, uint_max, test_var);
   52636           0 :                                 return -1;
   52637             :                         }
   52638           0 :                         object->in.count = test_var;
   52639             :                 } else {
   52640           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   52641             :                           PyLong_Type.tp_name);
   52642           0 :                         return -1;
   52643             :                 }
   52644             :         }
   52645           0 :         return 0;
   52646             : }
   52647             : 
   52648           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_in_get_addresses(PyObject *obj, void *closure)
   52649             : {
   52650           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(obj);
   52651             :         PyObject *py_addresses;
   52652           0 :         if (object->in.addresses == NULL) {
   52653           0 :                 Py_RETURN_NONE;
   52654             :         }
   52655           0 :         py_addresses = PyList_New(object->in.count);
   52656           0 :         if (py_addresses == NULL) {
   52657           0 :                 return NULL;
   52658             :         }
   52659             :         {
   52660             :                 int addresses_cntr_1;
   52661           0 :                 for (addresses_cntr_1 = 0; addresses_cntr_1 < (object->in.count); addresses_cntr_1++) {
   52662             :                         PyObject *py_addresses_1;
   52663           0 :                         py_addresses_1 = pytalloc_reference_ex(&netr_DsRAddress_Type, object->in.addresses, &object->in.addresses[addresses_cntr_1]);
   52664           0 :                         PyList_SetItem(py_addresses, addresses_cntr_1, py_addresses_1);
   52665             :                 }
   52666             :         }
   52667           0 :         return py_addresses;
   52668             : }
   52669             : 
   52670           0 : static int py_netr_DsRAddressToSitenamesExW_in_set_addresses(PyObject *py_obj, PyObject *value, void *closure)
   52671             : {
   52672           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(py_obj);
   52673           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.addresses));
   52674           0 :         if (value == NULL) {
   52675           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.addresses");
   52676           0 :                 return -1;
   52677             :         }
   52678           0 :         object->in.addresses = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.addresses);
   52679           0 :         if (object->in.addresses == NULL) {
   52680           0 :                 PyErr_NoMemory();
   52681           0 :                 return -1;
   52682             :         }
   52683           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   52684             :         {
   52685             :                 int addresses_cntr_1;
   52686           0 :                 object->in.addresses = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.addresses, PyList_GET_SIZE(value));
   52687           0 :                 if (!object->in.addresses) { return -1;; }
   52688           0 :                 talloc_set_name_const(object->in.addresses, "ARRAY: object->in.addresses");
   52689           0 :                 for (addresses_cntr_1 = 0; addresses_cntr_1 < PyList_GET_SIZE(value); addresses_cntr_1++) {
   52690           0 :                         if (PyList_GET_ITEM(value, addresses_cntr_1) == NULL) {
   52691           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.addresses[addresses_cntr_1]");
   52692           0 :                                 return -1;
   52693             :                         }
   52694           0 :                         PY_CHECK_TYPE(&netr_DsRAddress_Type, PyList_GET_ITEM(value, addresses_cntr_1), return -1;);
   52695           0 :                         if (talloc_reference(object->in.addresses, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, addresses_cntr_1))) == NULL) {
   52696           0 :                                 PyErr_NoMemory();
   52697           0 :                                 return -1;
   52698             :                         }
   52699           0 :                         object->in.addresses[addresses_cntr_1] = *(struct netr_DsRAddress *)pytalloc_get_ptr(PyList_GET_ITEM(value, addresses_cntr_1));
   52700             :                 }
   52701             :         }
   52702           0 :         return 0;
   52703             : }
   52704             : 
   52705           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_out_get_ctr(PyObject *obj, void *closure)
   52706             : {
   52707           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(obj);
   52708             :         PyObject *py_ctr;
   52709           0 :         if (object->out.ctr == NULL) {
   52710           0 :                 Py_RETURN_NONE;
   52711             :         }
   52712           0 :         if (*object->out.ctr == NULL) {
   52713           0 :                 py_ctr = Py_None;
   52714           0 :                 Py_INCREF(py_ctr);
   52715             :         } else {
   52716           0 :                 py_ctr = pytalloc_reference_ex(&netr_DsRAddressToSitenamesExWCtr_Type, *object->out.ctr, *object->out.ctr);
   52717             :         }
   52718           0 :         return py_ctr;
   52719             : }
   52720             : 
   52721           0 : static int py_netr_DsRAddressToSitenamesExW_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
   52722             : {
   52723           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(py_obj);
   52724           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
   52725           0 :         if (value == NULL) {
   52726           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ctr");
   52727           0 :                 return -1;
   52728             :         }
   52729           0 :         object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
   52730           0 :         if (object->out.ctr == NULL) {
   52731           0 :                 PyErr_NoMemory();
   52732           0 :                 return -1;
   52733             :         }
   52734           0 :         if (value == Py_None) {
   52735           0 :                 *object->out.ctr = NULL;
   52736             :         } else {
   52737           0 :                 *object->out.ctr = NULL;
   52738           0 :                 PY_CHECK_TYPE(&netr_DsRAddressToSitenamesExWCtr_Type, value, return -1;);
   52739           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   52740           0 :                         PyErr_NoMemory();
   52741           0 :                         return -1;
   52742             :                 }
   52743           0 :                 *object->out.ctr = (struct netr_DsRAddressToSitenamesExWCtr *)pytalloc_get_ptr(value);
   52744             :         }
   52745           0 :         return 0;
   52746             : }
   52747             : 
   52748           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_get_result(PyObject *obj, void *closure)
   52749             : {
   52750           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(obj);
   52751             :         PyObject *py_result;
   52752           0 :         py_result = PyErr_FromWERROR(object->out.result);
   52753           0 :         return py_result;
   52754             : }
   52755             : 
   52756           0 : static int py_netr_DsRAddressToSitenamesExW_set_result(PyObject *py_obj, PyObject *value, void *closure)
   52757             : {
   52758           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(py_obj);
   52759           0 :         if (value == NULL) {
   52760           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   52761           0 :                 return -1;
   52762             :         }
   52763           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   52764           0 :         return 0;
   52765             : }
   52766             : 
   52767             : static PyGetSetDef py_netr_DsRAddressToSitenamesExW_getsetters[] = {
   52768             :         {
   52769             :                 .name = discard_const_p(char, "in_server_name"),
   52770             :                 .get = py_netr_DsRAddressToSitenamesExW_in_get_server_name,
   52771             :                 .set = py_netr_DsRAddressToSitenamesExW_in_set_server_name,
   52772             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   52773             :         },
   52774             :         {
   52775             :                 .name = discard_const_p(char, "in_count"),
   52776             :                 .get = py_netr_DsRAddressToSitenamesExW_in_get_count,
   52777             :                 .set = py_netr_DsRAddressToSitenamesExW_in_set_count,
   52778             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   52779             :         },
   52780             :         {
   52781             :                 .name = discard_const_p(char, "in_addresses"),
   52782             :                 .get = py_netr_DsRAddressToSitenamesExW_in_get_addresses,
   52783             :                 .set = py_netr_DsRAddressToSitenamesExW_in_set_addresses,
   52784             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRAddress")
   52785             :         },
   52786             :         {
   52787             :                 .name = discard_const_p(char, "out_ctr"),
   52788             :                 .get = py_netr_DsRAddressToSitenamesExW_out_get_ctr,
   52789             :                 .set = py_netr_DsRAddressToSitenamesExW_out_set_ctr,
   52790             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DsRAddressToSitenamesExWCtr")
   52791             :         },
   52792             :         {
   52793             :                 .name = discard_const_p(char, "result"),
   52794             :                 .get = py_netr_DsRAddressToSitenamesExW_get_result,
   52795             :                 .set = py_netr_DsRAddressToSitenamesExW_set_result,
   52796             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   52797             :         },
   52798             :         { .name = NULL }
   52799             : };
   52800             : 
   52801           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   52802             : {
   52803           0 :         PyObject *self = pytalloc_new(struct netr_DsRAddressToSitenamesExW, type);
   52804           0 :         struct netr_DsRAddressToSitenamesExW *_self = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(self);
   52805           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   52806           0 :         _self->in.addresses = talloc_zero(mem_ctx, struct netr_DsRAddress);
   52807             :         /* a pointer to a NULL pointer */
   52808           0 :         _self->out.ctr = talloc_zero(mem_ctx, struct netr_DsRAddressToSitenamesExWCtr *);
   52809           0 :         return self;
   52810             : }
   52811             : 
   52812           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   52813             : {
   52814             : 
   52815             : 
   52816           0 :         return PyLong_FromLong(37);
   52817             : }
   52818             : 
   52819           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   52820             : {
   52821           0 :         const struct ndr_interface_call *call = NULL;
   52822           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(py_obj);
   52823           0 :         PyObject *ret = NULL;
   52824           0 :         struct ndr_push *push = NULL;
   52825             :         DATA_BLOB blob;
   52826             :         enum ndr_err_code err;
   52827             : 
   52828           0 :         if (ndr_table_netlogon.num_calls < 38) {
   52829           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRAddressToSitenamesExW_ndr_pack");
   52830           0 :                 return NULL;
   52831             :         }
   52832           0 :         call = &ndr_table_netlogon.calls[37];
   52833             : 
   52834           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   52835           0 :         if (push == NULL) {
   52836           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   52837           0 :                 return NULL;
   52838             :         }
   52839             : 
   52840           0 :         push->flags |= ndr_push_flags;
   52841             : 
   52842           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   52843           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   52844           0 :                 TALLOC_FREE(push);
   52845           0 :                 PyErr_SetNdrError(err);
   52846           0 :                 return NULL;
   52847             :         }
   52848           0 :         blob = ndr_push_blob(push);
   52849           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   52850           0 :         TALLOC_FREE(push);
   52851           0 :         return ret;
   52852             : }
   52853             : 
   52854           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52855             : {
   52856           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   52857           0 :         PyObject *bigendian_obj = NULL;
   52858           0 :         PyObject *ndr64_obj = NULL;
   52859           0 :         uint32_t ndr_push_flags = 0;
   52860             : 
   52861           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   52862             :                 discard_const_p(char *, kwnames),
   52863             :                 &bigendian_obj,
   52864             :                 &ndr64_obj)) {
   52865           0 :                 return NULL;
   52866             :         }
   52867             : 
   52868           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52869           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   52870             :         }
   52871           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52872           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   52873             :         }
   52874             : 
   52875           0 :         return py_netr_DsRAddressToSitenamesExW_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   52876             : }
   52877             : 
   52878           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52879             : {
   52880           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   52881           0 :         PyObject *bigendian_obj = NULL;
   52882           0 :         PyObject *ndr64_obj = NULL;
   52883           0 :         uint32_t ndr_push_flags = 0;
   52884             : 
   52885           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   52886             :                 discard_const_p(char *, kwnames),
   52887             :                 &bigendian_obj,
   52888             :                 &ndr64_obj)) {
   52889           0 :                 return NULL;
   52890             :         }
   52891             : 
   52892           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52893           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   52894             :         }
   52895           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52896           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   52897             :         }
   52898             : 
   52899           0 :         return py_netr_DsRAddressToSitenamesExW_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   52900             : }
   52901             : 
   52902           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   52903             : {
   52904           0 :         const struct ndr_interface_call *call = NULL;
   52905           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(py_obj);
   52906           0 :         struct ndr_pull *pull = NULL;
   52907             :         enum ndr_err_code err;
   52908             : 
   52909           0 :         if (ndr_table_netlogon.num_calls < 38) {
   52910           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRAddressToSitenamesExW_ndr_unpack");
   52911           0 :                 return NULL;
   52912             :         }
   52913           0 :         call = &ndr_table_netlogon.calls[37];
   52914             : 
   52915           0 :         pull = ndr_pull_init_blob(blob, object);
   52916           0 :         if (pull == NULL) {
   52917           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   52918           0 :                 return NULL;
   52919             :         }
   52920             : 
   52921           0 :         pull->flags |= ndr_pull_flags;
   52922             : 
   52923           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   52924           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   52925           0 :                 TALLOC_FREE(pull);
   52926           0 :                 PyErr_SetNdrError(err);
   52927           0 :                 return NULL;
   52928             :         }
   52929           0 :         if (!allow_remaining) {
   52930             :                 uint32_t highest_ofs;
   52931             : 
   52932           0 :                 if (pull->offset > pull->relative_highest_offset) {
   52933           0 :                         highest_ofs = pull->offset;
   52934             :                 } else {
   52935           0 :                         highest_ofs = pull->relative_highest_offset;
   52936             :                 }
   52937           0 :                 if (highest_ofs < pull->data_size) {
   52938           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   52939             :                                 "not all bytes consumed ofs[%u] size[%u]",
   52940             :                                 highest_ofs, pull->data_size);
   52941           0 :                         TALLOC_FREE(pull);
   52942           0 :                         PyErr_SetNdrError(err);
   52943           0 :                         return NULL;
   52944             :                 }
   52945             :         }
   52946             : 
   52947           0 :         TALLOC_FREE(pull);
   52948           0 :         Py_RETURN_NONE;
   52949             : }
   52950             : 
   52951           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52952             : {
   52953             :         DATA_BLOB blob;
   52954           0 :         Py_ssize_t blob_length = 0;
   52955           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   52956           0 :         PyObject *bigendian_obj = NULL;
   52957           0 :         PyObject *ndr64_obj = NULL;
   52958           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   52959           0 :         PyObject *allow_remaining_obj = NULL;
   52960           0 :         bool allow_remaining = false;
   52961             : 
   52962           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   52963             :                 discard_const_p(char *, kwnames),
   52964             :                 &blob.data, &blob_length,
   52965             :                 &bigendian_obj,
   52966             :                 &ndr64_obj,
   52967             :                 &allow_remaining_obj)) {
   52968           0 :                 return NULL;
   52969             :         }
   52970           0 :         blob.length = blob_length;
   52971             : 
   52972           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   52973           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   52974             :         }
   52975           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   52976           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   52977             :         }
   52978             : 
   52979           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   52980           0 :                 allow_remaining = true;
   52981             :         }
   52982             : 
   52983           0 :         return py_netr_DsRAddressToSitenamesExW_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   52984             : }
   52985             : 
   52986           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   52987             : {
   52988             :         DATA_BLOB blob;
   52989           0 :         Py_ssize_t blob_length = 0;
   52990           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   52991           0 :         PyObject *bigendian_obj = NULL;
   52992           0 :         PyObject *ndr64_obj = NULL;
   52993           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   52994           0 :         PyObject *allow_remaining_obj = NULL;
   52995           0 :         bool allow_remaining = false;
   52996             : 
   52997           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   52998             :                 discard_const_p(char *, kwnames),
   52999             :                 &blob.data, &blob_length,
   53000             :                 &bigendian_obj,
   53001             :                 &ndr64_obj,
   53002             :                 &allow_remaining_obj)) {
   53003           0 :                 return NULL;
   53004             :         }
   53005           0 :         blob.length = blob_length;
   53006             : 
   53007           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53008           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   53009             :         }
   53010           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53011           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   53012             :         }
   53013             : 
   53014           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   53015           0 :                 allow_remaining = true;
   53016             :         }
   53017             : 
   53018           0 :         return py_netr_DsRAddressToSitenamesExW_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   53019             : }
   53020             : 
   53021           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   53022             : {
   53023           0 :         const struct ndr_interface_call *call = NULL;
   53024           0 :         struct netr_DsRAddressToSitenamesExW *object = (struct netr_DsRAddressToSitenamesExW *)pytalloc_get_ptr(py_obj);
   53025             :         PyObject *ret;
   53026             :         char *retstr;
   53027             : 
   53028           0 :         if (ndr_table_netlogon.num_calls < 38) {
   53029           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRAddressToSitenamesExW_ndr_print");
   53030           0 :                 return NULL;
   53031             :         }
   53032           0 :         call = &ndr_table_netlogon.calls[37];
   53033             : 
   53034           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   53035           0 :         ret = PyUnicode_FromString(retstr);
   53036           0 :         TALLOC_FREE(retstr);
   53037             : 
   53038           0 :         return ret;
   53039             : }
   53040             : 
   53041           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   53042             : {
   53043           0 :         return py_netr_DsRAddressToSitenamesExW_ndr_print(py_obj, "netr_DsRAddressToSitenamesExW_in", NDR_IN);
   53044             : }
   53045             : 
   53046           0 : static PyObject *py_netr_DsRAddressToSitenamesExW_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   53047             : {
   53048           0 :         return py_netr_DsRAddressToSitenamesExW_ndr_print(py_obj, "netr_DsRAddressToSitenamesExW_out", NDR_OUT);
   53049             : }
   53050             : 
   53051             : static PyMethodDef py_netr_DsRAddressToSitenamesExW_methods[] = {
   53052             :         { "opnum", (PyCFunction)py_netr_DsRAddressToSitenamesExW_ndr_opnum, METH_NOARGS|METH_CLASS,
   53053             :                 "netlogon.netr_DsRAddressToSitenamesExW.opnum() -> 37 (0x25) " },
   53054             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesExW_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   53055             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   53056             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesExW_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   53057             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   53058             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesExW_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   53059             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   53060             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRAddressToSitenamesExW_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   53061             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   53062             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsRAddressToSitenamesExW_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   53063             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsRAddressToSitenamesExW_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   53064             :         { NULL, NULL, 0, NULL }
   53065             : };
   53066             : 
   53067             : 
   53068             : static PyTypeObject netr_DsRAddressToSitenamesExW_Type = {
   53069             :         PyVarObject_HEAD_INIT(NULL, 0)
   53070             :         .tp_name = "netlogon.netr_DsRAddressToSitenamesExW",
   53071             :         .tp_getset = py_netr_DsRAddressToSitenamesExW_getsetters,
   53072             :         .tp_methods = py_netr_DsRAddressToSitenamesExW_methods,
   53073             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   53074             :         .tp_new = py_netr_DsRAddressToSitenamesExW_new,
   53075             : };
   53076             : 
   53077           0 : static bool pack_py_netr_DsRAddressToSitenamesExW_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRAddressToSitenamesExW *r)
   53078             : {
   53079             :         PyObject *py_server_name;
   53080             :         PyObject *py_addresses;
   53081           0 :         const char *kwnames[] = {
   53082             :                 "server_name", "addresses", NULL
   53083             :         };
   53084             : 
   53085           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:netr_DsRAddressToSitenamesExW", discard_const_p(char *, kwnames), &py_server_name, &py_addresses)) {
   53086           0 :                 return false;
   53087             :         }
   53088             : 
   53089           0 :         if (py_server_name == NULL) {
   53090           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   53091           0 :                 return false;
   53092             :         }
   53093           0 :         if (py_server_name == Py_None) {
   53094           0 :                 r->in.server_name = NULL;
   53095             :         } else {
   53096           0 :                 r->in.server_name = NULL;
   53097             :                 {
   53098             :                         const char *test_str;
   53099             :                         const char *talloc_str;
   53100           0 :                         PyObject *unicode = NULL;
   53101           0 :                         if (PyUnicode_Check(py_server_name)) {
   53102           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   53103           0 :                                 if (unicode == NULL) {
   53104           0 :                                         PyErr_NoMemory();
   53105           0 :                                         return false;
   53106             :                                 }
   53107           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   53108           0 :                         } else if (PyBytes_Check(py_server_name)) {
   53109           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   53110             :                         } else {
   53111           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   53112           0 :                                 return false;
   53113             :                         }
   53114           0 :                         talloc_str = talloc_strdup(r, test_str);
   53115           0 :                         if (unicode != NULL) {
   53116           0 :                                 Py_DECREF(unicode);
   53117             :                         }
   53118           0 :                         if (talloc_str == NULL) {
   53119           0 :                                 PyErr_NoMemory();
   53120           0 :                                 return false;
   53121             :                         }
   53122           0 :                         r->in.server_name = talloc_str;
   53123             :                 }
   53124             :         }
   53125           0 :         PY_CHECK_TYPE(&PyList_Type, py_addresses, return false;);
   53126           0 :         r->in.count = PyList_GET_SIZE(py_addresses);
   53127           0 :         if (py_addresses == NULL) {
   53128           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.addresses");
   53129           0 :                 return false;
   53130             :         }
   53131           0 :         r->in.addresses = talloc_ptrtype(r, r->in.addresses);
   53132           0 :         if (r->in.addresses == NULL) {
   53133           0 :                 PyErr_NoMemory();
   53134           0 :                 return false;
   53135             :         }
   53136           0 :         PY_CHECK_TYPE(&PyList_Type, py_addresses, return false;);
   53137             :         {
   53138             :                 int addresses_cntr_1;
   53139           0 :                 r->in.addresses = talloc_array_ptrtype(r, r->in.addresses, PyList_GET_SIZE(py_addresses));
   53140           0 :                 if (!r->in.addresses) { return false;; }
   53141           0 :                 talloc_set_name_const(r->in.addresses, "ARRAY: r->in.addresses");
   53142           0 :                 for (addresses_cntr_1 = 0; addresses_cntr_1 < PyList_GET_SIZE(py_addresses); addresses_cntr_1++) {
   53143           0 :                         if (PyList_GET_ITEM(py_addresses, addresses_cntr_1) == NULL) {
   53144           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.addresses[addresses_cntr_1]");
   53145           0 :                                 return false;
   53146             :                         }
   53147           0 :                         PY_CHECK_TYPE(&netr_DsRAddress_Type, PyList_GET_ITEM(py_addresses, addresses_cntr_1), return false;);
   53148           0 :                         if (talloc_reference(r->in.addresses, pytalloc_get_mem_ctx(PyList_GET_ITEM(py_addresses, addresses_cntr_1))) == NULL) {
   53149           0 :                                 PyErr_NoMemory();
   53150           0 :                                 return false;
   53151             :                         }
   53152           0 :                         r->in.addresses[addresses_cntr_1] = *(struct netr_DsRAddress *)pytalloc_get_ptr(PyList_GET_ITEM(py_addresses, addresses_cntr_1));
   53153             :                 }
   53154             :         }
   53155           0 :         return true;
   53156             : }
   53157             : 
   53158           0 : static PyObject *unpack_py_netr_DsRAddressToSitenamesExW_args_out(struct netr_DsRAddressToSitenamesExW *r)
   53159             : {
   53160             :         PyObject *result;
   53161             :         PyObject *py_ctr;
   53162           0 :         if (*r->out.ctr == NULL) {
   53163           0 :                 py_ctr = Py_None;
   53164           0 :                 Py_INCREF(py_ctr);
   53165             :         } else {
   53166           0 :                 py_ctr = pytalloc_reference_ex(&netr_DsRAddressToSitenamesExWCtr_Type, *r->out.ctr, *r->out.ctr);
   53167             :         }
   53168           0 :         result = py_ctr;
   53169           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   53170           0 :                 PyErr_SetWERROR(r->out.result);
   53171           0 :                 return NULL;
   53172             :         }
   53173             : 
   53174           0 :         return result;
   53175             : }
   53176             : 
   53177             : 
   53178           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_in_get_server_name(PyObject *obj, void *closure)
   53179             : {
   53180           0 :         struct netr_DsrGetDcSiteCoverageW *object = (struct netr_DsrGetDcSiteCoverageW *)pytalloc_get_ptr(obj);
   53181             :         PyObject *py_server_name;
   53182           0 :         if (object->in.server_name == NULL) {
   53183           0 :                 Py_RETURN_NONE;
   53184             :         }
   53185           0 :         if (object->in.server_name == NULL) {
   53186           0 :                 py_server_name = Py_None;
   53187           0 :                 Py_INCREF(py_server_name);
   53188             :         } else {
   53189           0 :                 if (object->in.server_name == NULL) {
   53190           0 :                         py_server_name = Py_None;
   53191           0 :                         Py_INCREF(py_server_name);
   53192             :                 } else {
   53193           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   53194             :                 }
   53195             :         }
   53196           0 :         return py_server_name;
   53197             : }
   53198             : 
   53199           0 : static int py_netr_DsrGetDcSiteCoverageW_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   53200             : {
   53201           0 :         struct netr_DsrGetDcSiteCoverageW *object = (struct netr_DsrGetDcSiteCoverageW *)pytalloc_get_ptr(py_obj);
   53202           0 :         if (value == NULL) {
   53203           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   53204           0 :                 return -1;
   53205             :         }
   53206           0 :         if (value == Py_None) {
   53207           0 :                 object->in.server_name = NULL;
   53208             :         } else {
   53209           0 :                 object->in.server_name = NULL;
   53210             :                 {
   53211             :                         const char *test_str;
   53212             :                         const char *talloc_str;
   53213           0 :                         PyObject *unicode = NULL;
   53214           0 :                         if (PyUnicode_Check(value)) {
   53215           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   53216           0 :                                 if (unicode == NULL) {
   53217           0 :                                         PyErr_NoMemory();
   53218           0 :                                         return -1;
   53219             :                                 }
   53220           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   53221           0 :                         } else if (PyBytes_Check(value)) {
   53222           0 :                                 test_str = PyBytes_AS_STRING(value);
   53223             :                         } else {
   53224           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   53225           0 :                                 return -1;
   53226             :                         }
   53227           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   53228           0 :                         if (unicode != NULL) {
   53229           0 :                                 Py_DECREF(unicode);
   53230             :                         }
   53231           0 :                         if (talloc_str == NULL) {
   53232           0 :                                 PyErr_NoMemory();
   53233           0 :                                 return -1;
   53234             :                         }
   53235           0 :                         object->in.server_name = talloc_str;
   53236             :                 }
   53237             :         }
   53238           0 :         return 0;
   53239             : }
   53240             : 
   53241           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_out_get_ctr(PyObject *obj, void *closure)
   53242             : {
   53243           0 :         struct netr_DsrGetDcSiteCoverageW *object = (struct netr_DsrGetDcSiteCoverageW *)pytalloc_get_ptr(obj);
   53244             :         PyObject *py_ctr;
   53245           0 :         if (object->out.ctr == NULL) {
   53246           0 :                 Py_RETURN_NONE;
   53247             :         }
   53248           0 :         if (*object->out.ctr == NULL) {
   53249           0 :                 py_ctr = Py_None;
   53250           0 :                 Py_INCREF(py_ctr);
   53251             :         } else {
   53252           0 :                 py_ctr = pytalloc_reference_ex(&DcSitesCtr_Type, *object->out.ctr, *object->out.ctr);
   53253             :         }
   53254           0 :         return py_ctr;
   53255             : }
   53256             : 
   53257           0 : static int py_netr_DsrGetDcSiteCoverageW_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
   53258             : {
   53259           0 :         struct netr_DsrGetDcSiteCoverageW *object = (struct netr_DsrGetDcSiteCoverageW *)pytalloc_get_ptr(py_obj);
   53260           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
   53261           0 :         if (value == NULL) {
   53262           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ctr");
   53263           0 :                 return -1;
   53264             :         }
   53265           0 :         object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
   53266           0 :         if (object->out.ctr == NULL) {
   53267           0 :                 PyErr_NoMemory();
   53268           0 :                 return -1;
   53269             :         }
   53270           0 :         if (value == Py_None) {
   53271           0 :                 *object->out.ctr = NULL;
   53272             :         } else {
   53273           0 :                 *object->out.ctr = NULL;
   53274           0 :                 PY_CHECK_TYPE(&DcSitesCtr_Type, value, return -1;);
   53275           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   53276           0 :                         PyErr_NoMemory();
   53277           0 :                         return -1;
   53278             :                 }
   53279           0 :                 *object->out.ctr = (struct DcSitesCtr *)pytalloc_get_ptr(value);
   53280             :         }
   53281           0 :         return 0;
   53282             : }
   53283             : 
   53284           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_get_result(PyObject *obj, void *closure)
   53285             : {
   53286           0 :         struct netr_DsrGetDcSiteCoverageW *object = (struct netr_DsrGetDcSiteCoverageW *)pytalloc_get_ptr(obj);
   53287             :         PyObject *py_result;
   53288           0 :         py_result = PyErr_FromWERROR(object->out.result);
   53289           0 :         return py_result;
   53290             : }
   53291             : 
   53292           0 : static int py_netr_DsrGetDcSiteCoverageW_set_result(PyObject *py_obj, PyObject *value, void *closure)
   53293             : {
   53294           0 :         struct netr_DsrGetDcSiteCoverageW *object = (struct netr_DsrGetDcSiteCoverageW *)pytalloc_get_ptr(py_obj);
   53295           0 :         if (value == NULL) {
   53296           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   53297           0 :                 return -1;
   53298             :         }
   53299           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   53300           0 :         return 0;
   53301             : }
   53302             : 
   53303             : static PyGetSetDef py_netr_DsrGetDcSiteCoverageW_getsetters[] = {
   53304             :         {
   53305             :                 .name = discard_const_p(char, "in_server_name"),
   53306             :                 .get = py_netr_DsrGetDcSiteCoverageW_in_get_server_name,
   53307             :                 .set = py_netr_DsrGetDcSiteCoverageW_in_set_server_name,
   53308             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   53309             :         },
   53310             :         {
   53311             :                 .name = discard_const_p(char, "out_ctr"),
   53312             :                 .get = py_netr_DsrGetDcSiteCoverageW_out_get_ctr,
   53313             :                 .set = py_netr_DsrGetDcSiteCoverageW_out_set_ctr,
   53314             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DcSitesCtr")
   53315             :         },
   53316             :         {
   53317             :                 .name = discard_const_p(char, "result"),
   53318             :                 .get = py_netr_DsrGetDcSiteCoverageW_get_result,
   53319             :                 .set = py_netr_DsrGetDcSiteCoverageW_set_result,
   53320             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   53321             :         },
   53322             :         { .name = NULL }
   53323             : };
   53324             : 
   53325           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   53326             : {
   53327           0 :         PyObject *self = pytalloc_new(struct netr_DsrGetDcSiteCoverageW, type);
   53328           0 :         struct netr_DsrGetDcSiteCoverageW *_self = (struct netr_DsrGetDcSiteCoverageW *)pytalloc_get_ptr(self);
   53329           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   53330             :         /* a pointer to a NULL pointer */
   53331           0 :         _self->out.ctr = talloc_zero(mem_ctx, struct DcSitesCtr *);
   53332           0 :         return self;
   53333             : }
   53334             : 
   53335           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   53336             : {
   53337             : 
   53338             : 
   53339           0 :         return PyLong_FromLong(38);
   53340             : }
   53341             : 
   53342           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   53343             : {
   53344           0 :         const struct ndr_interface_call *call = NULL;
   53345           0 :         struct netr_DsrGetDcSiteCoverageW *object = (struct netr_DsrGetDcSiteCoverageW *)pytalloc_get_ptr(py_obj);
   53346           0 :         PyObject *ret = NULL;
   53347           0 :         struct ndr_push *push = NULL;
   53348             :         DATA_BLOB blob;
   53349             :         enum ndr_err_code err;
   53350             : 
   53351           0 :         if (ndr_table_netlogon.num_calls < 39) {
   53352           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrGetDcSiteCoverageW_ndr_pack");
   53353           0 :                 return NULL;
   53354             :         }
   53355           0 :         call = &ndr_table_netlogon.calls[38];
   53356             : 
   53357           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   53358           0 :         if (push == NULL) {
   53359           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   53360           0 :                 return NULL;
   53361             :         }
   53362             : 
   53363           0 :         push->flags |= ndr_push_flags;
   53364             : 
   53365           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   53366           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   53367           0 :                 TALLOC_FREE(push);
   53368           0 :                 PyErr_SetNdrError(err);
   53369           0 :                 return NULL;
   53370             :         }
   53371           0 :         blob = ndr_push_blob(push);
   53372           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   53373           0 :         TALLOC_FREE(push);
   53374           0 :         return ret;
   53375             : }
   53376             : 
   53377           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53378             : {
   53379           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   53380           0 :         PyObject *bigendian_obj = NULL;
   53381           0 :         PyObject *ndr64_obj = NULL;
   53382           0 :         uint32_t ndr_push_flags = 0;
   53383             : 
   53384           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   53385             :                 discard_const_p(char *, kwnames),
   53386             :                 &bigendian_obj,
   53387             :                 &ndr64_obj)) {
   53388           0 :                 return NULL;
   53389             :         }
   53390             : 
   53391           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53392           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   53393             :         }
   53394           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53395           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   53396             :         }
   53397             : 
   53398           0 :         return py_netr_DsrGetDcSiteCoverageW_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   53399             : }
   53400             : 
   53401           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53402             : {
   53403           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   53404           0 :         PyObject *bigendian_obj = NULL;
   53405           0 :         PyObject *ndr64_obj = NULL;
   53406           0 :         uint32_t ndr_push_flags = 0;
   53407             : 
   53408           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   53409             :                 discard_const_p(char *, kwnames),
   53410             :                 &bigendian_obj,
   53411             :                 &ndr64_obj)) {
   53412           0 :                 return NULL;
   53413             :         }
   53414             : 
   53415           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53416           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   53417             :         }
   53418           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53419           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   53420             :         }
   53421             : 
   53422           0 :         return py_netr_DsrGetDcSiteCoverageW_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   53423             : }
   53424             : 
   53425           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   53426             : {
   53427           0 :         const struct ndr_interface_call *call = NULL;
   53428           0 :         struct netr_DsrGetDcSiteCoverageW *object = (struct netr_DsrGetDcSiteCoverageW *)pytalloc_get_ptr(py_obj);
   53429           0 :         struct ndr_pull *pull = NULL;
   53430             :         enum ndr_err_code err;
   53431             : 
   53432           0 :         if (ndr_table_netlogon.num_calls < 39) {
   53433           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrGetDcSiteCoverageW_ndr_unpack");
   53434           0 :                 return NULL;
   53435             :         }
   53436           0 :         call = &ndr_table_netlogon.calls[38];
   53437             : 
   53438           0 :         pull = ndr_pull_init_blob(blob, object);
   53439           0 :         if (pull == NULL) {
   53440           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   53441           0 :                 return NULL;
   53442             :         }
   53443             : 
   53444           0 :         pull->flags |= ndr_pull_flags;
   53445             : 
   53446           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   53447           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   53448           0 :                 TALLOC_FREE(pull);
   53449           0 :                 PyErr_SetNdrError(err);
   53450           0 :                 return NULL;
   53451             :         }
   53452           0 :         if (!allow_remaining) {
   53453             :                 uint32_t highest_ofs;
   53454             : 
   53455           0 :                 if (pull->offset > pull->relative_highest_offset) {
   53456           0 :                         highest_ofs = pull->offset;
   53457             :                 } else {
   53458           0 :                         highest_ofs = pull->relative_highest_offset;
   53459             :                 }
   53460           0 :                 if (highest_ofs < pull->data_size) {
   53461           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   53462             :                                 "not all bytes consumed ofs[%u] size[%u]",
   53463             :                                 highest_ofs, pull->data_size);
   53464           0 :                         TALLOC_FREE(pull);
   53465           0 :                         PyErr_SetNdrError(err);
   53466           0 :                         return NULL;
   53467             :                 }
   53468             :         }
   53469             : 
   53470           0 :         TALLOC_FREE(pull);
   53471           0 :         Py_RETURN_NONE;
   53472             : }
   53473             : 
   53474           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53475             : {
   53476             :         DATA_BLOB blob;
   53477           0 :         Py_ssize_t blob_length = 0;
   53478           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   53479           0 :         PyObject *bigendian_obj = NULL;
   53480           0 :         PyObject *ndr64_obj = NULL;
   53481           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   53482           0 :         PyObject *allow_remaining_obj = NULL;
   53483           0 :         bool allow_remaining = false;
   53484             : 
   53485           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   53486             :                 discard_const_p(char *, kwnames),
   53487             :                 &blob.data, &blob_length,
   53488             :                 &bigendian_obj,
   53489             :                 &ndr64_obj,
   53490             :                 &allow_remaining_obj)) {
   53491           0 :                 return NULL;
   53492             :         }
   53493           0 :         blob.length = blob_length;
   53494             : 
   53495           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53496           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   53497             :         }
   53498           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53499           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   53500             :         }
   53501             : 
   53502           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   53503           0 :                 allow_remaining = true;
   53504             :         }
   53505             : 
   53506           0 :         return py_netr_DsrGetDcSiteCoverageW_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   53507             : }
   53508             : 
   53509           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   53510             : {
   53511             :         DATA_BLOB blob;
   53512           0 :         Py_ssize_t blob_length = 0;
   53513           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   53514           0 :         PyObject *bigendian_obj = NULL;
   53515           0 :         PyObject *ndr64_obj = NULL;
   53516           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   53517           0 :         PyObject *allow_remaining_obj = NULL;
   53518           0 :         bool allow_remaining = false;
   53519             : 
   53520           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   53521             :                 discard_const_p(char *, kwnames),
   53522             :                 &blob.data, &blob_length,
   53523             :                 &bigendian_obj,
   53524             :                 &ndr64_obj,
   53525             :                 &allow_remaining_obj)) {
   53526           0 :                 return NULL;
   53527             :         }
   53528           0 :         blob.length = blob_length;
   53529             : 
   53530           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   53531           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   53532             :         }
   53533           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   53534           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   53535             :         }
   53536             : 
   53537           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   53538           0 :                 allow_remaining = true;
   53539             :         }
   53540             : 
   53541           0 :         return py_netr_DsrGetDcSiteCoverageW_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   53542             : }
   53543             : 
   53544           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   53545             : {
   53546           0 :         const struct ndr_interface_call *call = NULL;
   53547           0 :         struct netr_DsrGetDcSiteCoverageW *object = (struct netr_DsrGetDcSiteCoverageW *)pytalloc_get_ptr(py_obj);
   53548             :         PyObject *ret;
   53549             :         char *retstr;
   53550             : 
   53551           0 :         if (ndr_table_netlogon.num_calls < 39) {
   53552           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrGetDcSiteCoverageW_ndr_print");
   53553           0 :                 return NULL;
   53554             :         }
   53555           0 :         call = &ndr_table_netlogon.calls[38];
   53556             : 
   53557           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   53558           0 :         ret = PyUnicode_FromString(retstr);
   53559           0 :         TALLOC_FREE(retstr);
   53560             : 
   53561           0 :         return ret;
   53562             : }
   53563             : 
   53564           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   53565             : {
   53566           0 :         return py_netr_DsrGetDcSiteCoverageW_ndr_print(py_obj, "netr_DsrGetDcSiteCoverageW_in", NDR_IN);
   53567             : }
   53568             : 
   53569           0 : static PyObject *py_netr_DsrGetDcSiteCoverageW_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   53570             : {
   53571           0 :         return py_netr_DsrGetDcSiteCoverageW_ndr_print(py_obj, "netr_DsrGetDcSiteCoverageW_out", NDR_OUT);
   53572             : }
   53573             : 
   53574             : static PyMethodDef py_netr_DsrGetDcSiteCoverageW_methods[] = {
   53575             :         { "opnum", (PyCFunction)py_netr_DsrGetDcSiteCoverageW_ndr_opnum, METH_NOARGS|METH_CLASS,
   53576             :                 "netlogon.netr_DsrGetDcSiteCoverageW.opnum() -> 38 (0x26) " },
   53577             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrGetDcSiteCoverageW_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   53578             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   53579             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrGetDcSiteCoverageW_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   53580             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   53581             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrGetDcSiteCoverageW_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   53582             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   53583             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrGetDcSiteCoverageW_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   53584             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   53585             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsrGetDcSiteCoverageW_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   53586             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsrGetDcSiteCoverageW_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   53587             :         { NULL, NULL, 0, NULL }
   53588             : };
   53589             : 
   53590             : 
   53591             : static PyTypeObject netr_DsrGetDcSiteCoverageW_Type = {
   53592             :         PyVarObject_HEAD_INIT(NULL, 0)
   53593             :         .tp_name = "netlogon.netr_DsrGetDcSiteCoverageW",
   53594             :         .tp_getset = py_netr_DsrGetDcSiteCoverageW_getsetters,
   53595             :         .tp_methods = py_netr_DsrGetDcSiteCoverageW_methods,
   53596             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   53597             :         .tp_new = py_netr_DsrGetDcSiteCoverageW_new,
   53598             : };
   53599             : 
   53600           0 : static bool pack_py_netr_DsrGetDcSiteCoverageW_args_in(PyObject *args, PyObject *kwargs, struct netr_DsrGetDcSiteCoverageW *r)
   53601             : {
   53602             :         PyObject *py_server_name;
   53603           0 :         const char *kwnames[] = {
   53604             :                 "server_name", NULL
   53605             :         };
   53606             : 
   53607           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:netr_DsrGetDcSiteCoverageW", discard_const_p(char *, kwnames), &py_server_name)) {
   53608           0 :                 return false;
   53609             :         }
   53610             : 
   53611           0 :         if (py_server_name == NULL) {
   53612           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   53613           0 :                 return false;
   53614             :         }
   53615           0 :         if (py_server_name == Py_None) {
   53616           0 :                 r->in.server_name = NULL;
   53617             :         } else {
   53618           0 :                 r->in.server_name = NULL;
   53619             :                 {
   53620             :                         const char *test_str;
   53621             :                         const char *talloc_str;
   53622           0 :                         PyObject *unicode = NULL;
   53623           0 :                         if (PyUnicode_Check(py_server_name)) {
   53624           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   53625           0 :                                 if (unicode == NULL) {
   53626           0 :                                         PyErr_NoMemory();
   53627           0 :                                         return false;
   53628             :                                 }
   53629           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   53630           0 :                         } else if (PyBytes_Check(py_server_name)) {
   53631           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   53632             :                         } else {
   53633           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   53634           0 :                                 return false;
   53635             :                         }
   53636           0 :                         talloc_str = talloc_strdup(r, test_str);
   53637           0 :                         if (unicode != NULL) {
   53638           0 :                                 Py_DECREF(unicode);
   53639             :                         }
   53640           0 :                         if (talloc_str == NULL) {
   53641           0 :                                 PyErr_NoMemory();
   53642           0 :                                 return false;
   53643             :                         }
   53644           0 :                         r->in.server_name = talloc_str;
   53645             :                 }
   53646             :         }
   53647           0 :         return true;
   53648             : }
   53649             : 
   53650           0 : static PyObject *unpack_py_netr_DsrGetDcSiteCoverageW_args_out(struct netr_DsrGetDcSiteCoverageW *r)
   53651             : {
   53652             :         PyObject *result;
   53653             :         PyObject *py_ctr;
   53654           0 :         if (*r->out.ctr == NULL) {
   53655           0 :                 py_ctr = Py_None;
   53656           0 :                 Py_INCREF(py_ctr);
   53657             :         } else {
   53658           0 :                 py_ctr = pytalloc_reference_ex(&DcSitesCtr_Type, *r->out.ctr, *r->out.ctr);
   53659             :         }
   53660           0 :         result = py_ctr;
   53661           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   53662           0 :                 PyErr_SetWERROR(r->out.result);
   53663           0 :                 return NULL;
   53664             :         }
   53665             : 
   53666           0 :         return result;
   53667             : }
   53668             : 
   53669             : 
   53670           0 : static PyObject *py_netr_LogonSamLogonEx_in_get_server_name(PyObject *obj, void *closure)
   53671             : {
   53672           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(obj);
   53673             :         PyObject *py_server_name;
   53674           0 :         if (object->in.server_name == NULL) {
   53675           0 :                 Py_RETURN_NONE;
   53676             :         }
   53677           0 :         if (object->in.server_name == NULL) {
   53678           0 :                 py_server_name = Py_None;
   53679           0 :                 Py_INCREF(py_server_name);
   53680             :         } else {
   53681           0 :                 if (object->in.server_name == NULL) {
   53682           0 :                         py_server_name = Py_None;
   53683           0 :                         Py_INCREF(py_server_name);
   53684             :                 } else {
   53685           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   53686             :                 }
   53687             :         }
   53688           0 :         return py_server_name;
   53689             : }
   53690             : 
   53691           0 : static int py_netr_LogonSamLogonEx_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   53692             : {
   53693           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   53694           0 :         if (value == NULL) {
   53695           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   53696           0 :                 return -1;
   53697             :         }
   53698           0 :         if (value == Py_None) {
   53699           0 :                 object->in.server_name = NULL;
   53700             :         } else {
   53701           0 :                 object->in.server_name = NULL;
   53702             :                 {
   53703             :                         const char *test_str;
   53704             :                         const char *talloc_str;
   53705           0 :                         PyObject *unicode = NULL;
   53706           0 :                         if (PyUnicode_Check(value)) {
   53707           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   53708           0 :                                 if (unicode == NULL) {
   53709           0 :                                         PyErr_NoMemory();
   53710           0 :                                         return -1;
   53711             :                                 }
   53712           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   53713           0 :                         } else if (PyBytes_Check(value)) {
   53714           0 :                                 test_str = PyBytes_AS_STRING(value);
   53715             :                         } else {
   53716           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   53717           0 :                                 return -1;
   53718             :                         }
   53719           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   53720           0 :                         if (unicode != NULL) {
   53721           0 :                                 Py_DECREF(unicode);
   53722             :                         }
   53723           0 :                         if (talloc_str == NULL) {
   53724           0 :                                 PyErr_NoMemory();
   53725           0 :                                 return -1;
   53726             :                         }
   53727           0 :                         object->in.server_name = talloc_str;
   53728             :                 }
   53729             :         }
   53730           0 :         return 0;
   53731             : }
   53732             : 
   53733           0 : static PyObject *py_netr_LogonSamLogonEx_in_get_computer_name(PyObject *obj, void *closure)
   53734             : {
   53735           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(obj);
   53736             :         PyObject *py_computer_name;
   53737           0 :         if (object->in.computer_name == NULL) {
   53738           0 :                 Py_RETURN_NONE;
   53739             :         }
   53740           0 :         if (object->in.computer_name == NULL) {
   53741           0 :                 py_computer_name = Py_None;
   53742           0 :                 Py_INCREF(py_computer_name);
   53743             :         } else {
   53744           0 :                 if (object->in.computer_name == NULL) {
   53745           0 :                         py_computer_name = Py_None;
   53746           0 :                         Py_INCREF(py_computer_name);
   53747             :                 } else {
   53748           0 :                         py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   53749             :                 }
   53750             :         }
   53751           0 :         return py_computer_name;
   53752             : }
   53753             : 
   53754           0 : static int py_netr_LogonSamLogonEx_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   53755             : {
   53756           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   53757           0 :         if (value == NULL) {
   53758           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   53759           0 :                 return -1;
   53760             :         }
   53761           0 :         if (value == Py_None) {
   53762           0 :                 object->in.computer_name = NULL;
   53763             :         } else {
   53764           0 :                 object->in.computer_name = NULL;
   53765             :                 {
   53766             :                         const char *test_str;
   53767             :                         const char *talloc_str;
   53768           0 :                         PyObject *unicode = NULL;
   53769           0 :                         if (PyUnicode_Check(value)) {
   53770           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   53771           0 :                                 if (unicode == NULL) {
   53772           0 :                                         PyErr_NoMemory();
   53773           0 :                                         return -1;
   53774             :                                 }
   53775           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   53776           0 :                         } else if (PyBytes_Check(value)) {
   53777           0 :                                 test_str = PyBytes_AS_STRING(value);
   53778             :                         } else {
   53779           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   53780           0 :                                 return -1;
   53781             :                         }
   53782           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   53783           0 :                         if (unicode != NULL) {
   53784           0 :                                 Py_DECREF(unicode);
   53785             :                         }
   53786           0 :                         if (talloc_str == NULL) {
   53787           0 :                                 PyErr_NoMemory();
   53788           0 :                                 return -1;
   53789             :                         }
   53790           0 :                         object->in.computer_name = talloc_str;
   53791             :                 }
   53792             :         }
   53793           0 :         return 0;
   53794             : }
   53795             : 
   53796           0 : static PyObject *py_netr_LogonSamLogonEx_in_get_logon_level(PyObject *obj, void *closure)
   53797             : {
   53798           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(obj);
   53799             :         PyObject *py_logon_level;
   53800           0 :         py_logon_level = PyLong_FromLong((uint16_t)object->in.logon_level);
   53801           0 :         return py_logon_level;
   53802             : }
   53803             : 
   53804           0 : static int py_netr_LogonSamLogonEx_in_set_logon_level(PyObject *py_obj, PyObject *value, void *closure)
   53805             : {
   53806           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   53807           0 :         if (value == NULL) {
   53808           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_level");
   53809           0 :                 return -1;
   53810             :         }
   53811             :         {
   53812           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.logon_level));
   53813           0 :                 if (PyLong_Check(value)) {
   53814             :                         unsigned long long test_var;
   53815           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   53816           0 :                         if (PyErr_Occurred() != NULL) {
   53817           0 :                                 return -1;
   53818             :                         }
   53819           0 :                         if (test_var > uint_max) {
   53820           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   53821             :                                   PyLong_Type.tp_name, uint_max, test_var);
   53822           0 :                                 return -1;
   53823             :                         }
   53824           0 :                         object->in.logon_level = test_var;
   53825             :                 } else {
   53826           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   53827             :                           PyLong_Type.tp_name);
   53828           0 :                         return -1;
   53829             :                 }
   53830             :         }
   53831           0 :         return 0;
   53832             : }
   53833             : 
   53834           0 : static PyObject *py_netr_LogonSamLogonEx_in_get_logon(PyObject *obj, void *closure)
   53835             : {
   53836           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(obj);
   53837             :         PyObject *py_logon;
   53838           0 :         if (object->in.logon == NULL) {
   53839           0 :                 Py_RETURN_NONE;
   53840             :         }
   53841           0 :         py_logon = pyrpc_import_union(&netr_LogonLevel_Type, object->in.logon, object->in.logon_level, object->in.logon, "union netr_LogonLevel");
   53842           0 :         if (py_logon == NULL) {
   53843           0 :                 return NULL;
   53844             :         }
   53845           0 :         return py_logon;
   53846             : }
   53847             : 
   53848           0 : static int py_netr_LogonSamLogonEx_in_set_logon(PyObject *py_obj, PyObject *value, void *closure)
   53849             : {
   53850           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   53851           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.logon));
   53852           0 :         if (value == NULL) {
   53853           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon");
   53854           0 :                 return -1;
   53855             :         }
   53856           0 :         object->in.logon = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon);
   53857           0 :         if (object->in.logon == NULL) {
   53858           0 :                 PyErr_NoMemory();
   53859           0 :                 return -1;
   53860             :         }
   53861             :         {
   53862             :                 union netr_LogonLevel *logon_switch_1;
   53863           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");
   53864           0 :                 if (logon_switch_1 == NULL) {
   53865           0 :                         return -1;
   53866             :                 }
   53867           0 :                 object->in.logon = logon_switch_1;
   53868             :         }
   53869           0 :         return 0;
   53870             : }
   53871             : 
   53872           0 : static PyObject *py_netr_LogonSamLogonEx_in_get_validation_level(PyObject *obj, void *closure)
   53873             : {
   53874           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(obj);
   53875             :         PyObject *py_validation_level;
   53876           0 :         py_validation_level = PyLong_FromLong((uint16_t)object->in.validation_level);
   53877           0 :         return py_validation_level;
   53878             : }
   53879             : 
   53880           0 : static int py_netr_LogonSamLogonEx_in_set_validation_level(PyObject *py_obj, PyObject *value, void *closure)
   53881             : {
   53882           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   53883           0 :         if (value == NULL) {
   53884           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.validation_level");
   53885           0 :                 return -1;
   53886             :         }
   53887             :         {
   53888           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.validation_level));
   53889           0 :                 if (PyLong_Check(value)) {
   53890             :                         unsigned long long test_var;
   53891           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   53892           0 :                         if (PyErr_Occurred() != NULL) {
   53893           0 :                                 return -1;
   53894             :                         }
   53895           0 :                         if (test_var > uint_max) {
   53896           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   53897             :                                   PyLong_Type.tp_name, uint_max, test_var);
   53898           0 :                                 return -1;
   53899             :                         }
   53900           0 :                         object->in.validation_level = test_var;
   53901             :                 } else {
   53902           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   53903             :                           PyLong_Type.tp_name);
   53904           0 :                         return -1;
   53905             :                 }
   53906             :         }
   53907           0 :         return 0;
   53908             : }
   53909             : 
   53910           0 : static PyObject *py_netr_LogonSamLogonEx_out_get_validation(PyObject *obj, void *closure)
   53911             : {
   53912           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(obj);
   53913             :         PyObject *py_validation;
   53914           0 :         if (object->out.validation == NULL) {
   53915           0 :                 Py_RETURN_NONE;
   53916             :         }
   53917           0 :         py_validation = pyrpc_import_union(&netr_Validation_Type, object->out.validation, object->in.validation_level, object->out.validation, "union netr_Validation");
   53918           0 :         if (py_validation == NULL) {
   53919           0 :                 return NULL;
   53920             :         }
   53921           0 :         return py_validation;
   53922             : }
   53923             : 
   53924           0 : static int py_netr_LogonSamLogonEx_out_set_validation(PyObject *py_obj, PyObject *value, void *closure)
   53925             : {
   53926           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   53927           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.validation));
   53928           0 :         if (value == NULL) {
   53929           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.validation");
   53930           0 :                 return -1;
   53931             :         }
   53932           0 :         object->out.validation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.validation);
   53933           0 :         if (object->out.validation == NULL) {
   53934           0 :                 PyErr_NoMemory();
   53935           0 :                 return -1;
   53936             :         }
   53937             :         {
   53938             :                 union netr_Validation *validation_switch_1;
   53939           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");
   53940           0 :                 if (validation_switch_1 == NULL) {
   53941           0 :                         return -1;
   53942             :                 }
   53943           0 :                 object->out.validation = validation_switch_1;
   53944             :         }
   53945           0 :         return 0;
   53946             : }
   53947             : 
   53948           0 : static PyObject *py_netr_LogonSamLogonEx_out_get_authoritative(PyObject *obj, void *closure)
   53949             : {
   53950           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(obj);
   53951             :         PyObject *py_authoritative;
   53952           0 :         if (object->out.authoritative == NULL) {
   53953           0 :                 Py_RETURN_NONE;
   53954             :         }
   53955           0 :         py_authoritative = PyLong_FromLong((uint16_t)*object->out.authoritative);
   53956           0 :         return py_authoritative;
   53957             : }
   53958             : 
   53959           0 : static int py_netr_LogonSamLogonEx_out_set_authoritative(PyObject *py_obj, PyObject *value, void *closure)
   53960             : {
   53961           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   53962           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.authoritative));
   53963           0 :         if (value == NULL) {
   53964           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.authoritative");
   53965           0 :                 return -1;
   53966             :         }
   53967           0 :         object->out.authoritative = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.authoritative);
   53968           0 :         if (object->out.authoritative == NULL) {
   53969           0 :                 PyErr_NoMemory();
   53970           0 :                 return -1;
   53971             :         }
   53972             :         {
   53973           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.authoritative));
   53974           0 :                 if (PyLong_Check(value)) {
   53975             :                         unsigned long long test_var;
   53976           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   53977           0 :                         if (PyErr_Occurred() != NULL) {
   53978           0 :                                 return -1;
   53979             :                         }
   53980           0 :                         if (test_var > uint_max) {
   53981           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   53982             :                                   PyLong_Type.tp_name, uint_max, test_var);
   53983           0 :                                 return -1;
   53984             :                         }
   53985           0 :                         *object->out.authoritative = test_var;
   53986             :                 } else {
   53987           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   53988             :                           PyLong_Type.tp_name);
   53989           0 :                         return -1;
   53990             :                 }
   53991             :         }
   53992           0 :         return 0;
   53993             : }
   53994             : 
   53995           0 : static PyObject *py_netr_LogonSamLogonEx_in_get_flags(PyObject *obj, void *closure)
   53996             : {
   53997           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(obj);
   53998             :         PyObject *py_flags;
   53999           0 :         if (object->in.flags == NULL) {
   54000           0 :                 Py_RETURN_NONE;
   54001             :         }
   54002           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)*object->in.flags);
   54003           0 :         return py_flags;
   54004             : }
   54005             : 
   54006           0 : static int py_netr_LogonSamLogonEx_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   54007             : {
   54008           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   54009           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.flags));
   54010           0 :         if (value == NULL) {
   54011           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   54012           0 :                 return -1;
   54013             :         }
   54014           0 :         object->in.flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.flags);
   54015           0 :         if (object->in.flags == NULL) {
   54016           0 :                 PyErr_NoMemory();
   54017           0 :                 return -1;
   54018             :         }
   54019             :         {
   54020           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.flags));
   54021           0 :                 if (PyLong_Check(value)) {
   54022             :                         unsigned long long test_var;
   54023           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   54024           0 :                         if (PyErr_Occurred() != NULL) {
   54025           0 :                                 return -1;
   54026             :                         }
   54027           0 :                         if (test_var > uint_max) {
   54028           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   54029             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54030           0 :                                 return -1;
   54031             :                         }
   54032           0 :                         *object->in.flags = test_var;
   54033             :                 } else {
   54034           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   54035             :                           PyLong_Type.tp_name);
   54036           0 :                         return -1;
   54037             :                 }
   54038             :         }
   54039           0 :         return 0;
   54040             : }
   54041             : 
   54042           0 : static PyObject *py_netr_LogonSamLogonEx_out_get_flags(PyObject *obj, void *closure)
   54043             : {
   54044           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(obj);
   54045             :         PyObject *py_flags;
   54046           0 :         if (object->out.flags == NULL) {
   54047           0 :                 Py_RETURN_NONE;
   54048             :         }
   54049           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)*object->out.flags);
   54050           0 :         return py_flags;
   54051             : }
   54052             : 
   54053           0 : static int py_netr_LogonSamLogonEx_out_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   54054             : {
   54055           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   54056           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.flags));
   54057           0 :         if (value == NULL) {
   54058           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.flags");
   54059           0 :                 return -1;
   54060             :         }
   54061           0 :         object->out.flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.flags);
   54062           0 :         if (object->out.flags == NULL) {
   54063           0 :                 PyErr_NoMemory();
   54064           0 :                 return -1;
   54065             :         }
   54066             :         {
   54067           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.flags));
   54068           0 :                 if (PyLong_Check(value)) {
   54069             :                         unsigned long long test_var;
   54070           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   54071           0 :                         if (PyErr_Occurred() != NULL) {
   54072           0 :                                 return -1;
   54073             :                         }
   54074           0 :                         if (test_var > uint_max) {
   54075           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   54076             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54077           0 :                                 return -1;
   54078             :                         }
   54079           0 :                         *object->out.flags = test_var;
   54080             :                 } else {
   54081           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   54082             :                           PyLong_Type.tp_name);
   54083           0 :                         return -1;
   54084             :                 }
   54085             :         }
   54086           0 :         return 0;
   54087             : }
   54088             : 
   54089           0 : static PyObject *py_netr_LogonSamLogonEx_get_result(PyObject *obj, void *closure)
   54090             : {
   54091           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(obj);
   54092             :         PyObject *py_result;
   54093           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   54094           0 :         return py_result;
   54095             : }
   54096             : 
   54097           0 : static int py_netr_LogonSamLogonEx_set_result(PyObject *py_obj, PyObject *value, void *closure)
   54098             : {
   54099           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   54100           0 :         if (value == NULL) {
   54101           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   54102           0 :                 return -1;
   54103             :         }
   54104           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   54105           0 :         return 0;
   54106             : }
   54107             : 
   54108             : static PyGetSetDef py_netr_LogonSamLogonEx_getsetters[] = {
   54109             :         {
   54110             :                 .name = discard_const_p(char, "in_server_name"),
   54111             :                 .get = py_netr_LogonSamLogonEx_in_get_server_name,
   54112             :                 .set = py_netr_LogonSamLogonEx_in_set_server_name,
   54113             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   54114             :         },
   54115             :         {
   54116             :                 .name = discard_const_p(char, "in_computer_name"),
   54117             :                 .get = py_netr_LogonSamLogonEx_in_get_computer_name,
   54118             :                 .set = py_netr_LogonSamLogonEx_in_set_computer_name,
   54119             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   54120             :         },
   54121             :         {
   54122             :                 .name = discard_const_p(char, "in_logon_level"),
   54123             :                 .get = py_netr_LogonSamLogonEx_in_get_logon_level,
   54124             :                 .set = py_netr_LogonSamLogonEx_in_set_logon_level,
   54125             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonInfoClass")
   54126             :         },
   54127             :         {
   54128             :                 .name = discard_const_p(char, "in_logon"),
   54129             :                 .get = py_netr_LogonSamLogonEx_in_get_logon,
   54130             :                 .set = py_netr_LogonSamLogonEx_in_set_logon,
   54131             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonLevel")
   54132             :         },
   54133             :         {
   54134             :                 .name = discard_const_p(char, "in_validation_level"),
   54135             :                 .get = py_netr_LogonSamLogonEx_in_get_validation_level,
   54136             :                 .set = py_netr_LogonSamLogonEx_in_set_validation_level,
   54137             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   54138             :         },
   54139             :         {
   54140             :                 .name = discard_const_p(char, "out_validation"),
   54141             :                 .get = py_netr_LogonSamLogonEx_out_get_validation,
   54142             :                 .set = py_netr_LogonSamLogonEx_out_set_validation,
   54143             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Validation")
   54144             :         },
   54145             :         {
   54146             :                 .name = discard_const_p(char, "out_authoritative"),
   54147             :                 .get = py_netr_LogonSamLogonEx_out_get_authoritative,
   54148             :                 .set = py_netr_LogonSamLogonEx_out_set_authoritative,
   54149             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   54150             :         },
   54151             :         {
   54152             :                 .name = discard_const_p(char, "in_flags"),
   54153             :                 .get = py_netr_LogonSamLogonEx_in_get_flags,
   54154             :                 .set = py_netr_LogonSamLogonEx_in_set_flags,
   54155             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonSamLogon_flags")
   54156             :         },
   54157             :         {
   54158             :                 .name = discard_const_p(char, "out_flags"),
   54159             :                 .get = py_netr_LogonSamLogonEx_out_get_flags,
   54160             :                 .set = py_netr_LogonSamLogonEx_out_set_flags,
   54161             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonSamLogon_flags")
   54162             :         },
   54163             :         {
   54164             :                 .name = discard_const_p(char, "result"),
   54165             :                 .get = py_netr_LogonSamLogonEx_get_result,
   54166             :                 .set = py_netr_LogonSamLogonEx_set_result,
   54167             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   54168             :         },
   54169             :         { .name = NULL }
   54170             : };
   54171             : 
   54172           0 : static PyObject *py_netr_LogonSamLogonEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   54173             : {
   54174           0 :         PyObject *self = pytalloc_new(struct netr_LogonSamLogonEx, type);
   54175           0 :         struct netr_LogonSamLogonEx *_self = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(self);
   54176           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   54177           0 :         _self->in.logon = talloc_zero(mem_ctx, union netr_LogonLevel);
   54178           0 :         _self->out.validation = talloc_zero(mem_ctx, union netr_Validation);
   54179           0 :         _self->out.authoritative = talloc_zero(mem_ctx, uint8_t);
   54180           0 :         _self->in.flags = talloc_zero(mem_ctx, uint32_t);
   54181           0 :         _self->out.flags = talloc_zero(mem_ctx, uint32_t);
   54182           0 :         return self;
   54183             : }
   54184             : 
   54185           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   54186             : {
   54187             : 
   54188             : 
   54189           0 :         return PyLong_FromLong(39);
   54190             : }
   54191             : 
   54192           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   54193             : {
   54194           0 :         const struct ndr_interface_call *call = NULL;
   54195           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   54196           0 :         PyObject *ret = NULL;
   54197           0 :         struct ndr_push *push = NULL;
   54198             :         DATA_BLOB blob;
   54199             :         enum ndr_err_code err;
   54200             : 
   54201           0 :         if (ndr_table_netlogon.num_calls < 40) {
   54202           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogonEx_ndr_pack");
   54203           0 :                 return NULL;
   54204             :         }
   54205           0 :         call = &ndr_table_netlogon.calls[39];
   54206             : 
   54207           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   54208           0 :         if (push == NULL) {
   54209           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   54210           0 :                 return NULL;
   54211             :         }
   54212             : 
   54213           0 :         push->flags |= ndr_push_flags;
   54214             : 
   54215           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   54216           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   54217           0 :                 TALLOC_FREE(push);
   54218           0 :                 PyErr_SetNdrError(err);
   54219           0 :                 return NULL;
   54220             :         }
   54221           0 :         blob = ndr_push_blob(push);
   54222           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   54223           0 :         TALLOC_FREE(push);
   54224           0 :         return ret;
   54225             : }
   54226             : 
   54227           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   54228             : {
   54229           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   54230           0 :         PyObject *bigendian_obj = NULL;
   54231           0 :         PyObject *ndr64_obj = NULL;
   54232           0 :         uint32_t ndr_push_flags = 0;
   54233             : 
   54234           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   54235             :                 discard_const_p(char *, kwnames),
   54236             :                 &bigendian_obj,
   54237             :                 &ndr64_obj)) {
   54238           0 :                 return NULL;
   54239             :         }
   54240             : 
   54241           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   54242           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   54243             :         }
   54244           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   54245           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   54246             :         }
   54247             : 
   54248           0 :         return py_netr_LogonSamLogonEx_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   54249             : }
   54250             : 
   54251           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   54252             : {
   54253           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   54254           0 :         PyObject *bigendian_obj = NULL;
   54255           0 :         PyObject *ndr64_obj = NULL;
   54256           0 :         uint32_t ndr_push_flags = 0;
   54257             : 
   54258           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   54259             :                 discard_const_p(char *, kwnames),
   54260             :                 &bigendian_obj,
   54261             :                 &ndr64_obj)) {
   54262           0 :                 return NULL;
   54263             :         }
   54264             : 
   54265           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   54266           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   54267             :         }
   54268           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   54269           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   54270             :         }
   54271             : 
   54272           0 :         return py_netr_LogonSamLogonEx_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   54273             : }
   54274             : 
   54275           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   54276             : {
   54277           0 :         const struct ndr_interface_call *call = NULL;
   54278           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   54279           0 :         struct ndr_pull *pull = NULL;
   54280             :         enum ndr_err_code err;
   54281             : 
   54282           0 :         if (ndr_table_netlogon.num_calls < 40) {
   54283           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogonEx_ndr_unpack");
   54284           0 :                 return NULL;
   54285             :         }
   54286           0 :         call = &ndr_table_netlogon.calls[39];
   54287             : 
   54288           0 :         pull = ndr_pull_init_blob(blob, object);
   54289           0 :         if (pull == NULL) {
   54290           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   54291           0 :                 return NULL;
   54292             :         }
   54293             : 
   54294           0 :         pull->flags |= ndr_pull_flags;
   54295             : 
   54296           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   54297           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   54298           0 :                 TALLOC_FREE(pull);
   54299           0 :                 PyErr_SetNdrError(err);
   54300           0 :                 return NULL;
   54301             :         }
   54302           0 :         if (!allow_remaining) {
   54303             :                 uint32_t highest_ofs;
   54304             : 
   54305           0 :                 if (pull->offset > pull->relative_highest_offset) {
   54306           0 :                         highest_ofs = pull->offset;
   54307             :                 } else {
   54308           0 :                         highest_ofs = pull->relative_highest_offset;
   54309             :                 }
   54310           0 :                 if (highest_ofs < pull->data_size) {
   54311           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   54312             :                                 "not all bytes consumed ofs[%u] size[%u]",
   54313             :                                 highest_ofs, pull->data_size);
   54314           0 :                         TALLOC_FREE(pull);
   54315           0 :                         PyErr_SetNdrError(err);
   54316           0 :                         return NULL;
   54317             :                 }
   54318             :         }
   54319             : 
   54320           0 :         TALLOC_FREE(pull);
   54321           0 :         Py_RETURN_NONE;
   54322             : }
   54323             : 
   54324           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   54325             : {
   54326             :         DATA_BLOB blob;
   54327           0 :         Py_ssize_t blob_length = 0;
   54328           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   54329           0 :         PyObject *bigendian_obj = NULL;
   54330           0 :         PyObject *ndr64_obj = NULL;
   54331           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   54332           0 :         PyObject *allow_remaining_obj = NULL;
   54333           0 :         bool allow_remaining = false;
   54334             : 
   54335           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   54336             :                 discard_const_p(char *, kwnames),
   54337             :                 &blob.data, &blob_length,
   54338             :                 &bigendian_obj,
   54339             :                 &ndr64_obj,
   54340             :                 &allow_remaining_obj)) {
   54341           0 :                 return NULL;
   54342             :         }
   54343           0 :         blob.length = blob_length;
   54344             : 
   54345           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   54346           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   54347             :         }
   54348           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   54349           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   54350             :         }
   54351             : 
   54352           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   54353           0 :                 allow_remaining = true;
   54354             :         }
   54355             : 
   54356           0 :         return py_netr_LogonSamLogonEx_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   54357             : }
   54358             : 
   54359           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   54360             : {
   54361             :         DATA_BLOB blob;
   54362           0 :         Py_ssize_t blob_length = 0;
   54363           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   54364           0 :         PyObject *bigendian_obj = NULL;
   54365           0 :         PyObject *ndr64_obj = NULL;
   54366           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   54367           0 :         PyObject *allow_remaining_obj = NULL;
   54368           0 :         bool allow_remaining = false;
   54369             : 
   54370           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   54371             :                 discard_const_p(char *, kwnames),
   54372             :                 &blob.data, &blob_length,
   54373             :                 &bigendian_obj,
   54374             :                 &ndr64_obj,
   54375             :                 &allow_remaining_obj)) {
   54376           0 :                 return NULL;
   54377             :         }
   54378           0 :         blob.length = blob_length;
   54379             : 
   54380           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   54381           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   54382             :         }
   54383           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   54384           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   54385             :         }
   54386             : 
   54387           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   54388           0 :                 allow_remaining = true;
   54389             :         }
   54390             : 
   54391           0 :         return py_netr_LogonSamLogonEx_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   54392             : }
   54393             : 
   54394           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   54395             : {
   54396           0 :         const struct ndr_interface_call *call = NULL;
   54397           0 :         struct netr_LogonSamLogonEx *object = (struct netr_LogonSamLogonEx *)pytalloc_get_ptr(py_obj);
   54398             :         PyObject *ret;
   54399             :         char *retstr;
   54400             : 
   54401           0 :         if (ndr_table_netlogon.num_calls < 40) {
   54402           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogonEx_ndr_print");
   54403           0 :                 return NULL;
   54404             :         }
   54405           0 :         call = &ndr_table_netlogon.calls[39];
   54406             : 
   54407           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   54408           0 :         ret = PyUnicode_FromString(retstr);
   54409           0 :         TALLOC_FREE(retstr);
   54410             : 
   54411           0 :         return ret;
   54412             : }
   54413             : 
   54414           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   54415             : {
   54416           0 :         return py_netr_LogonSamLogonEx_ndr_print(py_obj, "netr_LogonSamLogonEx_in", NDR_IN);
   54417             : }
   54418             : 
   54419           0 : static PyObject *py_netr_LogonSamLogonEx_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   54420             : {
   54421           0 :         return py_netr_LogonSamLogonEx_ndr_print(py_obj, "netr_LogonSamLogonEx_out", NDR_OUT);
   54422             : }
   54423             : 
   54424             : static PyMethodDef py_netr_LogonSamLogonEx_methods[] = {
   54425             :         { "opnum", (PyCFunction)py_netr_LogonSamLogonEx_ndr_opnum, METH_NOARGS|METH_CLASS,
   54426             :                 "netlogon.netr_LogonSamLogonEx.opnum() -> 39 (0x27) " },
   54427             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonEx_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   54428             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   54429             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonEx_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   54430             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   54431             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonEx_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   54432             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   54433             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonEx_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   54434             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   54435             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonSamLogonEx_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   54436             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonSamLogonEx_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   54437             :         { NULL, NULL, 0, NULL }
   54438             : };
   54439             : 
   54440             : 
   54441             : static PyTypeObject netr_LogonSamLogonEx_Type = {
   54442             :         PyVarObject_HEAD_INIT(NULL, 0)
   54443             :         .tp_name = "netlogon.netr_LogonSamLogonEx",
   54444             :         .tp_getset = py_netr_LogonSamLogonEx_getsetters,
   54445             :         .tp_methods = py_netr_LogonSamLogonEx_methods,
   54446             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   54447             :         .tp_new = py_netr_LogonSamLogonEx_new,
   54448             : };
   54449             : 
   54450          15 : static bool pack_py_netr_LogonSamLogonEx_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonSamLogonEx *r)
   54451             : {
   54452             :         PyObject *py_server_name;
   54453             :         PyObject *py_computer_name;
   54454             :         PyObject *py_logon_level;
   54455             :         PyObject *py_logon;
   54456             :         PyObject *py_validation_level;
   54457             :         PyObject *py_flags;
   54458          15 :         const char *kwnames[] = {
   54459             :                 "server_name", "computer_name", "logon_level", "logon", "validation_level", "flags", NULL
   54460             :         };
   54461             : 
   54462          15 :         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)) {
   54463           0 :                 return false;
   54464             :         }
   54465             : 
   54466          15 :         if (py_server_name == NULL) {
   54467           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   54468           0 :                 return false;
   54469             :         }
   54470          15 :         if (py_server_name == Py_None) {
   54471           0 :                 r->in.server_name = NULL;
   54472             :         } else {
   54473          15 :                 r->in.server_name = NULL;
   54474             :                 {
   54475             :                         const char *test_str;
   54476             :                         const char *talloc_str;
   54477          15 :                         PyObject *unicode = NULL;
   54478          15 :                         if (PyUnicode_Check(py_server_name)) {
   54479          15 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   54480          15 :                                 if (unicode == NULL) {
   54481           0 :                                         PyErr_NoMemory();
   54482           0 :                                         return false;
   54483             :                                 }
   54484          15 :                                 test_str = PyBytes_AS_STRING(unicode);
   54485           0 :                         } else if (PyBytes_Check(py_server_name)) {
   54486           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   54487             :                         } else {
   54488           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   54489           0 :                                 return false;
   54490             :                         }
   54491          15 :                         talloc_str = talloc_strdup(r, test_str);
   54492          15 :                         if (unicode != NULL) {
   54493          15 :                                 Py_DECREF(unicode);
   54494             :                         }
   54495          15 :                         if (talloc_str == NULL) {
   54496           0 :                                 PyErr_NoMemory();
   54497           0 :                                 return false;
   54498             :                         }
   54499          15 :                         r->in.server_name = talloc_str;
   54500             :                 }
   54501             :         }
   54502          15 :         if (py_computer_name == NULL) {
   54503           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   54504           0 :                 return false;
   54505             :         }
   54506          15 :         if (py_computer_name == Py_None) {
   54507           0 :                 r->in.computer_name = NULL;
   54508             :         } else {
   54509          15 :                 r->in.computer_name = NULL;
   54510             :                 {
   54511             :                         const char *test_str;
   54512             :                         const char *talloc_str;
   54513          15 :                         PyObject *unicode = NULL;
   54514          15 :                         if (PyUnicode_Check(py_computer_name)) {
   54515          15 :                                 unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   54516          15 :                                 if (unicode == NULL) {
   54517           0 :                                         PyErr_NoMemory();
   54518           0 :                                         return false;
   54519             :                                 }
   54520          15 :                                 test_str = PyBytes_AS_STRING(unicode);
   54521           0 :                         } else if (PyBytes_Check(py_computer_name)) {
   54522           0 :                                 test_str = PyBytes_AS_STRING(py_computer_name);
   54523             :                         } else {
   54524           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   54525           0 :                                 return false;
   54526             :                         }
   54527          15 :                         talloc_str = talloc_strdup(r, test_str);
   54528          15 :                         if (unicode != NULL) {
   54529          15 :                                 Py_DECREF(unicode);
   54530             :                         }
   54531          15 :                         if (talloc_str == NULL) {
   54532           0 :                                 PyErr_NoMemory();
   54533           0 :                                 return false;
   54534             :                         }
   54535          15 :                         r->in.computer_name = talloc_str;
   54536             :                 }
   54537             :         }
   54538          15 :         if (py_logon_level == NULL) {
   54539           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_level");
   54540           0 :                 return false;
   54541             :         }
   54542             :         {
   54543          15 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.logon_level));
   54544          15 :                 if (PyLong_Check(py_logon_level)) {
   54545             :                         unsigned long long test_var;
   54546          15 :                         test_var = PyLong_AsUnsignedLongLong(py_logon_level);
   54547          15 :                         if (PyErr_Occurred() != NULL) {
   54548           0 :                                 return false;
   54549             :                         }
   54550          15 :                         if (test_var > uint_max) {
   54551           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   54552             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54553           0 :                                 return false;
   54554             :                         }
   54555          15 :                         r->in.logon_level = test_var;
   54556             :                 } else {
   54557           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   54558             :                           PyLong_Type.tp_name);
   54559           0 :                         return false;
   54560             :                 }
   54561             :         }
   54562          15 :         if (py_logon == NULL) {
   54563           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon");
   54564           0 :                 return false;
   54565             :         }
   54566          15 :         r->in.logon = talloc_ptrtype(r, r->in.logon);
   54567          15 :         if (r->in.logon == NULL) {
   54568           0 :                 PyErr_NoMemory();
   54569           0 :                 return false;
   54570             :         }
   54571             :         {
   54572             :                 union netr_LogonLevel *logon_switch_1;
   54573          15 :                 logon_switch_1 = (union netr_LogonLevel *)pyrpc_export_union(&netr_LogonLevel_Type, r, r->in.logon_level, py_logon, "union netr_LogonLevel");
   54574          15 :                 if (logon_switch_1 == NULL) {
   54575           0 :                         return false;
   54576             :                 }
   54577          15 :                 r->in.logon = logon_switch_1;
   54578             :         }
   54579          15 :         if (py_validation_level == NULL) {
   54580           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.validation_level");
   54581           0 :                 return false;
   54582             :         }
   54583             :         {
   54584          15 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.validation_level));
   54585          15 :                 if (PyLong_Check(py_validation_level)) {
   54586             :                         unsigned long long test_var;
   54587          15 :                         test_var = PyLong_AsUnsignedLongLong(py_validation_level);
   54588          15 :                         if (PyErr_Occurred() != NULL) {
   54589           0 :                                 return false;
   54590             :                         }
   54591          15 :                         if (test_var > uint_max) {
   54592           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   54593             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54594           0 :                                 return false;
   54595             :                         }
   54596          15 :                         r->in.validation_level = test_var;
   54597             :                 } else {
   54598           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   54599             :                           PyLong_Type.tp_name);
   54600           0 :                         return false;
   54601             :                 }
   54602             :         }
   54603          15 :         if (py_flags == NULL) {
   54604           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   54605           0 :                 return false;
   54606             :         }
   54607          15 :         r->in.flags = talloc_ptrtype(r, r->in.flags);
   54608          15 :         if (r->in.flags == NULL) {
   54609           0 :                 PyErr_NoMemory();
   54610           0 :                 return false;
   54611             :         }
   54612             :         {
   54613          15 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.flags));
   54614          15 :                 if (PyLong_Check(py_flags)) {
   54615             :                         unsigned long long test_var;
   54616          15 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   54617          15 :                         if (PyErr_Occurred() != NULL) {
   54618           0 :                                 return false;
   54619             :                         }
   54620          15 :                         if (test_var > uint_max) {
   54621           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   54622             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54623           0 :                                 return false;
   54624             :                         }
   54625          15 :                         *r->in.flags = test_var;
   54626             :                 } else {
   54627           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   54628             :                           PyLong_Type.tp_name);
   54629           0 :                         return false;
   54630             :                 }
   54631             :         }
   54632          15 :         return true;
   54633             : }
   54634             : 
   54635          15 : static PyObject *unpack_py_netr_LogonSamLogonEx_args_out(struct netr_LogonSamLogonEx *r)
   54636             : {
   54637             :         PyObject *result;
   54638             :         PyObject *py_validation;
   54639             :         PyObject *py_authoritative;
   54640             :         PyObject *py_flags;
   54641          15 :         result = PyTuple_New(3);
   54642          15 :         py_validation = pyrpc_import_union(&netr_Validation_Type, r->out.validation, r->in.validation_level, r->out.validation, "union netr_Validation");
   54643          15 :         if (py_validation == NULL) {
   54644           0 :                 return NULL;
   54645             :         }
   54646          15 :         PyTuple_SetItem(result, 0, py_validation);
   54647          15 :         py_authoritative = PyLong_FromLong((uint16_t)*r->out.authoritative);
   54648          15 :         PyTuple_SetItem(result, 1, py_authoritative);
   54649          15 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)*r->out.flags);
   54650          15 :         PyTuple_SetItem(result, 2, py_flags);
   54651          15 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   54652           3 :                 PyErr_SetNTSTATUS(r->out.result);
   54653           3 :                 return NULL;
   54654             :         }
   54655             : 
   54656          12 :         return result;
   54657             : }
   54658             : 
   54659             : 
   54660           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_in_get_server_name(PyObject *obj, void *closure)
   54661             : {
   54662           0 :         struct netr_DsrEnumerateDomainTrusts *object = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(obj);
   54663             :         PyObject *py_server_name;
   54664           0 :         if (object->in.server_name == NULL) {
   54665           0 :                 Py_RETURN_NONE;
   54666             :         }
   54667           0 :         if (object->in.server_name == NULL) {
   54668           0 :                 py_server_name = Py_None;
   54669           0 :                 Py_INCREF(py_server_name);
   54670             :         } else {
   54671           0 :                 if (object->in.server_name == NULL) {
   54672           0 :                         py_server_name = Py_None;
   54673           0 :                         Py_INCREF(py_server_name);
   54674             :                 } else {
   54675           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   54676             :                 }
   54677             :         }
   54678           0 :         return py_server_name;
   54679             : }
   54680             : 
   54681           0 : static int py_netr_DsrEnumerateDomainTrusts_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   54682             : {
   54683           0 :         struct netr_DsrEnumerateDomainTrusts *object = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(py_obj);
   54684           0 :         if (value == NULL) {
   54685           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   54686           0 :                 return -1;
   54687             :         }
   54688           0 :         if (value == Py_None) {
   54689           0 :                 object->in.server_name = NULL;
   54690             :         } else {
   54691           0 :                 object->in.server_name = NULL;
   54692             :                 {
   54693             :                         const char *test_str;
   54694             :                         const char *talloc_str;
   54695           0 :                         PyObject *unicode = NULL;
   54696           0 :                         if (PyUnicode_Check(value)) {
   54697           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   54698           0 :                                 if (unicode == NULL) {
   54699           0 :                                         PyErr_NoMemory();
   54700           0 :                                         return -1;
   54701             :                                 }
   54702           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   54703           0 :                         } else if (PyBytes_Check(value)) {
   54704           0 :                                 test_str = PyBytes_AS_STRING(value);
   54705             :                         } else {
   54706           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   54707           0 :                                 return -1;
   54708             :                         }
   54709           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   54710           0 :                         if (unicode != NULL) {
   54711           0 :                                 Py_DECREF(unicode);
   54712             :                         }
   54713           0 :                         if (talloc_str == NULL) {
   54714           0 :                                 PyErr_NoMemory();
   54715           0 :                                 return -1;
   54716             :                         }
   54717           0 :                         object->in.server_name = talloc_str;
   54718             :                 }
   54719             :         }
   54720           0 :         return 0;
   54721             : }
   54722             : 
   54723           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_in_get_trust_flags(PyObject *obj, void *closure)
   54724             : {
   54725           0 :         struct netr_DsrEnumerateDomainTrusts *object = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(obj);
   54726             :         PyObject *py_trust_flags;
   54727           0 :         py_trust_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.trust_flags);
   54728           0 :         return py_trust_flags;
   54729             : }
   54730             : 
   54731           0 : static int py_netr_DsrEnumerateDomainTrusts_in_set_trust_flags(PyObject *py_obj, PyObject *value, void *closure)
   54732             : {
   54733           0 :         struct netr_DsrEnumerateDomainTrusts *object = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(py_obj);
   54734           0 :         if (value == NULL) {
   54735           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.trust_flags");
   54736           0 :                 return -1;
   54737             :         }
   54738             :         {
   54739           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.trust_flags));
   54740           0 :                 if (PyLong_Check(value)) {
   54741             :                         unsigned long long test_var;
   54742           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   54743           0 :                         if (PyErr_Occurred() != NULL) {
   54744           0 :                                 return -1;
   54745             :                         }
   54746           0 :                         if (test_var > uint_max) {
   54747           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   54748             :                                   PyLong_Type.tp_name, uint_max, test_var);
   54749           0 :                                 return -1;
   54750             :                         }
   54751           0 :                         object->in.trust_flags = test_var;
   54752             :                 } else {
   54753           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   54754             :                           PyLong_Type.tp_name);
   54755           0 :                         return -1;
   54756             :                 }
   54757             :         }
   54758           0 :         return 0;
   54759             : }
   54760             : 
   54761           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_out_get_trusts(PyObject *obj, void *closure)
   54762             : {
   54763           0 :         struct netr_DsrEnumerateDomainTrusts *object = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(obj);
   54764             :         PyObject *py_trusts;
   54765           0 :         if (object->out.trusts == NULL) {
   54766           0 :                 Py_RETURN_NONE;
   54767             :         }
   54768           0 :         py_trusts = pytalloc_reference_ex(&netr_DomainTrustList_Type, object->out.trusts, object->out.trusts);
   54769           0 :         return py_trusts;
   54770             : }
   54771             : 
   54772           0 : static int py_netr_DsrEnumerateDomainTrusts_out_set_trusts(PyObject *py_obj, PyObject *value, void *closure)
   54773             : {
   54774           0 :         struct netr_DsrEnumerateDomainTrusts *object = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(py_obj);
   54775           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.trusts));
   54776           0 :         if (value == NULL) {
   54777           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.trusts");
   54778           0 :                 return -1;
   54779             :         }
   54780           0 :         object->out.trusts = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.trusts);
   54781           0 :         if (object->out.trusts == NULL) {
   54782           0 :                 PyErr_NoMemory();
   54783           0 :                 return -1;
   54784             :         }
   54785           0 :         PY_CHECK_TYPE(&netr_DomainTrustList_Type, value, return -1;);
   54786           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   54787           0 :                 PyErr_NoMemory();
   54788           0 :                 return -1;
   54789             :         }
   54790           0 :         object->out.trusts = (struct netr_DomainTrustList *)pytalloc_get_ptr(value);
   54791           0 :         return 0;
   54792             : }
   54793             : 
   54794           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_get_result(PyObject *obj, void *closure)
   54795             : {
   54796           0 :         struct netr_DsrEnumerateDomainTrusts *object = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(obj);
   54797             :         PyObject *py_result;
   54798           0 :         py_result = PyErr_FromWERROR(object->out.result);
   54799           0 :         return py_result;
   54800             : }
   54801             : 
   54802           0 : static int py_netr_DsrEnumerateDomainTrusts_set_result(PyObject *py_obj, PyObject *value, void *closure)
   54803             : {
   54804           0 :         struct netr_DsrEnumerateDomainTrusts *object = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(py_obj);
   54805           0 :         if (value == NULL) {
   54806           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   54807           0 :                 return -1;
   54808             :         }
   54809           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   54810           0 :         return 0;
   54811             : }
   54812             : 
   54813             : static PyGetSetDef py_netr_DsrEnumerateDomainTrusts_getsetters[] = {
   54814             :         {
   54815             :                 .name = discard_const_p(char, "in_server_name"),
   54816             :                 .get = py_netr_DsrEnumerateDomainTrusts_in_get_server_name,
   54817             :                 .set = py_netr_DsrEnumerateDomainTrusts_in_set_server_name,
   54818             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   54819             :         },
   54820             :         {
   54821             :                 .name = discard_const_p(char, "in_trust_flags"),
   54822             :                 .get = py_netr_DsrEnumerateDomainTrusts_in_get_trust_flags,
   54823             :                 .set = py_netr_DsrEnumerateDomainTrusts_in_set_trust_flags,
   54824             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_TrustFlags")
   54825             :         },
   54826             :         {
   54827             :                 .name = discard_const_p(char, "out_trusts"),
   54828             :                 .get = py_netr_DsrEnumerateDomainTrusts_out_get_trusts,
   54829             :                 .set = py_netr_DsrEnumerateDomainTrusts_out_set_trusts,
   54830             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_DomainTrustList")
   54831             :         },
   54832             :         {
   54833             :                 .name = discard_const_p(char, "result"),
   54834             :                 .get = py_netr_DsrEnumerateDomainTrusts_get_result,
   54835             :                 .set = py_netr_DsrEnumerateDomainTrusts_set_result,
   54836             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   54837             :         },
   54838             :         { .name = NULL }
   54839             : };
   54840             : 
   54841           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   54842             : {
   54843           0 :         PyObject *self = pytalloc_new(struct netr_DsrEnumerateDomainTrusts, type);
   54844           0 :         struct netr_DsrEnumerateDomainTrusts *_self = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(self);
   54845           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   54846           0 :         _self->out.trusts = talloc_zero(mem_ctx, struct netr_DomainTrustList);
   54847           0 :         return self;
   54848             : }
   54849             : 
   54850           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   54851             : {
   54852             : 
   54853             : 
   54854           0 :         return PyLong_FromLong(40);
   54855             : }
   54856             : 
   54857           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   54858             : {
   54859           0 :         const struct ndr_interface_call *call = NULL;
   54860           0 :         struct netr_DsrEnumerateDomainTrusts *object = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(py_obj);
   54861           0 :         PyObject *ret = NULL;
   54862           0 :         struct ndr_push *push = NULL;
   54863             :         DATA_BLOB blob;
   54864             :         enum ndr_err_code err;
   54865             : 
   54866           0 :         if (ndr_table_netlogon.num_calls < 41) {
   54867           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrEnumerateDomainTrusts_ndr_pack");
   54868           0 :                 return NULL;
   54869             :         }
   54870           0 :         call = &ndr_table_netlogon.calls[40];
   54871             : 
   54872           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   54873           0 :         if (push == NULL) {
   54874           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   54875           0 :                 return NULL;
   54876             :         }
   54877             : 
   54878           0 :         push->flags |= ndr_push_flags;
   54879             : 
   54880           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   54881           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   54882           0 :                 TALLOC_FREE(push);
   54883           0 :                 PyErr_SetNdrError(err);
   54884           0 :                 return NULL;
   54885             :         }
   54886           0 :         blob = ndr_push_blob(push);
   54887           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   54888           0 :         TALLOC_FREE(push);
   54889           0 :         return ret;
   54890             : }
   54891             : 
   54892           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   54893             : {
   54894           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   54895           0 :         PyObject *bigendian_obj = NULL;
   54896           0 :         PyObject *ndr64_obj = NULL;
   54897           0 :         uint32_t ndr_push_flags = 0;
   54898             : 
   54899           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   54900             :                 discard_const_p(char *, kwnames),
   54901             :                 &bigendian_obj,
   54902             :                 &ndr64_obj)) {
   54903           0 :                 return NULL;
   54904             :         }
   54905             : 
   54906           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   54907           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   54908             :         }
   54909           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   54910           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   54911             :         }
   54912             : 
   54913           0 :         return py_netr_DsrEnumerateDomainTrusts_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   54914             : }
   54915             : 
   54916           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   54917             : {
   54918           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   54919           0 :         PyObject *bigendian_obj = NULL;
   54920           0 :         PyObject *ndr64_obj = NULL;
   54921           0 :         uint32_t ndr_push_flags = 0;
   54922             : 
   54923           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   54924             :                 discard_const_p(char *, kwnames),
   54925             :                 &bigendian_obj,
   54926             :                 &ndr64_obj)) {
   54927           0 :                 return NULL;
   54928             :         }
   54929             : 
   54930           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   54931           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   54932             :         }
   54933           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   54934           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   54935             :         }
   54936             : 
   54937           0 :         return py_netr_DsrEnumerateDomainTrusts_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   54938             : }
   54939             : 
   54940           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   54941             : {
   54942           0 :         const struct ndr_interface_call *call = NULL;
   54943           0 :         struct netr_DsrEnumerateDomainTrusts *object = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(py_obj);
   54944           0 :         struct ndr_pull *pull = NULL;
   54945             :         enum ndr_err_code err;
   54946             : 
   54947           0 :         if (ndr_table_netlogon.num_calls < 41) {
   54948           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrEnumerateDomainTrusts_ndr_unpack");
   54949           0 :                 return NULL;
   54950             :         }
   54951           0 :         call = &ndr_table_netlogon.calls[40];
   54952             : 
   54953           0 :         pull = ndr_pull_init_blob(blob, object);
   54954           0 :         if (pull == NULL) {
   54955           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   54956           0 :                 return NULL;
   54957             :         }
   54958             : 
   54959           0 :         pull->flags |= ndr_pull_flags;
   54960             : 
   54961           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   54962           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   54963           0 :                 TALLOC_FREE(pull);
   54964           0 :                 PyErr_SetNdrError(err);
   54965           0 :                 return NULL;
   54966             :         }
   54967           0 :         if (!allow_remaining) {
   54968             :                 uint32_t highest_ofs;
   54969             : 
   54970           0 :                 if (pull->offset > pull->relative_highest_offset) {
   54971           0 :                         highest_ofs = pull->offset;
   54972             :                 } else {
   54973           0 :                         highest_ofs = pull->relative_highest_offset;
   54974             :                 }
   54975           0 :                 if (highest_ofs < pull->data_size) {
   54976           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   54977             :                                 "not all bytes consumed ofs[%u] size[%u]",
   54978             :                                 highest_ofs, pull->data_size);
   54979           0 :                         TALLOC_FREE(pull);
   54980           0 :                         PyErr_SetNdrError(err);
   54981           0 :                         return NULL;
   54982             :                 }
   54983             :         }
   54984             : 
   54985           0 :         TALLOC_FREE(pull);
   54986           0 :         Py_RETURN_NONE;
   54987             : }
   54988             : 
   54989           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   54990             : {
   54991             :         DATA_BLOB blob;
   54992           0 :         Py_ssize_t blob_length = 0;
   54993           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   54994           0 :         PyObject *bigendian_obj = NULL;
   54995           0 :         PyObject *ndr64_obj = NULL;
   54996           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   54997           0 :         PyObject *allow_remaining_obj = NULL;
   54998           0 :         bool allow_remaining = false;
   54999             : 
   55000           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   55001             :                 discard_const_p(char *, kwnames),
   55002             :                 &blob.data, &blob_length,
   55003             :                 &bigendian_obj,
   55004             :                 &ndr64_obj,
   55005             :                 &allow_remaining_obj)) {
   55006           0 :                 return NULL;
   55007             :         }
   55008           0 :         blob.length = blob_length;
   55009             : 
   55010           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55011           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   55012             :         }
   55013           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55014           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   55015             :         }
   55016             : 
   55017           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   55018           0 :                 allow_remaining = true;
   55019             :         }
   55020             : 
   55021           0 :         return py_netr_DsrEnumerateDomainTrusts_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   55022             : }
   55023             : 
   55024           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55025             : {
   55026             :         DATA_BLOB blob;
   55027           0 :         Py_ssize_t blob_length = 0;
   55028           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   55029           0 :         PyObject *bigendian_obj = NULL;
   55030           0 :         PyObject *ndr64_obj = NULL;
   55031           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   55032           0 :         PyObject *allow_remaining_obj = NULL;
   55033           0 :         bool allow_remaining = false;
   55034             : 
   55035           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   55036             :                 discard_const_p(char *, kwnames),
   55037             :                 &blob.data, &blob_length,
   55038             :                 &bigendian_obj,
   55039             :                 &ndr64_obj,
   55040             :                 &allow_remaining_obj)) {
   55041           0 :                 return NULL;
   55042             :         }
   55043           0 :         blob.length = blob_length;
   55044             : 
   55045           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55046           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   55047             :         }
   55048           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55049           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   55050             :         }
   55051             : 
   55052           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   55053           0 :                 allow_remaining = true;
   55054             :         }
   55055             : 
   55056           0 :         return py_netr_DsrEnumerateDomainTrusts_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   55057             : }
   55058             : 
   55059           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   55060             : {
   55061           0 :         const struct ndr_interface_call *call = NULL;
   55062           0 :         struct netr_DsrEnumerateDomainTrusts *object = (struct netr_DsrEnumerateDomainTrusts *)pytalloc_get_ptr(py_obj);
   55063             :         PyObject *ret;
   55064             :         char *retstr;
   55065             : 
   55066           0 :         if (ndr_table_netlogon.num_calls < 41) {
   55067           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrEnumerateDomainTrusts_ndr_print");
   55068           0 :                 return NULL;
   55069             :         }
   55070           0 :         call = &ndr_table_netlogon.calls[40];
   55071             : 
   55072           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   55073           0 :         ret = PyUnicode_FromString(retstr);
   55074           0 :         TALLOC_FREE(retstr);
   55075             : 
   55076           0 :         return ret;
   55077             : }
   55078             : 
   55079           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   55080             : {
   55081           0 :         return py_netr_DsrEnumerateDomainTrusts_ndr_print(py_obj, "netr_DsrEnumerateDomainTrusts_in", NDR_IN);
   55082             : }
   55083             : 
   55084           0 : static PyObject *py_netr_DsrEnumerateDomainTrusts_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   55085             : {
   55086           0 :         return py_netr_DsrEnumerateDomainTrusts_ndr_print(py_obj, "netr_DsrEnumerateDomainTrusts_out", NDR_OUT);
   55087             : }
   55088             : 
   55089             : static PyMethodDef py_netr_DsrEnumerateDomainTrusts_methods[] = {
   55090             :         { "opnum", (PyCFunction)py_netr_DsrEnumerateDomainTrusts_ndr_opnum, METH_NOARGS|METH_CLASS,
   55091             :                 "netlogon.netr_DsrEnumerateDomainTrusts.opnum() -> 40 (0x28) " },
   55092             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrEnumerateDomainTrusts_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   55093             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   55094             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrEnumerateDomainTrusts_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   55095             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   55096             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrEnumerateDomainTrusts_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   55097             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   55098             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrEnumerateDomainTrusts_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   55099             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   55100             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsrEnumerateDomainTrusts_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   55101             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsrEnumerateDomainTrusts_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   55102             :         { NULL, NULL, 0, NULL }
   55103             : };
   55104             : 
   55105             : 
   55106             : static PyTypeObject netr_DsrEnumerateDomainTrusts_Type = {
   55107             :         PyVarObject_HEAD_INIT(NULL, 0)
   55108             :         .tp_name = "netlogon.netr_DsrEnumerateDomainTrusts",
   55109             :         .tp_getset = py_netr_DsrEnumerateDomainTrusts_getsetters,
   55110             :         .tp_methods = py_netr_DsrEnumerateDomainTrusts_methods,
   55111             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   55112             :         .tp_new = py_netr_DsrEnumerateDomainTrusts_new,
   55113             : };
   55114             : 
   55115          19 : static bool pack_py_netr_DsrEnumerateDomainTrusts_args_in(PyObject *args, PyObject *kwargs, struct netr_DsrEnumerateDomainTrusts *r)
   55116             : {
   55117             :         PyObject *py_server_name;
   55118             :         PyObject *py_trust_flags;
   55119          19 :         const char *kwnames[] = {
   55120             :                 "server_name", "trust_flags", NULL
   55121             :         };
   55122             : 
   55123          19 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:netr_DsrEnumerateDomainTrusts", discard_const_p(char *, kwnames), &py_server_name, &py_trust_flags)) {
   55124           0 :                 return false;
   55125             :         }
   55126             : 
   55127          19 :         if (py_server_name == NULL) {
   55128           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   55129           0 :                 return false;
   55130             :         }
   55131          19 :         if (py_server_name == Py_None) {
   55132           0 :                 r->in.server_name = NULL;
   55133             :         } else {
   55134          19 :                 r->in.server_name = NULL;
   55135             :                 {
   55136             :                         const char *test_str;
   55137             :                         const char *talloc_str;
   55138          19 :                         PyObject *unicode = NULL;
   55139          19 :                         if (PyUnicode_Check(py_server_name)) {
   55140          19 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   55141          19 :                                 if (unicode == NULL) {
   55142           0 :                                         PyErr_NoMemory();
   55143           0 :                                         return false;
   55144             :                                 }
   55145          19 :                                 test_str = PyBytes_AS_STRING(unicode);
   55146           0 :                         } else if (PyBytes_Check(py_server_name)) {
   55147           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   55148             :                         } else {
   55149           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   55150           0 :                                 return false;
   55151             :                         }
   55152          19 :                         talloc_str = talloc_strdup(r, test_str);
   55153          19 :                         if (unicode != NULL) {
   55154          19 :                                 Py_DECREF(unicode);
   55155             :                         }
   55156          19 :                         if (talloc_str == NULL) {
   55157           0 :                                 PyErr_NoMemory();
   55158           0 :                                 return false;
   55159             :                         }
   55160          19 :                         r->in.server_name = talloc_str;
   55161             :                 }
   55162             :         }
   55163          19 :         if (py_trust_flags == NULL) {
   55164           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.trust_flags");
   55165           0 :                 return false;
   55166             :         }
   55167             :         {
   55168          19 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.trust_flags));
   55169          19 :                 if (PyLong_Check(py_trust_flags)) {
   55170             :                         unsigned long long test_var;
   55171          19 :                         test_var = PyLong_AsUnsignedLongLong(py_trust_flags);
   55172          19 :                         if (PyErr_Occurred() != NULL) {
   55173           0 :                                 return false;
   55174             :                         }
   55175          19 :                         if (test_var > uint_max) {
   55176           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   55177             :                                   PyLong_Type.tp_name, uint_max, test_var);
   55178           0 :                                 return false;
   55179             :                         }
   55180          19 :                         r->in.trust_flags = test_var;
   55181             :                 } else {
   55182           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   55183             :                           PyLong_Type.tp_name);
   55184           0 :                         return false;
   55185             :                 }
   55186             :         }
   55187          19 :         return true;
   55188             : }
   55189             : 
   55190          19 : static PyObject *unpack_py_netr_DsrEnumerateDomainTrusts_args_out(struct netr_DsrEnumerateDomainTrusts *r)
   55191             : {
   55192             :         PyObject *result;
   55193             :         PyObject *py_trusts;
   55194          19 :         py_trusts = pytalloc_reference_ex(&netr_DomainTrustList_Type, r->out.trusts, r->out.trusts);
   55195          19 :         result = py_trusts;
   55196          19 :         if (!W_ERROR_IS_OK(r->out.result)) {
   55197           0 :                 PyErr_SetWERROR(r->out.result);
   55198           0 :                 return NULL;
   55199             :         }
   55200             : 
   55201          19 :         return result;
   55202             : }
   55203             : 
   55204             : 
   55205           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_in_get_server_name(PyObject *obj, void *closure)
   55206             : {
   55207           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(obj);
   55208             :         PyObject *py_server_name;
   55209           0 :         if (object->in.server_name == NULL) {
   55210           0 :                 Py_RETURN_NONE;
   55211             :         }
   55212           0 :         if (object->in.server_name == NULL) {
   55213           0 :                 py_server_name = Py_None;
   55214           0 :                 Py_INCREF(py_server_name);
   55215             :         } else {
   55216           0 :                 if (object->in.server_name == NULL) {
   55217           0 :                         py_server_name = Py_None;
   55218           0 :                         Py_INCREF(py_server_name);
   55219             :                 } else {
   55220           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   55221             :                 }
   55222             :         }
   55223           0 :         return py_server_name;
   55224             : }
   55225             : 
   55226           0 : static int py_netr_DsrDeregisterDNSHostRecords_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   55227             : {
   55228           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(py_obj);
   55229           0 :         if (value == NULL) {
   55230           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   55231           0 :                 return -1;
   55232             :         }
   55233           0 :         if (value == Py_None) {
   55234           0 :                 object->in.server_name = NULL;
   55235             :         } else {
   55236           0 :                 object->in.server_name = NULL;
   55237             :                 {
   55238             :                         const char *test_str;
   55239             :                         const char *talloc_str;
   55240           0 :                         PyObject *unicode = NULL;
   55241           0 :                         if (PyUnicode_Check(value)) {
   55242           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   55243           0 :                                 if (unicode == NULL) {
   55244           0 :                                         PyErr_NoMemory();
   55245           0 :                                         return -1;
   55246             :                                 }
   55247           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   55248           0 :                         } else if (PyBytes_Check(value)) {
   55249           0 :                                 test_str = PyBytes_AS_STRING(value);
   55250             :                         } else {
   55251           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   55252           0 :                                 return -1;
   55253             :                         }
   55254           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   55255           0 :                         if (unicode != NULL) {
   55256           0 :                                 Py_DECREF(unicode);
   55257             :                         }
   55258           0 :                         if (talloc_str == NULL) {
   55259           0 :                                 PyErr_NoMemory();
   55260           0 :                                 return -1;
   55261             :                         }
   55262           0 :                         object->in.server_name = talloc_str;
   55263             :                 }
   55264             :         }
   55265           0 :         return 0;
   55266             : }
   55267             : 
   55268           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_in_get_domain(PyObject *obj, void *closure)
   55269             : {
   55270           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(obj);
   55271             :         PyObject *py_domain;
   55272           0 :         if (object->in.domain == NULL) {
   55273           0 :                 Py_RETURN_NONE;
   55274             :         }
   55275           0 :         if (object->in.domain == NULL) {
   55276           0 :                 py_domain = Py_None;
   55277           0 :                 Py_INCREF(py_domain);
   55278             :         } else {
   55279           0 :                 if (object->in.domain == NULL) {
   55280           0 :                         py_domain = Py_None;
   55281           0 :                         Py_INCREF(py_domain);
   55282             :                 } else {
   55283           0 :                         py_domain = PyUnicode_Decode(object->in.domain, strlen(object->in.domain), "utf-8", "ignore");
   55284             :                 }
   55285             :         }
   55286           0 :         return py_domain;
   55287             : }
   55288             : 
   55289           0 : static int py_netr_DsrDeregisterDNSHostRecords_in_set_domain(PyObject *py_obj, PyObject *value, void *closure)
   55290             : {
   55291           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(py_obj);
   55292           0 :         if (value == NULL) {
   55293           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain");
   55294           0 :                 return -1;
   55295             :         }
   55296           0 :         if (value == Py_None) {
   55297           0 :                 object->in.domain = NULL;
   55298             :         } else {
   55299           0 :                 object->in.domain = NULL;
   55300             :                 {
   55301             :                         const char *test_str;
   55302             :                         const char *talloc_str;
   55303           0 :                         PyObject *unicode = NULL;
   55304           0 :                         if (PyUnicode_Check(value)) {
   55305           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   55306           0 :                                 if (unicode == NULL) {
   55307           0 :                                         PyErr_NoMemory();
   55308           0 :                                         return -1;
   55309             :                                 }
   55310           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   55311           0 :                         } else if (PyBytes_Check(value)) {
   55312           0 :                                 test_str = PyBytes_AS_STRING(value);
   55313             :                         } else {
   55314           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   55315           0 :                                 return -1;
   55316             :                         }
   55317           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   55318           0 :                         if (unicode != NULL) {
   55319           0 :                                 Py_DECREF(unicode);
   55320             :                         }
   55321           0 :                         if (talloc_str == NULL) {
   55322           0 :                                 PyErr_NoMemory();
   55323           0 :                                 return -1;
   55324             :                         }
   55325           0 :                         object->in.domain = talloc_str;
   55326             :                 }
   55327             :         }
   55328           0 :         return 0;
   55329             : }
   55330             : 
   55331           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_in_get_domain_guid(PyObject *obj, void *closure)
   55332             : {
   55333           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(obj);
   55334             :         PyObject *py_domain_guid;
   55335           0 :         if (object->in.domain_guid == NULL) {
   55336           0 :                 Py_RETURN_NONE;
   55337             :         }
   55338           0 :         if (object->in.domain_guid == NULL) {
   55339           0 :                 py_domain_guid = Py_None;
   55340           0 :                 Py_INCREF(py_domain_guid);
   55341             :         } else {
   55342           0 :                 py_domain_guid = pytalloc_reference_ex(GUID_Type, object->in.domain_guid, object->in.domain_guid);
   55343             :         }
   55344           0 :         return py_domain_guid;
   55345             : }
   55346             : 
   55347           0 : static int py_netr_DsrDeregisterDNSHostRecords_in_set_domain_guid(PyObject *py_obj, PyObject *value, void *closure)
   55348             : {
   55349           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(py_obj);
   55350           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.domain_guid));
   55351           0 :         if (value == NULL) {
   55352           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.domain_guid");
   55353           0 :                 return -1;
   55354             :         }
   55355           0 :         if (value == Py_None) {
   55356           0 :                 object->in.domain_guid = NULL;
   55357             :         } else {
   55358           0 :                 object->in.domain_guid = NULL;
   55359           0 :                 PY_CHECK_TYPE(GUID_Type, value, return -1;);
   55360           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   55361           0 :                         PyErr_NoMemory();
   55362           0 :                         return -1;
   55363             :                 }
   55364           0 :                 object->in.domain_guid = (struct GUID *)pytalloc_get_ptr(value);
   55365             :         }
   55366           0 :         return 0;
   55367             : }
   55368             : 
   55369           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_in_get_dsa_guid(PyObject *obj, void *closure)
   55370             : {
   55371           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(obj);
   55372             :         PyObject *py_dsa_guid;
   55373           0 :         if (object->in.dsa_guid == NULL) {
   55374           0 :                 Py_RETURN_NONE;
   55375             :         }
   55376           0 :         if (object->in.dsa_guid == NULL) {
   55377           0 :                 py_dsa_guid = Py_None;
   55378           0 :                 Py_INCREF(py_dsa_guid);
   55379             :         } else {
   55380           0 :                 py_dsa_guid = pytalloc_reference_ex(GUID_Type, object->in.dsa_guid, object->in.dsa_guid);
   55381             :         }
   55382           0 :         return py_dsa_guid;
   55383             : }
   55384             : 
   55385           0 : static int py_netr_DsrDeregisterDNSHostRecords_in_set_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
   55386             : {
   55387           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(py_obj);
   55388           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.dsa_guid));
   55389           0 :         if (value == NULL) {
   55390           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dsa_guid");
   55391           0 :                 return -1;
   55392             :         }
   55393           0 :         if (value == Py_None) {
   55394           0 :                 object->in.dsa_guid = NULL;
   55395             :         } else {
   55396           0 :                 object->in.dsa_guid = NULL;
   55397           0 :                 PY_CHECK_TYPE(GUID_Type, value, return -1;);
   55398           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   55399           0 :                         PyErr_NoMemory();
   55400           0 :                         return -1;
   55401             :                 }
   55402           0 :                 object->in.dsa_guid = (struct GUID *)pytalloc_get_ptr(value);
   55403             :         }
   55404           0 :         return 0;
   55405             : }
   55406             : 
   55407           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_in_get_dns_host(PyObject *obj, void *closure)
   55408             : {
   55409           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(obj);
   55410             :         PyObject *py_dns_host;
   55411           0 :         if (object->in.dns_host == NULL) {
   55412           0 :                 Py_RETURN_NONE;
   55413             :         }
   55414           0 :         if (object->in.dns_host == NULL) {
   55415           0 :                 py_dns_host = Py_None;
   55416           0 :                 Py_INCREF(py_dns_host);
   55417             :         } else {
   55418           0 :                 py_dns_host = PyUnicode_Decode(object->in.dns_host, strlen(object->in.dns_host), "utf-8", "ignore");
   55419             :         }
   55420           0 :         return py_dns_host;
   55421             : }
   55422             : 
   55423           0 : static int py_netr_DsrDeregisterDNSHostRecords_in_set_dns_host(PyObject *py_obj, PyObject *value, void *closure)
   55424             : {
   55425           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(py_obj);
   55426           0 :         if (value == NULL) {
   55427           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dns_host");
   55428           0 :                 return -1;
   55429             :         }
   55430           0 :         object->in.dns_host = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.dns_host);
   55431           0 :         if (object->in.dns_host == NULL) {
   55432           0 :                 PyErr_NoMemory();
   55433           0 :                 return -1;
   55434             :         }
   55435             :         {
   55436             :                 const char *test_str;
   55437             :                 const char *talloc_str;
   55438           0 :                 PyObject *unicode = NULL;
   55439           0 :                 if (PyUnicode_Check(value)) {
   55440           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   55441           0 :                         if (unicode == NULL) {
   55442           0 :                                 PyErr_NoMemory();
   55443           0 :                                 return -1;
   55444             :                         }
   55445           0 :                         test_str = PyBytes_AS_STRING(unicode);
   55446           0 :                 } else if (PyBytes_Check(value)) {
   55447           0 :                         test_str = PyBytes_AS_STRING(value);
   55448             :                 } else {
   55449           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   55450           0 :                         return -1;
   55451             :                 }
   55452           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   55453           0 :                 if (unicode != NULL) {
   55454           0 :                         Py_DECREF(unicode);
   55455             :                 }
   55456           0 :                 if (talloc_str == NULL) {
   55457           0 :                         PyErr_NoMemory();
   55458           0 :                         return -1;
   55459             :                 }
   55460           0 :                 object->in.dns_host = talloc_str;
   55461             :         }
   55462           0 :         return 0;
   55463             : }
   55464             : 
   55465           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_get_result(PyObject *obj, void *closure)
   55466             : {
   55467           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(obj);
   55468             :         PyObject *py_result;
   55469           0 :         py_result = PyErr_FromWERROR(object->out.result);
   55470           0 :         return py_result;
   55471             : }
   55472             : 
   55473           0 : static int py_netr_DsrDeregisterDNSHostRecords_set_result(PyObject *py_obj, PyObject *value, void *closure)
   55474             : {
   55475           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(py_obj);
   55476           0 :         if (value == NULL) {
   55477           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   55478           0 :                 return -1;
   55479             :         }
   55480           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   55481           0 :         return 0;
   55482             : }
   55483             : 
   55484             : static PyGetSetDef py_netr_DsrDeregisterDNSHostRecords_getsetters[] = {
   55485             :         {
   55486             :                 .name = discard_const_p(char, "in_server_name"),
   55487             :                 .get = py_netr_DsrDeregisterDNSHostRecords_in_get_server_name,
   55488             :                 .set = py_netr_DsrDeregisterDNSHostRecords_in_set_server_name,
   55489             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   55490             :         },
   55491             :         {
   55492             :                 .name = discard_const_p(char, "in_domain"),
   55493             :                 .get = py_netr_DsrDeregisterDNSHostRecords_in_get_domain,
   55494             :                 .set = py_netr_DsrDeregisterDNSHostRecords_in_set_domain,
   55495             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   55496             :         },
   55497             :         {
   55498             :                 .name = discard_const_p(char, "in_domain_guid"),
   55499             :                 .get = py_netr_DsrDeregisterDNSHostRecords_in_get_domain_guid,
   55500             :                 .set = py_netr_DsrDeregisterDNSHostRecords_in_set_domain_guid,
   55501             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   55502             :         },
   55503             :         {
   55504             :                 .name = discard_const_p(char, "in_dsa_guid"),
   55505             :                 .get = py_netr_DsrDeregisterDNSHostRecords_in_get_dsa_guid,
   55506             :                 .set = py_netr_DsrDeregisterDNSHostRecords_in_set_dsa_guid,
   55507             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   55508             :         },
   55509             :         {
   55510             :                 .name = discard_const_p(char, "in_dns_host"),
   55511             :                 .get = py_netr_DsrDeregisterDNSHostRecords_in_get_dns_host,
   55512             :                 .set = py_netr_DsrDeregisterDNSHostRecords_in_set_dns_host,
   55513             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   55514             :         },
   55515             :         {
   55516             :                 .name = discard_const_p(char, "result"),
   55517             :                 .get = py_netr_DsrDeregisterDNSHostRecords_get_result,
   55518             :                 .set = py_netr_DsrDeregisterDNSHostRecords_set_result,
   55519             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   55520             :         },
   55521             :         { .name = NULL }
   55522             : };
   55523             : 
   55524           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   55525             : {
   55526           0 :         PyObject *self = pytalloc_new(struct netr_DsrDeregisterDNSHostRecords, type);
   55527           0 :         return self;
   55528             : }
   55529             : 
   55530           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   55531             : {
   55532             : 
   55533             : 
   55534           0 :         return PyLong_FromLong(41);
   55535             : }
   55536             : 
   55537           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   55538             : {
   55539           0 :         const struct ndr_interface_call *call = NULL;
   55540           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(py_obj);
   55541           0 :         PyObject *ret = NULL;
   55542           0 :         struct ndr_push *push = NULL;
   55543             :         DATA_BLOB blob;
   55544             :         enum ndr_err_code err;
   55545             : 
   55546           0 :         if (ndr_table_netlogon.num_calls < 42) {
   55547           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrDeregisterDNSHostRecords_ndr_pack");
   55548           0 :                 return NULL;
   55549             :         }
   55550           0 :         call = &ndr_table_netlogon.calls[41];
   55551             : 
   55552           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   55553           0 :         if (push == NULL) {
   55554           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   55555           0 :                 return NULL;
   55556             :         }
   55557             : 
   55558           0 :         push->flags |= ndr_push_flags;
   55559             : 
   55560           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   55561           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   55562           0 :                 TALLOC_FREE(push);
   55563           0 :                 PyErr_SetNdrError(err);
   55564           0 :                 return NULL;
   55565             :         }
   55566           0 :         blob = ndr_push_blob(push);
   55567           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   55568           0 :         TALLOC_FREE(push);
   55569           0 :         return ret;
   55570             : }
   55571             : 
   55572           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55573             : {
   55574           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   55575           0 :         PyObject *bigendian_obj = NULL;
   55576           0 :         PyObject *ndr64_obj = NULL;
   55577           0 :         uint32_t ndr_push_flags = 0;
   55578             : 
   55579           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   55580             :                 discard_const_p(char *, kwnames),
   55581             :                 &bigendian_obj,
   55582             :                 &ndr64_obj)) {
   55583           0 :                 return NULL;
   55584             :         }
   55585             : 
   55586           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55587           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   55588             :         }
   55589           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55590           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   55591             :         }
   55592             : 
   55593           0 :         return py_netr_DsrDeregisterDNSHostRecords_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   55594             : }
   55595             : 
   55596           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55597             : {
   55598           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   55599           0 :         PyObject *bigendian_obj = NULL;
   55600           0 :         PyObject *ndr64_obj = NULL;
   55601           0 :         uint32_t ndr_push_flags = 0;
   55602             : 
   55603           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   55604             :                 discard_const_p(char *, kwnames),
   55605             :                 &bigendian_obj,
   55606             :                 &ndr64_obj)) {
   55607           0 :                 return NULL;
   55608             :         }
   55609             : 
   55610           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55611           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   55612             :         }
   55613           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55614           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   55615             :         }
   55616             : 
   55617           0 :         return py_netr_DsrDeregisterDNSHostRecords_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   55618             : }
   55619             : 
   55620           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   55621             : {
   55622           0 :         const struct ndr_interface_call *call = NULL;
   55623           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(py_obj);
   55624           0 :         struct ndr_pull *pull = NULL;
   55625             :         enum ndr_err_code err;
   55626             : 
   55627           0 :         if (ndr_table_netlogon.num_calls < 42) {
   55628           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrDeregisterDNSHostRecords_ndr_unpack");
   55629           0 :                 return NULL;
   55630             :         }
   55631           0 :         call = &ndr_table_netlogon.calls[41];
   55632             : 
   55633           0 :         pull = ndr_pull_init_blob(blob, object);
   55634           0 :         if (pull == NULL) {
   55635           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   55636           0 :                 return NULL;
   55637             :         }
   55638             : 
   55639           0 :         pull->flags |= ndr_pull_flags;
   55640             : 
   55641           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   55642           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   55643           0 :                 TALLOC_FREE(pull);
   55644           0 :                 PyErr_SetNdrError(err);
   55645           0 :                 return NULL;
   55646             :         }
   55647           0 :         if (!allow_remaining) {
   55648             :                 uint32_t highest_ofs;
   55649             : 
   55650           0 :                 if (pull->offset > pull->relative_highest_offset) {
   55651           0 :                         highest_ofs = pull->offset;
   55652             :                 } else {
   55653           0 :                         highest_ofs = pull->relative_highest_offset;
   55654             :                 }
   55655           0 :                 if (highest_ofs < pull->data_size) {
   55656           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   55657             :                                 "not all bytes consumed ofs[%u] size[%u]",
   55658             :                                 highest_ofs, pull->data_size);
   55659           0 :                         TALLOC_FREE(pull);
   55660           0 :                         PyErr_SetNdrError(err);
   55661           0 :                         return NULL;
   55662             :                 }
   55663             :         }
   55664             : 
   55665           0 :         TALLOC_FREE(pull);
   55666           0 :         Py_RETURN_NONE;
   55667             : }
   55668             : 
   55669           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55670             : {
   55671             :         DATA_BLOB blob;
   55672           0 :         Py_ssize_t blob_length = 0;
   55673           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   55674           0 :         PyObject *bigendian_obj = NULL;
   55675           0 :         PyObject *ndr64_obj = NULL;
   55676           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   55677           0 :         PyObject *allow_remaining_obj = NULL;
   55678           0 :         bool allow_remaining = false;
   55679             : 
   55680           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   55681             :                 discard_const_p(char *, kwnames),
   55682             :                 &blob.data, &blob_length,
   55683             :                 &bigendian_obj,
   55684             :                 &ndr64_obj,
   55685             :                 &allow_remaining_obj)) {
   55686           0 :                 return NULL;
   55687             :         }
   55688           0 :         blob.length = blob_length;
   55689             : 
   55690           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55691           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   55692             :         }
   55693           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55694           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   55695             :         }
   55696             : 
   55697           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   55698           0 :                 allow_remaining = true;
   55699             :         }
   55700             : 
   55701           0 :         return py_netr_DsrDeregisterDNSHostRecords_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   55702             : }
   55703             : 
   55704           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   55705             : {
   55706             :         DATA_BLOB blob;
   55707           0 :         Py_ssize_t blob_length = 0;
   55708           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   55709           0 :         PyObject *bigendian_obj = NULL;
   55710           0 :         PyObject *ndr64_obj = NULL;
   55711           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   55712           0 :         PyObject *allow_remaining_obj = NULL;
   55713           0 :         bool allow_remaining = false;
   55714             : 
   55715           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   55716             :                 discard_const_p(char *, kwnames),
   55717             :                 &blob.data, &blob_length,
   55718             :                 &bigendian_obj,
   55719             :                 &ndr64_obj,
   55720             :                 &allow_remaining_obj)) {
   55721           0 :                 return NULL;
   55722             :         }
   55723           0 :         blob.length = blob_length;
   55724             : 
   55725           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   55726           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   55727             :         }
   55728           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   55729           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   55730             :         }
   55731             : 
   55732           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   55733           0 :                 allow_remaining = true;
   55734             :         }
   55735             : 
   55736           0 :         return py_netr_DsrDeregisterDNSHostRecords_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   55737             : }
   55738             : 
   55739           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   55740             : {
   55741           0 :         const struct ndr_interface_call *call = NULL;
   55742           0 :         struct netr_DsrDeregisterDNSHostRecords *object = (struct netr_DsrDeregisterDNSHostRecords *)pytalloc_get_ptr(py_obj);
   55743             :         PyObject *ret;
   55744             :         char *retstr;
   55745             : 
   55746           0 :         if (ndr_table_netlogon.num_calls < 42) {
   55747           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrDeregisterDNSHostRecords_ndr_print");
   55748           0 :                 return NULL;
   55749             :         }
   55750           0 :         call = &ndr_table_netlogon.calls[41];
   55751             : 
   55752           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   55753           0 :         ret = PyUnicode_FromString(retstr);
   55754           0 :         TALLOC_FREE(retstr);
   55755             : 
   55756           0 :         return ret;
   55757             : }
   55758             : 
   55759           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   55760             : {
   55761           0 :         return py_netr_DsrDeregisterDNSHostRecords_ndr_print(py_obj, "netr_DsrDeregisterDNSHostRecords_in", NDR_IN);
   55762             : }
   55763             : 
   55764           0 : static PyObject *py_netr_DsrDeregisterDNSHostRecords_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   55765             : {
   55766           0 :         return py_netr_DsrDeregisterDNSHostRecords_ndr_print(py_obj, "netr_DsrDeregisterDNSHostRecords_out", NDR_OUT);
   55767             : }
   55768             : 
   55769             : static PyMethodDef py_netr_DsrDeregisterDNSHostRecords_methods[] = {
   55770             :         { "opnum", (PyCFunction)py_netr_DsrDeregisterDNSHostRecords_ndr_opnum, METH_NOARGS|METH_CLASS,
   55771             :                 "netlogon.netr_DsrDeregisterDNSHostRecords.opnum() -> 41 (0x29) " },
   55772             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrDeregisterDNSHostRecords_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   55773             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   55774             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrDeregisterDNSHostRecords_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   55775             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   55776             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrDeregisterDNSHostRecords_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   55777             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   55778             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrDeregisterDNSHostRecords_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   55779             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   55780             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsrDeregisterDNSHostRecords_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   55781             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsrDeregisterDNSHostRecords_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   55782             :         { NULL, NULL, 0, NULL }
   55783             : };
   55784             : 
   55785             : 
   55786             : static PyTypeObject netr_DsrDeregisterDNSHostRecords_Type = {
   55787             :         PyVarObject_HEAD_INIT(NULL, 0)
   55788             :         .tp_name = "netlogon.netr_DsrDeregisterDNSHostRecords",
   55789             :         .tp_getset = py_netr_DsrDeregisterDNSHostRecords_getsetters,
   55790             :         .tp_methods = py_netr_DsrDeregisterDNSHostRecords_methods,
   55791             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   55792             :         .tp_new = py_netr_DsrDeregisterDNSHostRecords_new,
   55793             : };
   55794             : 
   55795           0 : static bool pack_py_netr_DsrDeregisterDNSHostRecords_args_in(PyObject *args, PyObject *kwargs, struct netr_DsrDeregisterDNSHostRecords *r)
   55796             : {
   55797             :         PyObject *py_server_name;
   55798             :         PyObject *py_domain;
   55799             :         PyObject *py_domain_guid;
   55800             :         PyObject *py_dsa_guid;
   55801             :         PyObject *py_dns_host;
   55802           0 :         const char *kwnames[] = {
   55803             :                 "server_name", "domain", "domain_guid", "dsa_guid", "dns_host", NULL
   55804             :         };
   55805             : 
   55806           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)) {
   55807           0 :                 return false;
   55808             :         }
   55809             : 
   55810           0 :         if (py_server_name == NULL) {
   55811           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   55812           0 :                 return false;
   55813             :         }
   55814           0 :         if (py_server_name == Py_None) {
   55815           0 :                 r->in.server_name = NULL;
   55816             :         } else {
   55817           0 :                 r->in.server_name = NULL;
   55818             :                 {
   55819             :                         const char *test_str;
   55820             :                         const char *talloc_str;
   55821           0 :                         PyObject *unicode = NULL;
   55822           0 :                         if (PyUnicode_Check(py_server_name)) {
   55823           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   55824           0 :                                 if (unicode == NULL) {
   55825           0 :                                         PyErr_NoMemory();
   55826           0 :                                         return false;
   55827             :                                 }
   55828           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   55829           0 :                         } else if (PyBytes_Check(py_server_name)) {
   55830           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   55831             :                         } else {
   55832           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   55833           0 :                                 return false;
   55834             :                         }
   55835           0 :                         talloc_str = talloc_strdup(r, test_str);
   55836           0 :                         if (unicode != NULL) {
   55837           0 :                                 Py_DECREF(unicode);
   55838             :                         }
   55839           0 :                         if (talloc_str == NULL) {
   55840           0 :                                 PyErr_NoMemory();
   55841           0 :                                 return false;
   55842             :                         }
   55843           0 :                         r->in.server_name = talloc_str;
   55844             :                 }
   55845             :         }
   55846           0 :         if (py_domain == NULL) {
   55847           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain");
   55848           0 :                 return false;
   55849             :         }
   55850           0 :         if (py_domain == Py_None) {
   55851           0 :                 r->in.domain = NULL;
   55852             :         } else {
   55853           0 :                 r->in.domain = NULL;
   55854             :                 {
   55855             :                         const char *test_str;
   55856             :                         const char *talloc_str;
   55857           0 :                         PyObject *unicode = NULL;
   55858           0 :                         if (PyUnicode_Check(py_domain)) {
   55859           0 :                                 unicode = PyUnicode_AsEncodedString(py_domain, "utf-8", "ignore");
   55860           0 :                                 if (unicode == NULL) {
   55861           0 :                                         PyErr_NoMemory();
   55862           0 :                                         return false;
   55863             :                                 }
   55864           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   55865           0 :                         } else if (PyBytes_Check(py_domain)) {
   55866           0 :                                 test_str = PyBytes_AS_STRING(py_domain);
   55867             :                         } else {
   55868           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_domain)->tp_name);
   55869           0 :                                 return false;
   55870             :                         }
   55871           0 :                         talloc_str = talloc_strdup(r, test_str);
   55872           0 :                         if (unicode != NULL) {
   55873           0 :                                 Py_DECREF(unicode);
   55874             :                         }
   55875           0 :                         if (talloc_str == NULL) {
   55876           0 :                                 PyErr_NoMemory();
   55877           0 :                                 return false;
   55878             :                         }
   55879           0 :                         r->in.domain = talloc_str;
   55880             :                 }
   55881             :         }
   55882           0 :         if (py_domain_guid == NULL) {
   55883           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.domain_guid");
   55884           0 :                 return false;
   55885             :         }
   55886           0 :         if (py_domain_guid == Py_None) {
   55887           0 :                 r->in.domain_guid = NULL;
   55888             :         } else {
   55889           0 :                 r->in.domain_guid = NULL;
   55890           0 :                 PY_CHECK_TYPE(GUID_Type, py_domain_guid, return false;);
   55891           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_domain_guid)) == NULL) {
   55892           0 :                         PyErr_NoMemory();
   55893           0 :                         return false;
   55894             :                 }
   55895           0 :                 r->in.domain_guid = (struct GUID *)pytalloc_get_ptr(py_domain_guid);
   55896             :         }
   55897           0 :         if (py_dsa_guid == NULL) {
   55898           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dsa_guid");
   55899           0 :                 return false;
   55900             :         }
   55901           0 :         if (py_dsa_guid == Py_None) {
   55902           0 :                 r->in.dsa_guid = NULL;
   55903             :         } else {
   55904           0 :                 r->in.dsa_guid = NULL;
   55905           0 :                 PY_CHECK_TYPE(GUID_Type, py_dsa_guid, return false;);
   55906           0 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_dsa_guid)) == NULL) {
   55907           0 :                         PyErr_NoMemory();
   55908           0 :                         return false;
   55909             :                 }
   55910           0 :                 r->in.dsa_guid = (struct GUID *)pytalloc_get_ptr(py_dsa_guid);
   55911             :         }
   55912           0 :         if (py_dns_host == NULL) {
   55913           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dns_host");
   55914           0 :                 return false;
   55915             :         }
   55916           0 :         r->in.dns_host = talloc_ptrtype(r, r->in.dns_host);
   55917           0 :         if (r->in.dns_host == NULL) {
   55918           0 :                 PyErr_NoMemory();
   55919           0 :                 return false;
   55920             :         }
   55921             :         {
   55922             :                 const char *test_str;
   55923             :                 const char *talloc_str;
   55924           0 :                 PyObject *unicode = NULL;
   55925           0 :                 if (PyUnicode_Check(py_dns_host)) {
   55926           0 :                         unicode = PyUnicode_AsEncodedString(py_dns_host, "utf-8", "ignore");
   55927           0 :                         if (unicode == NULL) {
   55928           0 :                                 PyErr_NoMemory();
   55929           0 :                                 return false;
   55930             :                         }
   55931           0 :                         test_str = PyBytes_AS_STRING(unicode);
   55932           0 :                 } else if (PyBytes_Check(py_dns_host)) {
   55933           0 :                         test_str = PyBytes_AS_STRING(py_dns_host);
   55934             :                 } else {
   55935           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_dns_host)->tp_name);
   55936           0 :                         return false;
   55937             :                 }
   55938           0 :                 talloc_str = talloc_strdup(r, test_str);
   55939           0 :                 if (unicode != NULL) {
   55940           0 :                         Py_DECREF(unicode);
   55941             :                 }
   55942           0 :                 if (talloc_str == NULL) {
   55943           0 :                         PyErr_NoMemory();
   55944           0 :                         return false;
   55945             :                 }
   55946           0 :                 r->in.dns_host = talloc_str;
   55947             :         }
   55948           0 :         return true;
   55949             : }
   55950             : 
   55951           0 : static PyObject *unpack_py_netr_DsrDeregisterDNSHostRecords_args_out(struct netr_DsrDeregisterDNSHostRecords *r)
   55952             : {
   55953             :         PyObject *result;
   55954           0 :         result = Py_None;
   55955           0 :         Py_INCREF(result);
   55956           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   55957           0 :                 PyErr_SetWERROR(r->out.result);
   55958           0 :                 return NULL;
   55959             :         }
   55960             : 
   55961           0 :         return result;
   55962             : }
   55963             : 
   55964             : 
   55965           0 : static PyObject *py_netr_ServerTrustPasswordsGet_in_get_server_name(PyObject *obj, void *closure)
   55966             : {
   55967           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(obj);
   55968             :         PyObject *py_server_name;
   55969           0 :         if (object->in.server_name == NULL) {
   55970           0 :                 Py_RETURN_NONE;
   55971             :         }
   55972           0 :         if (object->in.server_name == NULL) {
   55973           0 :                 py_server_name = Py_None;
   55974           0 :                 Py_INCREF(py_server_name);
   55975             :         } else {
   55976           0 :                 if (object->in.server_name == NULL) {
   55977           0 :                         py_server_name = Py_None;
   55978           0 :                         Py_INCREF(py_server_name);
   55979             :                 } else {
   55980           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   55981             :                 }
   55982             :         }
   55983           0 :         return py_server_name;
   55984             : }
   55985             : 
   55986           0 : static int py_netr_ServerTrustPasswordsGet_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   55987             : {
   55988           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(py_obj);
   55989           0 :         if (value == NULL) {
   55990           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   55991           0 :                 return -1;
   55992             :         }
   55993           0 :         if (value == Py_None) {
   55994           0 :                 object->in.server_name = NULL;
   55995             :         } else {
   55996           0 :                 object->in.server_name = NULL;
   55997             :                 {
   55998             :                         const char *test_str;
   55999             :                         const char *talloc_str;
   56000           0 :                         PyObject *unicode = NULL;
   56001           0 :                         if (PyUnicode_Check(value)) {
   56002           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   56003           0 :                                 if (unicode == NULL) {
   56004           0 :                                         PyErr_NoMemory();
   56005           0 :                                         return -1;
   56006             :                                 }
   56007           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   56008           0 :                         } else if (PyBytes_Check(value)) {
   56009           0 :                                 test_str = PyBytes_AS_STRING(value);
   56010             :                         } else {
   56011           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   56012           0 :                                 return -1;
   56013             :                         }
   56014           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   56015           0 :                         if (unicode != NULL) {
   56016           0 :                                 Py_DECREF(unicode);
   56017             :                         }
   56018           0 :                         if (talloc_str == NULL) {
   56019           0 :                                 PyErr_NoMemory();
   56020           0 :                                 return -1;
   56021             :                         }
   56022           0 :                         object->in.server_name = talloc_str;
   56023             :                 }
   56024             :         }
   56025           0 :         return 0;
   56026             : }
   56027             : 
   56028           0 : static PyObject *py_netr_ServerTrustPasswordsGet_in_get_account_name(PyObject *obj, void *closure)
   56029             : {
   56030           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(obj);
   56031             :         PyObject *py_account_name;
   56032           0 :         if (object->in.account_name == NULL) {
   56033           0 :                 Py_RETURN_NONE;
   56034             :         }
   56035           0 :         if (object->in.account_name == NULL) {
   56036           0 :                 py_account_name = Py_None;
   56037           0 :                 Py_INCREF(py_account_name);
   56038             :         } else {
   56039           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   56040             :         }
   56041           0 :         return py_account_name;
   56042             : }
   56043             : 
   56044           0 : static int py_netr_ServerTrustPasswordsGet_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   56045             : {
   56046           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(py_obj);
   56047           0 :         if (value == NULL) {
   56048           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.account_name");
   56049           0 :                 return -1;
   56050             :         }
   56051           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   56052           0 :         if (object->in.account_name == NULL) {
   56053           0 :                 PyErr_NoMemory();
   56054           0 :                 return -1;
   56055             :         }
   56056             :         {
   56057             :                 const char *test_str;
   56058             :                 const char *talloc_str;
   56059           0 :                 PyObject *unicode = NULL;
   56060           0 :                 if (PyUnicode_Check(value)) {
   56061           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   56062           0 :                         if (unicode == NULL) {
   56063           0 :                                 PyErr_NoMemory();
   56064           0 :                                 return -1;
   56065             :                         }
   56066           0 :                         test_str = PyBytes_AS_STRING(unicode);
   56067           0 :                 } else if (PyBytes_Check(value)) {
   56068           0 :                         test_str = PyBytes_AS_STRING(value);
   56069             :                 } else {
   56070           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   56071           0 :                         return -1;
   56072             :                 }
   56073           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   56074           0 :                 if (unicode != NULL) {
   56075           0 :                         Py_DECREF(unicode);
   56076             :                 }
   56077           0 :                 if (talloc_str == NULL) {
   56078           0 :                         PyErr_NoMemory();
   56079           0 :                         return -1;
   56080             :                 }
   56081           0 :                 object->in.account_name = talloc_str;
   56082             :         }
   56083           0 :         return 0;
   56084             : }
   56085             : 
   56086           0 : static PyObject *py_netr_ServerTrustPasswordsGet_in_get_secure_channel_type(PyObject *obj, void *closure)
   56087             : {
   56088           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(obj);
   56089             :         PyObject *py_secure_channel_type;
   56090           0 :         py_secure_channel_type = PyLong_FromLong((uint16_t)object->in.secure_channel_type);
   56091           0 :         return py_secure_channel_type;
   56092             : }
   56093             : 
   56094           0 : static int py_netr_ServerTrustPasswordsGet_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
   56095             : {
   56096           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(py_obj);
   56097           0 :         if (value == NULL) {
   56098           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.secure_channel_type");
   56099           0 :                 return -1;
   56100             :         }
   56101             :         {
   56102           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
   56103           0 :                 if (PyLong_Check(value)) {
   56104             :                         unsigned long long test_var;
   56105           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   56106           0 :                         if (PyErr_Occurred() != NULL) {
   56107           0 :                                 return -1;
   56108             :                         }
   56109           0 :                         if (test_var > uint_max) {
   56110           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   56111             :                                   PyLong_Type.tp_name, uint_max, test_var);
   56112           0 :                                 return -1;
   56113             :                         }
   56114           0 :                         object->in.secure_channel_type = test_var;
   56115             :                 } else {
   56116           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   56117             :                           PyLong_Type.tp_name);
   56118           0 :                         return -1;
   56119             :                 }
   56120             :         }
   56121           0 :         return 0;
   56122             : }
   56123             : 
   56124           0 : static PyObject *py_netr_ServerTrustPasswordsGet_in_get_computer_name(PyObject *obj, void *closure)
   56125             : {
   56126           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(obj);
   56127             :         PyObject *py_computer_name;
   56128           0 :         if (object->in.computer_name == NULL) {
   56129           0 :                 Py_RETURN_NONE;
   56130             :         }
   56131           0 :         if (object->in.computer_name == NULL) {
   56132           0 :                 py_computer_name = Py_None;
   56133           0 :                 Py_INCREF(py_computer_name);
   56134             :         } else {
   56135           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   56136             :         }
   56137           0 :         return py_computer_name;
   56138             : }
   56139             : 
   56140           0 : static int py_netr_ServerTrustPasswordsGet_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   56141             : {
   56142           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(py_obj);
   56143           0 :         if (value == NULL) {
   56144           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   56145           0 :                 return -1;
   56146             :         }
   56147           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   56148           0 :         if (object->in.computer_name == NULL) {
   56149           0 :                 PyErr_NoMemory();
   56150           0 :                 return -1;
   56151             :         }
   56152             :         {
   56153             :                 const char *test_str;
   56154             :                 const char *talloc_str;
   56155           0 :                 PyObject *unicode = NULL;
   56156           0 :                 if (PyUnicode_Check(value)) {
   56157           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   56158           0 :                         if (unicode == NULL) {
   56159           0 :                                 PyErr_NoMemory();
   56160           0 :                                 return -1;
   56161             :                         }
   56162           0 :                         test_str = PyBytes_AS_STRING(unicode);
   56163           0 :                 } else if (PyBytes_Check(value)) {
   56164           0 :                         test_str = PyBytes_AS_STRING(value);
   56165             :                 } else {
   56166           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   56167           0 :                         return -1;
   56168             :                 }
   56169           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   56170           0 :                 if (unicode != NULL) {
   56171           0 :                         Py_DECREF(unicode);
   56172             :                 }
   56173           0 :                 if (talloc_str == NULL) {
   56174           0 :                         PyErr_NoMemory();
   56175           0 :                         return -1;
   56176             :                 }
   56177           0 :                 object->in.computer_name = talloc_str;
   56178             :         }
   56179           0 :         return 0;
   56180             : }
   56181             : 
   56182           0 : static PyObject *py_netr_ServerTrustPasswordsGet_in_get_credential(PyObject *obj, void *closure)
   56183             : {
   56184           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(obj);
   56185             :         PyObject *py_credential;
   56186           0 :         if (object->in.credential == NULL) {
   56187           0 :                 Py_RETURN_NONE;
   56188             :         }
   56189           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   56190           0 :         return py_credential;
   56191             : }
   56192             : 
   56193           0 : static int py_netr_ServerTrustPasswordsGet_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   56194             : {
   56195           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(py_obj);
   56196           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   56197           0 :         if (value == NULL) {
   56198           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   56199           0 :                 return -1;
   56200             :         }
   56201           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   56202           0 :         if (object->in.credential == NULL) {
   56203           0 :                 PyErr_NoMemory();
   56204           0 :                 return -1;
   56205             :         }
   56206           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   56207           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   56208           0 :                 PyErr_NoMemory();
   56209           0 :                 return -1;
   56210             :         }
   56211           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   56212           0 :         return 0;
   56213             : }
   56214             : 
   56215           0 : static PyObject *py_netr_ServerTrustPasswordsGet_out_get_return_authenticator(PyObject *obj, void *closure)
   56216             : {
   56217           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(obj);
   56218             :         PyObject *py_return_authenticator;
   56219           0 :         if (object->out.return_authenticator == NULL) {
   56220           0 :                 Py_RETURN_NONE;
   56221             :         }
   56222           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   56223           0 :         return py_return_authenticator;
   56224             : }
   56225             : 
   56226           0 : static int py_netr_ServerTrustPasswordsGet_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   56227             : {
   56228           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(py_obj);
   56229           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   56230           0 :         if (value == NULL) {
   56231           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   56232           0 :                 return -1;
   56233             :         }
   56234           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   56235           0 :         if (object->out.return_authenticator == NULL) {
   56236           0 :                 PyErr_NoMemory();
   56237           0 :                 return -1;
   56238             :         }
   56239           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   56240           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   56241           0 :                 PyErr_NoMemory();
   56242           0 :                 return -1;
   56243             :         }
   56244           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   56245           0 :         return 0;
   56246             : }
   56247             : 
   56248           0 : static PyObject *py_netr_ServerTrustPasswordsGet_out_get_new_owf_password(PyObject *obj, void *closure)
   56249             : {
   56250           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(obj);
   56251             :         PyObject *py_new_owf_password;
   56252           0 :         if (object->out.new_owf_password == NULL) {
   56253           0 :                 Py_RETURN_NONE;
   56254             :         }
   56255           0 :         py_new_owf_password = pytalloc_reference_ex(samr_Password_Type, object->out.new_owf_password, object->out.new_owf_password);
   56256           0 :         return py_new_owf_password;
   56257             : }
   56258             : 
   56259           0 : static int py_netr_ServerTrustPasswordsGet_out_set_new_owf_password(PyObject *py_obj, PyObject *value, void *closure)
   56260             : {
   56261           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(py_obj);
   56262           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.new_owf_password));
   56263           0 :         if (value == NULL) {
   56264           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.new_owf_password");
   56265           0 :                 return -1;
   56266             :         }
   56267           0 :         object->out.new_owf_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.new_owf_password);
   56268           0 :         if (object->out.new_owf_password == NULL) {
   56269           0 :                 PyErr_NoMemory();
   56270           0 :                 return -1;
   56271             :         }
   56272           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
   56273           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   56274           0 :                 PyErr_NoMemory();
   56275           0 :                 return -1;
   56276             :         }
   56277           0 :         object->out.new_owf_password = (struct samr_Password *)pytalloc_get_ptr(value);
   56278           0 :         return 0;
   56279             : }
   56280             : 
   56281           0 : static PyObject *py_netr_ServerTrustPasswordsGet_out_get_old_owf_password(PyObject *obj, void *closure)
   56282             : {
   56283           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(obj);
   56284             :         PyObject *py_old_owf_password;
   56285           0 :         if (object->out.old_owf_password == NULL) {
   56286           0 :                 Py_RETURN_NONE;
   56287             :         }
   56288           0 :         py_old_owf_password = pytalloc_reference_ex(samr_Password_Type, object->out.old_owf_password, object->out.old_owf_password);
   56289           0 :         return py_old_owf_password;
   56290             : }
   56291             : 
   56292           0 : static int py_netr_ServerTrustPasswordsGet_out_set_old_owf_password(PyObject *py_obj, PyObject *value, void *closure)
   56293             : {
   56294           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(py_obj);
   56295           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.old_owf_password));
   56296           0 :         if (value == NULL) {
   56297           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.old_owf_password");
   56298           0 :                 return -1;
   56299             :         }
   56300           0 :         object->out.old_owf_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.old_owf_password);
   56301           0 :         if (object->out.old_owf_password == NULL) {
   56302           0 :                 PyErr_NoMemory();
   56303           0 :                 return -1;
   56304             :         }
   56305           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
   56306           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   56307           0 :                 PyErr_NoMemory();
   56308           0 :                 return -1;
   56309             :         }
   56310           0 :         object->out.old_owf_password = (struct samr_Password *)pytalloc_get_ptr(value);
   56311           0 :         return 0;
   56312             : }
   56313             : 
   56314           0 : static PyObject *py_netr_ServerTrustPasswordsGet_get_result(PyObject *obj, void *closure)
   56315             : {
   56316           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(obj);
   56317             :         PyObject *py_result;
   56318           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   56319           0 :         return py_result;
   56320             : }
   56321             : 
   56322           0 : static int py_netr_ServerTrustPasswordsGet_set_result(PyObject *py_obj, PyObject *value, void *closure)
   56323             : {
   56324           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(py_obj);
   56325           0 :         if (value == NULL) {
   56326           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   56327           0 :                 return -1;
   56328             :         }
   56329           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   56330           0 :         return 0;
   56331             : }
   56332             : 
   56333             : static PyGetSetDef py_netr_ServerTrustPasswordsGet_getsetters[] = {
   56334             :         {
   56335             :                 .name = discard_const_p(char, "in_server_name"),
   56336             :                 .get = py_netr_ServerTrustPasswordsGet_in_get_server_name,
   56337             :                 .set = py_netr_ServerTrustPasswordsGet_in_set_server_name,
   56338             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   56339             :         },
   56340             :         {
   56341             :                 .name = discard_const_p(char, "in_account_name"),
   56342             :                 .get = py_netr_ServerTrustPasswordsGet_in_get_account_name,
   56343             :                 .set = py_netr_ServerTrustPasswordsGet_in_set_account_name,
   56344             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   56345             :         },
   56346             :         {
   56347             :                 .name = discard_const_p(char, "in_secure_channel_type"),
   56348             :                 .get = py_netr_ServerTrustPasswordsGet_in_get_secure_channel_type,
   56349             :                 .set = py_netr_ServerTrustPasswordsGet_in_set_secure_channel_type,
   56350             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
   56351             :         },
   56352             :         {
   56353             :                 .name = discard_const_p(char, "in_computer_name"),
   56354             :                 .get = py_netr_ServerTrustPasswordsGet_in_get_computer_name,
   56355             :                 .set = py_netr_ServerTrustPasswordsGet_in_set_computer_name,
   56356             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   56357             :         },
   56358             :         {
   56359             :                 .name = discard_const_p(char, "in_credential"),
   56360             :                 .get = py_netr_ServerTrustPasswordsGet_in_get_credential,
   56361             :                 .set = py_netr_ServerTrustPasswordsGet_in_set_credential,
   56362             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   56363             :         },
   56364             :         {
   56365             :                 .name = discard_const_p(char, "out_return_authenticator"),
   56366             :                 .get = py_netr_ServerTrustPasswordsGet_out_get_return_authenticator,
   56367             :                 .set = py_netr_ServerTrustPasswordsGet_out_set_return_authenticator,
   56368             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   56369             :         },
   56370             :         {
   56371             :                 .name = discard_const_p(char, "out_new_owf_password"),
   56372             :                 .get = py_netr_ServerTrustPasswordsGet_out_get_new_owf_password,
   56373             :                 .set = py_netr_ServerTrustPasswordsGet_out_set_new_owf_password,
   56374             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
   56375             :         },
   56376             :         {
   56377             :                 .name = discard_const_p(char, "out_old_owf_password"),
   56378             :                 .get = py_netr_ServerTrustPasswordsGet_out_get_old_owf_password,
   56379             :                 .set = py_netr_ServerTrustPasswordsGet_out_set_old_owf_password,
   56380             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
   56381             :         },
   56382             :         {
   56383             :                 .name = discard_const_p(char, "result"),
   56384             :                 .get = py_netr_ServerTrustPasswordsGet_get_result,
   56385             :                 .set = py_netr_ServerTrustPasswordsGet_set_result,
   56386             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   56387             :         },
   56388             :         { .name = NULL }
   56389             : };
   56390             : 
   56391           0 : static PyObject *py_netr_ServerTrustPasswordsGet_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   56392             : {
   56393           0 :         PyObject *self = pytalloc_new(struct netr_ServerTrustPasswordsGet, type);
   56394           0 :         struct netr_ServerTrustPasswordsGet *_self = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(self);
   56395           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   56396           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   56397           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   56398           0 :         _self->out.new_owf_password = talloc_zero(mem_ctx, struct samr_Password);
   56399           0 :         _self->out.old_owf_password = talloc_zero(mem_ctx, struct samr_Password);
   56400           0 :         return self;
   56401             : }
   56402             : 
   56403           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   56404             : {
   56405             : 
   56406             : 
   56407           0 :         return PyLong_FromLong(42);
   56408             : }
   56409             : 
   56410           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   56411             : {
   56412           0 :         const struct ndr_interface_call *call = NULL;
   56413           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(py_obj);
   56414           0 :         PyObject *ret = NULL;
   56415           0 :         struct ndr_push *push = NULL;
   56416             :         DATA_BLOB blob;
   56417             :         enum ndr_err_code err;
   56418             : 
   56419           0 :         if (ndr_table_netlogon.num_calls < 43) {
   56420           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerTrustPasswordsGet_ndr_pack");
   56421           0 :                 return NULL;
   56422             :         }
   56423           0 :         call = &ndr_table_netlogon.calls[42];
   56424             : 
   56425           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   56426           0 :         if (push == NULL) {
   56427           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   56428           0 :                 return NULL;
   56429             :         }
   56430             : 
   56431           0 :         push->flags |= ndr_push_flags;
   56432             : 
   56433           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   56434           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   56435           0 :                 TALLOC_FREE(push);
   56436           0 :                 PyErr_SetNdrError(err);
   56437           0 :                 return NULL;
   56438             :         }
   56439           0 :         blob = ndr_push_blob(push);
   56440           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   56441           0 :         TALLOC_FREE(push);
   56442           0 :         return ret;
   56443             : }
   56444             : 
   56445           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56446             : {
   56447           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   56448           0 :         PyObject *bigendian_obj = NULL;
   56449           0 :         PyObject *ndr64_obj = NULL;
   56450           0 :         uint32_t ndr_push_flags = 0;
   56451             : 
   56452           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   56453             :                 discard_const_p(char *, kwnames),
   56454             :                 &bigendian_obj,
   56455             :                 &ndr64_obj)) {
   56456           0 :                 return NULL;
   56457             :         }
   56458             : 
   56459           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56460           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   56461             :         }
   56462           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56463           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   56464             :         }
   56465             : 
   56466           0 :         return py_netr_ServerTrustPasswordsGet_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   56467             : }
   56468             : 
   56469           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56470             : {
   56471           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   56472           0 :         PyObject *bigendian_obj = NULL;
   56473           0 :         PyObject *ndr64_obj = NULL;
   56474           0 :         uint32_t ndr_push_flags = 0;
   56475             : 
   56476           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   56477             :                 discard_const_p(char *, kwnames),
   56478             :                 &bigendian_obj,
   56479             :                 &ndr64_obj)) {
   56480           0 :                 return NULL;
   56481             :         }
   56482             : 
   56483           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56484           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   56485             :         }
   56486           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56487           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   56488             :         }
   56489             : 
   56490           0 :         return py_netr_ServerTrustPasswordsGet_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   56491             : }
   56492             : 
   56493           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   56494             : {
   56495           0 :         const struct ndr_interface_call *call = NULL;
   56496           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(py_obj);
   56497           0 :         struct ndr_pull *pull = NULL;
   56498             :         enum ndr_err_code err;
   56499             : 
   56500           0 :         if (ndr_table_netlogon.num_calls < 43) {
   56501           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerTrustPasswordsGet_ndr_unpack");
   56502           0 :                 return NULL;
   56503             :         }
   56504           0 :         call = &ndr_table_netlogon.calls[42];
   56505             : 
   56506           0 :         pull = ndr_pull_init_blob(blob, object);
   56507           0 :         if (pull == NULL) {
   56508           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   56509           0 :                 return NULL;
   56510             :         }
   56511             : 
   56512           0 :         pull->flags |= ndr_pull_flags;
   56513             : 
   56514           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   56515           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   56516           0 :                 TALLOC_FREE(pull);
   56517           0 :                 PyErr_SetNdrError(err);
   56518           0 :                 return NULL;
   56519             :         }
   56520           0 :         if (!allow_remaining) {
   56521             :                 uint32_t highest_ofs;
   56522             : 
   56523           0 :                 if (pull->offset > pull->relative_highest_offset) {
   56524           0 :                         highest_ofs = pull->offset;
   56525             :                 } else {
   56526           0 :                         highest_ofs = pull->relative_highest_offset;
   56527             :                 }
   56528           0 :                 if (highest_ofs < pull->data_size) {
   56529           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   56530             :                                 "not all bytes consumed ofs[%u] size[%u]",
   56531             :                                 highest_ofs, pull->data_size);
   56532           0 :                         TALLOC_FREE(pull);
   56533           0 :                         PyErr_SetNdrError(err);
   56534           0 :                         return NULL;
   56535             :                 }
   56536             :         }
   56537             : 
   56538           0 :         TALLOC_FREE(pull);
   56539           0 :         Py_RETURN_NONE;
   56540             : }
   56541             : 
   56542           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56543             : {
   56544             :         DATA_BLOB blob;
   56545           0 :         Py_ssize_t blob_length = 0;
   56546           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   56547           0 :         PyObject *bigendian_obj = NULL;
   56548           0 :         PyObject *ndr64_obj = NULL;
   56549           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   56550           0 :         PyObject *allow_remaining_obj = NULL;
   56551           0 :         bool allow_remaining = false;
   56552             : 
   56553           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   56554             :                 discard_const_p(char *, kwnames),
   56555             :                 &blob.data, &blob_length,
   56556             :                 &bigendian_obj,
   56557             :                 &ndr64_obj,
   56558             :                 &allow_remaining_obj)) {
   56559           0 :                 return NULL;
   56560             :         }
   56561           0 :         blob.length = blob_length;
   56562             : 
   56563           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56564           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   56565             :         }
   56566           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56567           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   56568             :         }
   56569             : 
   56570           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   56571           0 :                 allow_remaining = true;
   56572             :         }
   56573             : 
   56574           0 :         return py_netr_ServerTrustPasswordsGet_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   56575             : }
   56576             : 
   56577           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   56578             : {
   56579             :         DATA_BLOB blob;
   56580           0 :         Py_ssize_t blob_length = 0;
   56581           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   56582           0 :         PyObject *bigendian_obj = NULL;
   56583           0 :         PyObject *ndr64_obj = NULL;
   56584           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   56585           0 :         PyObject *allow_remaining_obj = NULL;
   56586           0 :         bool allow_remaining = false;
   56587             : 
   56588           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   56589             :                 discard_const_p(char *, kwnames),
   56590             :                 &blob.data, &blob_length,
   56591             :                 &bigendian_obj,
   56592             :                 &ndr64_obj,
   56593             :                 &allow_remaining_obj)) {
   56594           0 :                 return NULL;
   56595             :         }
   56596           0 :         blob.length = blob_length;
   56597             : 
   56598           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   56599           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   56600             :         }
   56601           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   56602           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   56603             :         }
   56604             : 
   56605           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   56606           0 :                 allow_remaining = true;
   56607             :         }
   56608             : 
   56609           0 :         return py_netr_ServerTrustPasswordsGet_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   56610             : }
   56611             : 
   56612           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   56613             : {
   56614           0 :         const struct ndr_interface_call *call = NULL;
   56615           0 :         struct netr_ServerTrustPasswordsGet *object = (struct netr_ServerTrustPasswordsGet *)pytalloc_get_ptr(py_obj);
   56616             :         PyObject *ret;
   56617             :         char *retstr;
   56618             : 
   56619           0 :         if (ndr_table_netlogon.num_calls < 43) {
   56620           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerTrustPasswordsGet_ndr_print");
   56621           0 :                 return NULL;
   56622             :         }
   56623           0 :         call = &ndr_table_netlogon.calls[42];
   56624             : 
   56625           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   56626           0 :         ret = PyUnicode_FromString(retstr);
   56627           0 :         TALLOC_FREE(retstr);
   56628             : 
   56629           0 :         return ret;
   56630             : }
   56631             : 
   56632           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   56633             : {
   56634           0 :         return py_netr_ServerTrustPasswordsGet_ndr_print(py_obj, "netr_ServerTrustPasswordsGet_in", NDR_IN);
   56635             : }
   56636             : 
   56637           0 : static PyObject *py_netr_ServerTrustPasswordsGet_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   56638             : {
   56639           0 :         return py_netr_ServerTrustPasswordsGet_ndr_print(py_obj, "netr_ServerTrustPasswordsGet_out", NDR_OUT);
   56640             : }
   56641             : 
   56642             : static PyMethodDef py_netr_ServerTrustPasswordsGet_methods[] = {
   56643             :         { "opnum", (PyCFunction)py_netr_ServerTrustPasswordsGet_ndr_opnum, METH_NOARGS|METH_CLASS,
   56644             :                 "netlogon.netr_ServerTrustPasswordsGet.opnum() -> 42 (0x2a) " },
   56645             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerTrustPasswordsGet_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   56646             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   56647             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerTrustPasswordsGet_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   56648             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   56649             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerTrustPasswordsGet_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   56650             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   56651             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerTrustPasswordsGet_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   56652             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   56653             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerTrustPasswordsGet_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   56654             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerTrustPasswordsGet_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   56655             :         { NULL, NULL, 0, NULL }
   56656             : };
   56657             : 
   56658             : 
   56659             : static PyTypeObject netr_ServerTrustPasswordsGet_Type = {
   56660             :         PyVarObject_HEAD_INIT(NULL, 0)
   56661             :         .tp_name = "netlogon.netr_ServerTrustPasswordsGet",
   56662             :         .tp_getset = py_netr_ServerTrustPasswordsGet_getsetters,
   56663             :         .tp_methods = py_netr_ServerTrustPasswordsGet_methods,
   56664             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   56665             :         .tp_new = py_netr_ServerTrustPasswordsGet_new,
   56666             : };
   56667             : 
   56668           0 : static bool pack_py_netr_ServerTrustPasswordsGet_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerTrustPasswordsGet *r)
   56669             : {
   56670             :         PyObject *py_server_name;
   56671             :         PyObject *py_account_name;
   56672             :         PyObject *py_secure_channel_type;
   56673             :         PyObject *py_computer_name;
   56674             :         PyObject *py_credential;
   56675           0 :         const char *kwnames[] = {
   56676             :                 "server_name", "account_name", "secure_channel_type", "computer_name", "credential", NULL
   56677             :         };
   56678             : 
   56679           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)) {
   56680           0 :                 return false;
   56681             :         }
   56682             : 
   56683           0 :         if (py_server_name == NULL) {
   56684           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   56685           0 :                 return false;
   56686             :         }
   56687           0 :         if (py_server_name == Py_None) {
   56688           0 :                 r->in.server_name = NULL;
   56689             :         } else {
   56690           0 :                 r->in.server_name = NULL;
   56691             :                 {
   56692             :                         const char *test_str;
   56693             :                         const char *talloc_str;
   56694           0 :                         PyObject *unicode = NULL;
   56695           0 :                         if (PyUnicode_Check(py_server_name)) {
   56696           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   56697           0 :                                 if (unicode == NULL) {
   56698           0 :                                         PyErr_NoMemory();
   56699           0 :                                         return false;
   56700             :                                 }
   56701           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   56702           0 :                         } else if (PyBytes_Check(py_server_name)) {
   56703           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   56704             :                         } else {
   56705           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   56706           0 :                                 return false;
   56707             :                         }
   56708           0 :                         talloc_str = talloc_strdup(r, test_str);
   56709           0 :                         if (unicode != NULL) {
   56710           0 :                                 Py_DECREF(unicode);
   56711             :                         }
   56712           0 :                         if (talloc_str == NULL) {
   56713           0 :                                 PyErr_NoMemory();
   56714           0 :                                 return false;
   56715             :                         }
   56716           0 :                         r->in.server_name = talloc_str;
   56717             :                 }
   56718             :         }
   56719           0 :         if (py_account_name == NULL) {
   56720           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.account_name");
   56721           0 :                 return false;
   56722             :         }
   56723           0 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   56724           0 :         if (r->in.account_name == NULL) {
   56725           0 :                 PyErr_NoMemory();
   56726           0 :                 return false;
   56727             :         }
   56728             :         {
   56729             :                 const char *test_str;
   56730             :                 const char *talloc_str;
   56731           0 :                 PyObject *unicode = NULL;
   56732           0 :                 if (PyUnicode_Check(py_account_name)) {
   56733           0 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   56734           0 :                         if (unicode == NULL) {
   56735           0 :                                 PyErr_NoMemory();
   56736           0 :                                 return false;
   56737             :                         }
   56738           0 :                         test_str = PyBytes_AS_STRING(unicode);
   56739           0 :                 } else if (PyBytes_Check(py_account_name)) {
   56740           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   56741             :                 } else {
   56742           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   56743           0 :                         return false;
   56744             :                 }
   56745           0 :                 talloc_str = talloc_strdup(r, test_str);
   56746           0 :                 if (unicode != NULL) {
   56747           0 :                         Py_DECREF(unicode);
   56748             :                 }
   56749           0 :                 if (talloc_str == NULL) {
   56750           0 :                         PyErr_NoMemory();
   56751           0 :                         return false;
   56752             :                 }
   56753           0 :                 r->in.account_name = talloc_str;
   56754             :         }
   56755           0 :         if (py_secure_channel_type == NULL) {
   56756           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.secure_channel_type");
   56757           0 :                 return false;
   56758             :         }
   56759             :         {
   56760           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
   56761           0 :                 if (PyLong_Check(py_secure_channel_type)) {
   56762             :                         unsigned long long test_var;
   56763           0 :                         test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
   56764           0 :                         if (PyErr_Occurred() != NULL) {
   56765           0 :                                 return false;
   56766             :                         }
   56767           0 :                         if (test_var > uint_max) {
   56768           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   56769             :                                   PyLong_Type.tp_name, uint_max, test_var);
   56770           0 :                                 return false;
   56771             :                         }
   56772           0 :                         r->in.secure_channel_type = test_var;
   56773             :                 } else {
   56774           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   56775             :                           PyLong_Type.tp_name);
   56776           0 :                         return false;
   56777             :                 }
   56778             :         }
   56779           0 :         if (py_computer_name == NULL) {
   56780           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   56781           0 :                 return false;
   56782             :         }
   56783           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   56784           0 :         if (r->in.computer_name == NULL) {
   56785           0 :                 PyErr_NoMemory();
   56786           0 :                 return false;
   56787             :         }
   56788             :         {
   56789             :                 const char *test_str;
   56790             :                 const char *talloc_str;
   56791           0 :                 PyObject *unicode = NULL;
   56792           0 :                 if (PyUnicode_Check(py_computer_name)) {
   56793           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   56794           0 :                         if (unicode == NULL) {
   56795           0 :                                 PyErr_NoMemory();
   56796           0 :                                 return false;
   56797             :                         }
   56798           0 :                         test_str = PyBytes_AS_STRING(unicode);
   56799           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   56800           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   56801             :                 } else {
   56802           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   56803           0 :                         return false;
   56804             :                 }
   56805           0 :                 talloc_str = talloc_strdup(r, test_str);
   56806           0 :                 if (unicode != NULL) {
   56807           0 :                         Py_DECREF(unicode);
   56808             :                 }
   56809           0 :                 if (talloc_str == NULL) {
   56810           0 :                         PyErr_NoMemory();
   56811           0 :                         return false;
   56812             :                 }
   56813           0 :                 r->in.computer_name = talloc_str;
   56814             :         }
   56815           0 :         if (py_credential == NULL) {
   56816           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   56817           0 :                 return false;
   56818             :         }
   56819           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   56820           0 :         if (r->in.credential == NULL) {
   56821           0 :                 PyErr_NoMemory();
   56822           0 :                 return false;
   56823             :         }
   56824           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   56825           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   56826           0 :                 PyErr_NoMemory();
   56827           0 :                 return false;
   56828             :         }
   56829           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   56830           0 :         return true;
   56831             : }
   56832             : 
   56833           0 : static PyObject *unpack_py_netr_ServerTrustPasswordsGet_args_out(struct netr_ServerTrustPasswordsGet *r)
   56834             : {
   56835             :         PyObject *result;
   56836             :         PyObject *py_return_authenticator;
   56837             :         PyObject *py_new_owf_password;
   56838             :         PyObject *py_old_owf_password;
   56839           0 :         result = PyTuple_New(3);
   56840           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   56841           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   56842           0 :         py_new_owf_password = pytalloc_reference_ex(samr_Password_Type, r->out.new_owf_password, r->out.new_owf_password);
   56843           0 :         PyTuple_SetItem(result, 1, py_new_owf_password);
   56844           0 :         py_old_owf_password = pytalloc_reference_ex(samr_Password_Type, r->out.old_owf_password, r->out.old_owf_password);
   56845           0 :         PyTuple_SetItem(result, 2, py_old_owf_password);
   56846           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   56847           0 :                 PyErr_SetNTSTATUS(r->out.result);
   56848           0 :                 return NULL;
   56849             :         }
   56850             : 
   56851           0 :         return result;
   56852             : }
   56853             : 
   56854             : 
   56855           0 : static PyObject *py_netr_DsRGetForestTrustInformation_in_get_server_name(PyObject *obj, void *closure)
   56856             : {
   56857           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(obj);
   56858             :         PyObject *py_server_name;
   56859           0 :         if (object->in.server_name == NULL) {
   56860           0 :                 Py_RETURN_NONE;
   56861             :         }
   56862           0 :         if (object->in.server_name == NULL) {
   56863           0 :                 py_server_name = Py_None;
   56864           0 :                 Py_INCREF(py_server_name);
   56865             :         } else {
   56866           0 :                 if (object->in.server_name == NULL) {
   56867           0 :                         py_server_name = Py_None;
   56868           0 :                         Py_INCREF(py_server_name);
   56869             :                 } else {
   56870           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   56871             :                 }
   56872             :         }
   56873           0 :         return py_server_name;
   56874             : }
   56875             : 
   56876           0 : static int py_netr_DsRGetForestTrustInformation_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   56877             : {
   56878           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   56879           0 :         if (value == NULL) {
   56880           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   56881           0 :                 return -1;
   56882             :         }
   56883           0 :         if (value == Py_None) {
   56884           0 :                 object->in.server_name = NULL;
   56885             :         } else {
   56886           0 :                 object->in.server_name = NULL;
   56887             :                 {
   56888             :                         const char *test_str;
   56889             :                         const char *talloc_str;
   56890           0 :                         PyObject *unicode = NULL;
   56891           0 :                         if (PyUnicode_Check(value)) {
   56892           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   56893           0 :                                 if (unicode == NULL) {
   56894           0 :                                         PyErr_NoMemory();
   56895           0 :                                         return -1;
   56896             :                                 }
   56897           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   56898           0 :                         } else if (PyBytes_Check(value)) {
   56899           0 :                                 test_str = PyBytes_AS_STRING(value);
   56900             :                         } else {
   56901           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   56902           0 :                                 return -1;
   56903             :                         }
   56904           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   56905           0 :                         if (unicode != NULL) {
   56906           0 :                                 Py_DECREF(unicode);
   56907             :                         }
   56908           0 :                         if (talloc_str == NULL) {
   56909           0 :                                 PyErr_NoMemory();
   56910           0 :                                 return -1;
   56911             :                         }
   56912           0 :                         object->in.server_name = talloc_str;
   56913             :                 }
   56914             :         }
   56915           0 :         return 0;
   56916             : }
   56917             : 
   56918           0 : static PyObject *py_netr_DsRGetForestTrustInformation_in_get_trusted_domain_name(PyObject *obj, void *closure)
   56919             : {
   56920           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(obj);
   56921             :         PyObject *py_trusted_domain_name;
   56922           0 :         if (object->in.trusted_domain_name == NULL) {
   56923           0 :                 Py_RETURN_NONE;
   56924             :         }
   56925           0 :         if (object->in.trusted_domain_name == NULL) {
   56926           0 :                 py_trusted_domain_name = Py_None;
   56927           0 :                 Py_INCREF(py_trusted_domain_name);
   56928             :         } else {
   56929           0 :                 if (object->in.trusted_domain_name == NULL) {
   56930           0 :                         py_trusted_domain_name = Py_None;
   56931           0 :                         Py_INCREF(py_trusted_domain_name);
   56932             :                 } else {
   56933           0 :                         py_trusted_domain_name = PyUnicode_Decode(object->in.trusted_domain_name, strlen(object->in.trusted_domain_name), "utf-8", "ignore");
   56934             :                 }
   56935             :         }
   56936           0 :         return py_trusted_domain_name;
   56937             : }
   56938             : 
   56939           0 : static int py_netr_DsRGetForestTrustInformation_in_set_trusted_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   56940             : {
   56941           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   56942           0 :         if (value == NULL) {
   56943           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.trusted_domain_name");
   56944           0 :                 return -1;
   56945             :         }
   56946           0 :         if (value == Py_None) {
   56947           0 :                 object->in.trusted_domain_name = NULL;
   56948             :         } else {
   56949           0 :                 object->in.trusted_domain_name = NULL;
   56950             :                 {
   56951             :                         const char *test_str;
   56952             :                         const char *talloc_str;
   56953           0 :                         PyObject *unicode = NULL;
   56954           0 :                         if (PyUnicode_Check(value)) {
   56955           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   56956           0 :                                 if (unicode == NULL) {
   56957           0 :                                         PyErr_NoMemory();
   56958           0 :                                         return -1;
   56959             :                                 }
   56960           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   56961           0 :                         } else if (PyBytes_Check(value)) {
   56962           0 :                                 test_str = PyBytes_AS_STRING(value);
   56963             :                         } else {
   56964           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   56965           0 :                                 return -1;
   56966             :                         }
   56967           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   56968           0 :                         if (unicode != NULL) {
   56969           0 :                                 Py_DECREF(unicode);
   56970             :                         }
   56971           0 :                         if (talloc_str == NULL) {
   56972           0 :                                 PyErr_NoMemory();
   56973           0 :                                 return -1;
   56974             :                         }
   56975           0 :                         object->in.trusted_domain_name = talloc_str;
   56976             :                 }
   56977             :         }
   56978           0 :         return 0;
   56979             : }
   56980             : 
   56981           0 : static PyObject *py_netr_DsRGetForestTrustInformation_in_get_flags(PyObject *obj, void *closure)
   56982             : {
   56983           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(obj);
   56984             :         PyObject *py_flags;
   56985           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
   56986           0 :         return py_flags;
   56987             : }
   56988             : 
   56989           0 : static int py_netr_DsRGetForestTrustInformation_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   56990             : {
   56991           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   56992           0 :         if (value == NULL) {
   56993           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   56994           0 :                 return -1;
   56995             :         }
   56996             :         {
   56997           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   56998           0 :                 if (PyLong_Check(value)) {
   56999             :                         unsigned long long test_var;
   57000           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   57001           0 :                         if (PyErr_Occurred() != NULL) {
   57002           0 :                                 return -1;
   57003             :                         }
   57004           0 :                         if (test_var > uint_max) {
   57005           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   57006             :                                   PyLong_Type.tp_name, uint_max, test_var);
   57007           0 :                                 return -1;
   57008             :                         }
   57009           0 :                         object->in.flags = test_var;
   57010             :                 } else {
   57011           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   57012             :                           PyLong_Type.tp_name);
   57013           0 :                         return -1;
   57014             :                 }
   57015             :         }
   57016           0 :         return 0;
   57017             : }
   57018             : 
   57019           0 : static PyObject *py_netr_DsRGetForestTrustInformation_out_get_forest_trust_info(PyObject *obj, void *closure)
   57020             : {
   57021           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(obj);
   57022             :         PyObject *py_forest_trust_info;
   57023           0 :         if (object->out.forest_trust_info == NULL) {
   57024           0 :                 Py_RETURN_NONE;
   57025             :         }
   57026           0 :         if (*object->out.forest_trust_info == NULL) {
   57027           0 :                 py_forest_trust_info = Py_None;
   57028           0 :                 Py_INCREF(py_forest_trust_info);
   57029             :         } else {
   57030           0 :                 py_forest_trust_info = pytalloc_reference_ex(lsa_ForestTrustInformation_Type, *object->out.forest_trust_info, *object->out.forest_trust_info);
   57031             :         }
   57032           0 :         return py_forest_trust_info;
   57033             : }
   57034             : 
   57035           0 : static int py_netr_DsRGetForestTrustInformation_out_set_forest_trust_info(PyObject *py_obj, PyObject *value, void *closure)
   57036             : {
   57037           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   57038           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.forest_trust_info));
   57039           0 :         if (value == NULL) {
   57040           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.forest_trust_info");
   57041           0 :                 return -1;
   57042             :         }
   57043           0 :         object->out.forest_trust_info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.forest_trust_info);
   57044           0 :         if (object->out.forest_trust_info == NULL) {
   57045           0 :                 PyErr_NoMemory();
   57046           0 :                 return -1;
   57047             :         }
   57048           0 :         if (value == Py_None) {
   57049           0 :                 *object->out.forest_trust_info = NULL;
   57050             :         } else {
   57051           0 :                 *object->out.forest_trust_info = NULL;
   57052           0 :                 PY_CHECK_TYPE(lsa_ForestTrustInformation_Type, value, return -1;);
   57053           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   57054           0 :                         PyErr_NoMemory();
   57055           0 :                         return -1;
   57056             :                 }
   57057           0 :                 *object->out.forest_trust_info = (struct lsa_ForestTrustInformation *)pytalloc_get_ptr(value);
   57058             :         }
   57059           0 :         return 0;
   57060             : }
   57061             : 
   57062           0 : static PyObject *py_netr_DsRGetForestTrustInformation_get_result(PyObject *obj, void *closure)
   57063             : {
   57064           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(obj);
   57065             :         PyObject *py_result;
   57066           0 :         py_result = PyErr_FromWERROR(object->out.result);
   57067           0 :         return py_result;
   57068             : }
   57069             : 
   57070           0 : static int py_netr_DsRGetForestTrustInformation_set_result(PyObject *py_obj, PyObject *value, void *closure)
   57071             : {
   57072           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   57073           0 :         if (value == NULL) {
   57074           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   57075           0 :                 return -1;
   57076             :         }
   57077           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   57078           0 :         return 0;
   57079             : }
   57080             : 
   57081             : static PyGetSetDef py_netr_DsRGetForestTrustInformation_getsetters[] = {
   57082             :         {
   57083             :                 .name = discard_const_p(char, "in_server_name"),
   57084             :                 .get = py_netr_DsRGetForestTrustInformation_in_get_server_name,
   57085             :                 .set = py_netr_DsRGetForestTrustInformation_in_set_server_name,
   57086             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   57087             :         },
   57088             :         {
   57089             :                 .name = discard_const_p(char, "in_trusted_domain_name"),
   57090             :                 .get = py_netr_DsRGetForestTrustInformation_in_get_trusted_domain_name,
   57091             :                 .set = py_netr_DsRGetForestTrustInformation_in_set_trusted_domain_name,
   57092             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   57093             :         },
   57094             :         {
   57095             :                 .name = discard_const_p(char, "in_flags"),
   57096             :                 .get = py_netr_DsRGetForestTrustInformation_in_get_flags,
   57097             :                 .set = py_netr_DsRGetForestTrustInformation_in_set_flags,
   57098             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   57099             :         },
   57100             :         {
   57101             :                 .name = discard_const_p(char, "out_forest_trust_info"),
   57102             :                 .get = py_netr_DsRGetForestTrustInformation_out_get_forest_trust_info,
   57103             :                 .set = py_netr_DsRGetForestTrustInformation_out_set_forest_trust_info,
   57104             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_ForestTrustInformation")
   57105             :         },
   57106             :         {
   57107             :                 .name = discard_const_p(char, "result"),
   57108             :                 .get = py_netr_DsRGetForestTrustInformation_get_result,
   57109             :                 .set = py_netr_DsRGetForestTrustInformation_set_result,
   57110             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   57111             :         },
   57112             :         { .name = NULL }
   57113             : };
   57114             : 
   57115           0 : static PyObject *py_netr_DsRGetForestTrustInformation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   57116             : {
   57117           0 :         PyObject *self = pytalloc_new(struct netr_DsRGetForestTrustInformation, type);
   57118           0 :         struct netr_DsRGetForestTrustInformation *_self = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(self);
   57119           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   57120             :         /* a pointer to a NULL pointer */
   57121           0 :         _self->out.forest_trust_info = talloc_zero(mem_ctx, struct lsa_ForestTrustInformation *);
   57122           0 :         return self;
   57123             : }
   57124             : 
   57125           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   57126             : {
   57127             : 
   57128             : 
   57129           0 :         return PyLong_FromLong(43);
   57130             : }
   57131             : 
   57132           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   57133             : {
   57134           0 :         const struct ndr_interface_call *call = NULL;
   57135           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   57136           0 :         PyObject *ret = NULL;
   57137           0 :         struct ndr_push *push = NULL;
   57138             :         DATA_BLOB blob;
   57139             :         enum ndr_err_code err;
   57140             : 
   57141           0 :         if (ndr_table_netlogon.num_calls < 44) {
   57142           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetForestTrustInformation_ndr_pack");
   57143           0 :                 return NULL;
   57144             :         }
   57145           0 :         call = &ndr_table_netlogon.calls[43];
   57146             : 
   57147           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   57148           0 :         if (push == NULL) {
   57149           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   57150           0 :                 return NULL;
   57151             :         }
   57152             : 
   57153           0 :         push->flags |= ndr_push_flags;
   57154             : 
   57155           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   57156           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   57157           0 :                 TALLOC_FREE(push);
   57158           0 :                 PyErr_SetNdrError(err);
   57159           0 :                 return NULL;
   57160             :         }
   57161           0 :         blob = ndr_push_blob(push);
   57162           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   57163           0 :         TALLOC_FREE(push);
   57164           0 :         return ret;
   57165             : }
   57166             : 
   57167           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57168             : {
   57169           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   57170           0 :         PyObject *bigendian_obj = NULL;
   57171           0 :         PyObject *ndr64_obj = NULL;
   57172           0 :         uint32_t ndr_push_flags = 0;
   57173             : 
   57174           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   57175             :                 discard_const_p(char *, kwnames),
   57176             :                 &bigendian_obj,
   57177             :                 &ndr64_obj)) {
   57178           0 :                 return NULL;
   57179             :         }
   57180             : 
   57181           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57182           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   57183             :         }
   57184           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57185           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   57186             :         }
   57187             : 
   57188           0 :         return py_netr_DsRGetForestTrustInformation_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   57189             : }
   57190             : 
   57191           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57192             : {
   57193           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   57194           0 :         PyObject *bigendian_obj = NULL;
   57195           0 :         PyObject *ndr64_obj = NULL;
   57196           0 :         uint32_t ndr_push_flags = 0;
   57197             : 
   57198           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   57199             :                 discard_const_p(char *, kwnames),
   57200             :                 &bigendian_obj,
   57201             :                 &ndr64_obj)) {
   57202           0 :                 return NULL;
   57203             :         }
   57204             : 
   57205           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57206           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   57207             :         }
   57208           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57209           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   57210             :         }
   57211             : 
   57212           0 :         return py_netr_DsRGetForestTrustInformation_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   57213             : }
   57214             : 
   57215           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   57216             : {
   57217           0 :         const struct ndr_interface_call *call = NULL;
   57218           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   57219           0 :         struct ndr_pull *pull = NULL;
   57220             :         enum ndr_err_code err;
   57221             : 
   57222           0 :         if (ndr_table_netlogon.num_calls < 44) {
   57223           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetForestTrustInformation_ndr_unpack");
   57224           0 :                 return NULL;
   57225             :         }
   57226           0 :         call = &ndr_table_netlogon.calls[43];
   57227             : 
   57228           0 :         pull = ndr_pull_init_blob(blob, object);
   57229           0 :         if (pull == NULL) {
   57230           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   57231           0 :                 return NULL;
   57232             :         }
   57233             : 
   57234           0 :         pull->flags |= ndr_pull_flags;
   57235             : 
   57236           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   57237           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   57238           0 :                 TALLOC_FREE(pull);
   57239           0 :                 PyErr_SetNdrError(err);
   57240           0 :                 return NULL;
   57241             :         }
   57242           0 :         if (!allow_remaining) {
   57243             :                 uint32_t highest_ofs;
   57244             : 
   57245           0 :                 if (pull->offset > pull->relative_highest_offset) {
   57246           0 :                         highest_ofs = pull->offset;
   57247             :                 } else {
   57248           0 :                         highest_ofs = pull->relative_highest_offset;
   57249             :                 }
   57250           0 :                 if (highest_ofs < pull->data_size) {
   57251           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   57252             :                                 "not all bytes consumed ofs[%u] size[%u]",
   57253             :                                 highest_ofs, pull->data_size);
   57254           0 :                         TALLOC_FREE(pull);
   57255           0 :                         PyErr_SetNdrError(err);
   57256           0 :                         return NULL;
   57257             :                 }
   57258             :         }
   57259             : 
   57260           0 :         TALLOC_FREE(pull);
   57261           0 :         Py_RETURN_NONE;
   57262             : }
   57263             : 
   57264           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57265             : {
   57266             :         DATA_BLOB blob;
   57267           0 :         Py_ssize_t blob_length = 0;
   57268           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   57269           0 :         PyObject *bigendian_obj = NULL;
   57270           0 :         PyObject *ndr64_obj = NULL;
   57271           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   57272           0 :         PyObject *allow_remaining_obj = NULL;
   57273           0 :         bool allow_remaining = false;
   57274             : 
   57275           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   57276             :                 discard_const_p(char *, kwnames),
   57277             :                 &blob.data, &blob_length,
   57278             :                 &bigendian_obj,
   57279             :                 &ndr64_obj,
   57280             :                 &allow_remaining_obj)) {
   57281           0 :                 return NULL;
   57282             :         }
   57283           0 :         blob.length = blob_length;
   57284             : 
   57285           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57286           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   57287             :         }
   57288           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57289           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   57290             :         }
   57291             : 
   57292           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   57293           0 :                 allow_remaining = true;
   57294             :         }
   57295             : 
   57296           0 :         return py_netr_DsRGetForestTrustInformation_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   57297             : }
   57298             : 
   57299           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57300             : {
   57301             :         DATA_BLOB blob;
   57302           0 :         Py_ssize_t blob_length = 0;
   57303           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   57304           0 :         PyObject *bigendian_obj = NULL;
   57305           0 :         PyObject *ndr64_obj = NULL;
   57306           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   57307           0 :         PyObject *allow_remaining_obj = NULL;
   57308           0 :         bool allow_remaining = false;
   57309             : 
   57310           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   57311             :                 discard_const_p(char *, kwnames),
   57312             :                 &blob.data, &blob_length,
   57313             :                 &bigendian_obj,
   57314             :                 &ndr64_obj,
   57315             :                 &allow_remaining_obj)) {
   57316           0 :                 return NULL;
   57317             :         }
   57318           0 :         blob.length = blob_length;
   57319             : 
   57320           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57321           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   57322             :         }
   57323           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57324           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   57325             :         }
   57326             : 
   57327           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   57328           0 :                 allow_remaining = true;
   57329             :         }
   57330             : 
   57331           0 :         return py_netr_DsRGetForestTrustInformation_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   57332             : }
   57333             : 
   57334           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   57335             : {
   57336           0 :         const struct ndr_interface_call *call = NULL;
   57337           0 :         struct netr_DsRGetForestTrustInformation *object = (struct netr_DsRGetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   57338             :         PyObject *ret;
   57339             :         char *retstr;
   57340             : 
   57341           0 :         if (ndr_table_netlogon.num_calls < 44) {
   57342           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsRGetForestTrustInformation_ndr_print");
   57343           0 :                 return NULL;
   57344             :         }
   57345           0 :         call = &ndr_table_netlogon.calls[43];
   57346             : 
   57347           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   57348           0 :         ret = PyUnicode_FromString(retstr);
   57349           0 :         TALLOC_FREE(retstr);
   57350             : 
   57351           0 :         return ret;
   57352             : }
   57353             : 
   57354           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   57355             : {
   57356           0 :         return py_netr_DsRGetForestTrustInformation_ndr_print(py_obj, "netr_DsRGetForestTrustInformation_in", NDR_IN);
   57357             : }
   57358             : 
   57359           0 : static PyObject *py_netr_DsRGetForestTrustInformation_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   57360             : {
   57361           0 :         return py_netr_DsRGetForestTrustInformation_ndr_print(py_obj, "netr_DsRGetForestTrustInformation_out", NDR_OUT);
   57362             : }
   57363             : 
   57364             : static PyMethodDef py_netr_DsRGetForestTrustInformation_methods[] = {
   57365             :         { "opnum", (PyCFunction)py_netr_DsRGetForestTrustInformation_ndr_opnum, METH_NOARGS|METH_CLASS,
   57366             :                 "netlogon.netr_DsRGetForestTrustInformation.opnum() -> 43 (0x2b) " },
   57367             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetForestTrustInformation_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   57368             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   57369             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetForestTrustInformation_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   57370             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   57371             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetForestTrustInformation_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   57372             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   57373             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsRGetForestTrustInformation_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   57374             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   57375             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsRGetForestTrustInformation_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   57376             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsRGetForestTrustInformation_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   57377             :         { NULL, NULL, 0, NULL }
   57378             : };
   57379             : 
   57380             : 
   57381             : static PyTypeObject netr_DsRGetForestTrustInformation_Type = {
   57382             :         PyVarObject_HEAD_INIT(NULL, 0)
   57383             :         .tp_name = "netlogon.netr_DsRGetForestTrustInformation",
   57384             :         .tp_getset = py_netr_DsRGetForestTrustInformation_getsetters,
   57385             :         .tp_methods = py_netr_DsRGetForestTrustInformation_methods,
   57386             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   57387             :         .tp_new = py_netr_DsRGetForestTrustInformation_new,
   57388             : };
   57389             : 
   57390         158 : static bool pack_py_netr_DsRGetForestTrustInformation_args_in(PyObject *args, PyObject *kwargs, struct netr_DsRGetForestTrustInformation *r)
   57391             : {
   57392             :         PyObject *py_server_name;
   57393             :         PyObject *py_trusted_domain_name;
   57394             :         PyObject *py_flags;
   57395         158 :         const char *kwnames[] = {
   57396             :                 "server_name", "trusted_domain_name", "flags", NULL
   57397             :         };
   57398             : 
   57399         158 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:netr_DsRGetForestTrustInformation", discard_const_p(char *, kwnames), &py_server_name, &py_trusted_domain_name, &py_flags)) {
   57400           0 :                 return false;
   57401             :         }
   57402             : 
   57403         158 :         if (py_server_name == NULL) {
   57404           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   57405           0 :                 return false;
   57406             :         }
   57407         158 :         if (py_server_name == Py_None) {
   57408           0 :                 r->in.server_name = NULL;
   57409             :         } else {
   57410         158 :                 r->in.server_name = NULL;
   57411             :                 {
   57412             :                         const char *test_str;
   57413             :                         const char *talloc_str;
   57414         158 :                         PyObject *unicode = NULL;
   57415         158 :                         if (PyUnicode_Check(py_server_name)) {
   57416         158 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   57417         158 :                                 if (unicode == NULL) {
   57418           0 :                                         PyErr_NoMemory();
   57419           0 :                                         return false;
   57420             :                                 }
   57421         158 :                                 test_str = PyBytes_AS_STRING(unicode);
   57422           0 :                         } else if (PyBytes_Check(py_server_name)) {
   57423           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   57424             :                         } else {
   57425           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   57426           0 :                                 return false;
   57427             :                         }
   57428         158 :                         talloc_str = talloc_strdup(r, test_str);
   57429         158 :                         if (unicode != NULL) {
   57430         158 :                                 Py_DECREF(unicode);
   57431             :                         }
   57432         158 :                         if (talloc_str == NULL) {
   57433           0 :                                 PyErr_NoMemory();
   57434           0 :                                 return false;
   57435             :                         }
   57436         158 :                         r->in.server_name = talloc_str;
   57437             :                 }
   57438             :         }
   57439         158 :         if (py_trusted_domain_name == NULL) {
   57440           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.trusted_domain_name");
   57441           0 :                 return false;
   57442             :         }
   57443         158 :         if (py_trusted_domain_name == Py_None) {
   57444         138 :                 r->in.trusted_domain_name = NULL;
   57445             :         } else {
   57446          20 :                 r->in.trusted_domain_name = NULL;
   57447             :                 {
   57448             :                         const char *test_str;
   57449             :                         const char *talloc_str;
   57450          20 :                         PyObject *unicode = NULL;
   57451          20 :                         if (PyUnicode_Check(py_trusted_domain_name)) {
   57452          20 :                                 unicode = PyUnicode_AsEncodedString(py_trusted_domain_name, "utf-8", "ignore");
   57453          20 :                                 if (unicode == NULL) {
   57454           0 :                                         PyErr_NoMemory();
   57455           0 :                                         return false;
   57456             :                                 }
   57457          20 :                                 test_str = PyBytes_AS_STRING(unicode);
   57458           0 :                         } else if (PyBytes_Check(py_trusted_domain_name)) {
   57459           0 :                                 test_str = PyBytes_AS_STRING(py_trusted_domain_name);
   57460             :                         } else {
   57461           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_trusted_domain_name)->tp_name);
   57462           0 :                                 return false;
   57463             :                         }
   57464          20 :                         talloc_str = talloc_strdup(r, test_str);
   57465          20 :                         if (unicode != NULL) {
   57466          20 :                                 Py_DECREF(unicode);
   57467             :                         }
   57468          20 :                         if (talloc_str == NULL) {
   57469           0 :                                 PyErr_NoMemory();
   57470           0 :                                 return false;
   57471             :                         }
   57472          20 :                         r->in.trusted_domain_name = talloc_str;
   57473             :                 }
   57474             :         }
   57475         158 :         if (py_flags == NULL) {
   57476           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   57477           0 :                 return false;
   57478             :         }
   57479             :         {
   57480         158 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   57481         158 :                 if (PyLong_Check(py_flags)) {
   57482             :                         unsigned long long test_var;
   57483         158 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   57484         158 :                         if (PyErr_Occurred() != NULL) {
   57485           0 :                                 return false;
   57486             :                         }
   57487         158 :                         if (test_var > uint_max) {
   57488           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   57489             :                                   PyLong_Type.tp_name, uint_max, test_var);
   57490           0 :                                 return false;
   57491             :                         }
   57492         158 :                         r->in.flags = test_var;
   57493             :                 } else {
   57494           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   57495             :                           PyLong_Type.tp_name);
   57496           0 :                         return false;
   57497             :                 }
   57498             :         }
   57499         158 :         return true;
   57500             : }
   57501             : 
   57502         158 : static PyObject *unpack_py_netr_DsRGetForestTrustInformation_args_out(struct netr_DsRGetForestTrustInformation *r)
   57503             : {
   57504             :         PyObject *result;
   57505             :         PyObject *py_forest_trust_info;
   57506         158 :         if (*r->out.forest_trust_info == NULL) {
   57507           4 :                 py_forest_trust_info = Py_None;
   57508           4 :                 Py_INCREF(py_forest_trust_info);
   57509             :         } else {
   57510         154 :                 py_forest_trust_info = pytalloc_reference_ex(lsa_ForestTrustInformation_Type, *r->out.forest_trust_info, *r->out.forest_trust_info);
   57511             :         }
   57512         158 :         result = py_forest_trust_info;
   57513         158 :         if (!W_ERROR_IS_OK(r->out.result)) {
   57514           4 :                 PyErr_SetWERROR(r->out.result);
   57515           4 :                 return NULL;
   57516             :         }
   57517             : 
   57518         150 :         return result;
   57519             : }
   57520             : 
   57521             : 
   57522           0 : static PyObject *py_netr_GetForestTrustInformation_in_get_server_name(PyObject *obj, void *closure)
   57523             : {
   57524           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(obj);
   57525             :         PyObject *py_server_name;
   57526           0 :         if (object->in.server_name == NULL) {
   57527           0 :                 Py_RETURN_NONE;
   57528             :         }
   57529           0 :         if (object->in.server_name == NULL) {
   57530           0 :                 py_server_name = Py_None;
   57531           0 :                 Py_INCREF(py_server_name);
   57532             :         } else {
   57533           0 :                 if (object->in.server_name == NULL) {
   57534           0 :                         py_server_name = Py_None;
   57535           0 :                         Py_INCREF(py_server_name);
   57536             :                 } else {
   57537           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   57538             :                 }
   57539             :         }
   57540           0 :         return py_server_name;
   57541             : }
   57542             : 
   57543           0 : static int py_netr_GetForestTrustInformation_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   57544             : {
   57545           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   57546           0 :         if (value == NULL) {
   57547           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   57548           0 :                 return -1;
   57549             :         }
   57550           0 :         if (value == Py_None) {
   57551           0 :                 object->in.server_name = NULL;
   57552             :         } else {
   57553           0 :                 object->in.server_name = NULL;
   57554             :                 {
   57555             :                         const char *test_str;
   57556             :                         const char *talloc_str;
   57557           0 :                         PyObject *unicode = NULL;
   57558           0 :                         if (PyUnicode_Check(value)) {
   57559           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   57560           0 :                                 if (unicode == NULL) {
   57561           0 :                                         PyErr_NoMemory();
   57562           0 :                                         return -1;
   57563             :                                 }
   57564           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   57565           0 :                         } else if (PyBytes_Check(value)) {
   57566           0 :                                 test_str = PyBytes_AS_STRING(value);
   57567             :                         } else {
   57568           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   57569           0 :                                 return -1;
   57570             :                         }
   57571           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   57572           0 :                         if (unicode != NULL) {
   57573           0 :                                 Py_DECREF(unicode);
   57574             :                         }
   57575           0 :                         if (talloc_str == NULL) {
   57576           0 :                                 PyErr_NoMemory();
   57577           0 :                                 return -1;
   57578             :                         }
   57579           0 :                         object->in.server_name = talloc_str;
   57580             :                 }
   57581             :         }
   57582           0 :         return 0;
   57583             : }
   57584             : 
   57585           0 : static PyObject *py_netr_GetForestTrustInformation_in_get_computer_name(PyObject *obj, void *closure)
   57586             : {
   57587           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(obj);
   57588             :         PyObject *py_computer_name;
   57589           0 :         if (object->in.computer_name == NULL) {
   57590           0 :                 Py_RETURN_NONE;
   57591             :         }
   57592           0 :         if (object->in.computer_name == NULL) {
   57593           0 :                 py_computer_name = Py_None;
   57594           0 :                 Py_INCREF(py_computer_name);
   57595             :         } else {
   57596           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   57597             :         }
   57598           0 :         return py_computer_name;
   57599             : }
   57600             : 
   57601           0 : static int py_netr_GetForestTrustInformation_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   57602             : {
   57603           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   57604           0 :         if (value == NULL) {
   57605           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   57606           0 :                 return -1;
   57607             :         }
   57608           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   57609           0 :         if (object->in.computer_name == NULL) {
   57610           0 :                 PyErr_NoMemory();
   57611           0 :                 return -1;
   57612             :         }
   57613             :         {
   57614             :                 const char *test_str;
   57615             :                 const char *talloc_str;
   57616           0 :                 PyObject *unicode = NULL;
   57617           0 :                 if (PyUnicode_Check(value)) {
   57618           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   57619           0 :                         if (unicode == NULL) {
   57620           0 :                                 PyErr_NoMemory();
   57621           0 :                                 return -1;
   57622             :                         }
   57623           0 :                         test_str = PyBytes_AS_STRING(unicode);
   57624           0 :                 } else if (PyBytes_Check(value)) {
   57625           0 :                         test_str = PyBytes_AS_STRING(value);
   57626             :                 } else {
   57627           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   57628           0 :                         return -1;
   57629             :                 }
   57630           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   57631           0 :                 if (unicode != NULL) {
   57632           0 :                         Py_DECREF(unicode);
   57633             :                 }
   57634           0 :                 if (talloc_str == NULL) {
   57635           0 :                         PyErr_NoMemory();
   57636           0 :                         return -1;
   57637             :                 }
   57638           0 :                 object->in.computer_name = talloc_str;
   57639             :         }
   57640           0 :         return 0;
   57641             : }
   57642             : 
   57643           0 : static PyObject *py_netr_GetForestTrustInformation_in_get_credential(PyObject *obj, void *closure)
   57644             : {
   57645           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(obj);
   57646             :         PyObject *py_credential;
   57647           0 :         if (object->in.credential == NULL) {
   57648           0 :                 Py_RETURN_NONE;
   57649             :         }
   57650           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   57651           0 :         return py_credential;
   57652             : }
   57653             : 
   57654           0 : static int py_netr_GetForestTrustInformation_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   57655             : {
   57656           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   57657           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   57658           0 :         if (value == NULL) {
   57659           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   57660           0 :                 return -1;
   57661             :         }
   57662           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   57663           0 :         if (object->in.credential == NULL) {
   57664           0 :                 PyErr_NoMemory();
   57665           0 :                 return -1;
   57666             :         }
   57667           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   57668           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   57669           0 :                 PyErr_NoMemory();
   57670           0 :                 return -1;
   57671             :         }
   57672           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   57673           0 :         return 0;
   57674             : }
   57675             : 
   57676           0 : static PyObject *py_netr_GetForestTrustInformation_out_get_return_authenticator(PyObject *obj, void *closure)
   57677             : {
   57678           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(obj);
   57679             :         PyObject *py_return_authenticator;
   57680           0 :         if (object->out.return_authenticator == NULL) {
   57681           0 :                 Py_RETURN_NONE;
   57682             :         }
   57683           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   57684           0 :         return py_return_authenticator;
   57685             : }
   57686             : 
   57687           0 : static int py_netr_GetForestTrustInformation_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   57688             : {
   57689           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   57690           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   57691           0 :         if (value == NULL) {
   57692           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   57693           0 :                 return -1;
   57694             :         }
   57695           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   57696           0 :         if (object->out.return_authenticator == NULL) {
   57697           0 :                 PyErr_NoMemory();
   57698           0 :                 return -1;
   57699             :         }
   57700           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   57701           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   57702           0 :                 PyErr_NoMemory();
   57703           0 :                 return -1;
   57704             :         }
   57705           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   57706           0 :         return 0;
   57707             : }
   57708             : 
   57709           0 : static PyObject *py_netr_GetForestTrustInformation_in_get_flags(PyObject *obj, void *closure)
   57710             : {
   57711           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(obj);
   57712             :         PyObject *py_flags;
   57713           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->in.flags);
   57714           0 :         return py_flags;
   57715             : }
   57716             : 
   57717           0 : static int py_netr_GetForestTrustInformation_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   57718             : {
   57719           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   57720           0 :         if (value == NULL) {
   57721           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   57722           0 :                 return -1;
   57723             :         }
   57724             :         {
   57725           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.flags));
   57726           0 :                 if (PyLong_Check(value)) {
   57727             :                         unsigned long long test_var;
   57728           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   57729           0 :                         if (PyErr_Occurred() != NULL) {
   57730           0 :                                 return -1;
   57731             :                         }
   57732           0 :                         if (test_var > uint_max) {
   57733           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   57734             :                                   PyLong_Type.tp_name, uint_max, test_var);
   57735           0 :                                 return -1;
   57736             :                         }
   57737           0 :                         object->in.flags = test_var;
   57738             :                 } else {
   57739           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   57740             :                           PyLong_Type.tp_name);
   57741           0 :                         return -1;
   57742             :                 }
   57743             :         }
   57744           0 :         return 0;
   57745             : }
   57746             : 
   57747           0 : static PyObject *py_netr_GetForestTrustInformation_out_get_forest_trust_info(PyObject *obj, void *closure)
   57748             : {
   57749           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(obj);
   57750             :         PyObject *py_forest_trust_info;
   57751           0 :         if (object->out.forest_trust_info == NULL) {
   57752           0 :                 Py_RETURN_NONE;
   57753             :         }
   57754           0 :         if (*object->out.forest_trust_info == NULL) {
   57755           0 :                 py_forest_trust_info = Py_None;
   57756           0 :                 Py_INCREF(py_forest_trust_info);
   57757             :         } else {
   57758           0 :                 py_forest_trust_info = pytalloc_reference_ex(lsa_ForestTrustInformation_Type, *object->out.forest_trust_info, *object->out.forest_trust_info);
   57759             :         }
   57760           0 :         return py_forest_trust_info;
   57761             : }
   57762             : 
   57763           0 : static int py_netr_GetForestTrustInformation_out_set_forest_trust_info(PyObject *py_obj, PyObject *value, void *closure)
   57764             : {
   57765           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   57766           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.forest_trust_info));
   57767           0 :         if (value == NULL) {
   57768           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.forest_trust_info");
   57769           0 :                 return -1;
   57770             :         }
   57771           0 :         object->out.forest_trust_info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.forest_trust_info);
   57772           0 :         if (object->out.forest_trust_info == NULL) {
   57773           0 :                 PyErr_NoMemory();
   57774           0 :                 return -1;
   57775             :         }
   57776           0 :         if (value == Py_None) {
   57777           0 :                 *object->out.forest_trust_info = NULL;
   57778             :         } else {
   57779           0 :                 *object->out.forest_trust_info = NULL;
   57780           0 :                 PY_CHECK_TYPE(lsa_ForestTrustInformation_Type, value, return -1;);
   57781           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   57782           0 :                         PyErr_NoMemory();
   57783           0 :                         return -1;
   57784             :                 }
   57785           0 :                 *object->out.forest_trust_info = (struct lsa_ForestTrustInformation *)pytalloc_get_ptr(value);
   57786             :         }
   57787           0 :         return 0;
   57788             : }
   57789             : 
   57790           0 : static PyObject *py_netr_GetForestTrustInformation_get_result(PyObject *obj, void *closure)
   57791             : {
   57792           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(obj);
   57793             :         PyObject *py_result;
   57794           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   57795           0 :         return py_result;
   57796             : }
   57797             : 
   57798           0 : static int py_netr_GetForestTrustInformation_set_result(PyObject *py_obj, PyObject *value, void *closure)
   57799             : {
   57800           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   57801           0 :         if (value == NULL) {
   57802           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   57803           0 :                 return -1;
   57804             :         }
   57805           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   57806           0 :         return 0;
   57807             : }
   57808             : 
   57809             : static PyGetSetDef py_netr_GetForestTrustInformation_getsetters[] = {
   57810             :         {
   57811             :                 .name = discard_const_p(char, "in_server_name"),
   57812             :                 .get = py_netr_GetForestTrustInformation_in_get_server_name,
   57813             :                 .set = py_netr_GetForestTrustInformation_in_set_server_name,
   57814             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   57815             :         },
   57816             :         {
   57817             :                 .name = discard_const_p(char, "in_computer_name"),
   57818             :                 .get = py_netr_GetForestTrustInformation_in_get_computer_name,
   57819             :                 .set = py_netr_GetForestTrustInformation_in_set_computer_name,
   57820             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   57821             :         },
   57822             :         {
   57823             :                 .name = discard_const_p(char, "in_credential"),
   57824             :                 .get = py_netr_GetForestTrustInformation_in_get_credential,
   57825             :                 .set = py_netr_GetForestTrustInformation_in_set_credential,
   57826             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   57827             :         },
   57828             :         {
   57829             :                 .name = discard_const_p(char, "out_return_authenticator"),
   57830             :                 .get = py_netr_GetForestTrustInformation_out_get_return_authenticator,
   57831             :                 .set = py_netr_GetForestTrustInformation_out_set_return_authenticator,
   57832             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   57833             :         },
   57834             :         {
   57835             :                 .name = discard_const_p(char, "in_flags"),
   57836             :                 .get = py_netr_GetForestTrustInformation_in_get_flags,
   57837             :                 .set = py_netr_GetForestTrustInformation_in_set_flags,
   57838             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   57839             :         },
   57840             :         {
   57841             :                 .name = discard_const_p(char, "out_forest_trust_info"),
   57842             :                 .get = py_netr_GetForestTrustInformation_out_get_forest_trust_info,
   57843             :                 .set = py_netr_GetForestTrustInformation_out_set_forest_trust_info,
   57844             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_ForestTrustInformation")
   57845             :         },
   57846             :         {
   57847             :                 .name = discard_const_p(char, "result"),
   57848             :                 .get = py_netr_GetForestTrustInformation_get_result,
   57849             :                 .set = py_netr_GetForestTrustInformation_set_result,
   57850             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   57851             :         },
   57852             :         { .name = NULL }
   57853             : };
   57854             : 
   57855           0 : static PyObject *py_netr_GetForestTrustInformation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   57856             : {
   57857           0 :         PyObject *self = pytalloc_new(struct netr_GetForestTrustInformation, type);
   57858           0 :         struct netr_GetForestTrustInformation *_self = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(self);
   57859           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   57860           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   57861           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   57862             :         /* a pointer to a NULL pointer */
   57863           0 :         _self->out.forest_trust_info = talloc_zero(mem_ctx, struct lsa_ForestTrustInformation *);
   57864           0 :         return self;
   57865             : }
   57866             : 
   57867           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   57868             : {
   57869             : 
   57870             : 
   57871           0 :         return PyLong_FromLong(44);
   57872             : }
   57873             : 
   57874           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   57875             : {
   57876           0 :         const struct ndr_interface_call *call = NULL;
   57877           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   57878           0 :         PyObject *ret = NULL;
   57879           0 :         struct ndr_push *push = NULL;
   57880             :         DATA_BLOB blob;
   57881             :         enum ndr_err_code err;
   57882             : 
   57883           0 :         if (ndr_table_netlogon.num_calls < 45) {
   57884           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetForestTrustInformation_ndr_pack");
   57885           0 :                 return NULL;
   57886             :         }
   57887           0 :         call = &ndr_table_netlogon.calls[44];
   57888             : 
   57889           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   57890           0 :         if (push == NULL) {
   57891           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   57892           0 :                 return NULL;
   57893             :         }
   57894             : 
   57895           0 :         push->flags |= ndr_push_flags;
   57896             : 
   57897           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   57898           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   57899           0 :                 TALLOC_FREE(push);
   57900           0 :                 PyErr_SetNdrError(err);
   57901           0 :                 return NULL;
   57902             :         }
   57903           0 :         blob = ndr_push_blob(push);
   57904           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   57905           0 :         TALLOC_FREE(push);
   57906           0 :         return ret;
   57907             : }
   57908             : 
   57909           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57910             : {
   57911           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   57912           0 :         PyObject *bigendian_obj = NULL;
   57913           0 :         PyObject *ndr64_obj = NULL;
   57914           0 :         uint32_t ndr_push_flags = 0;
   57915             : 
   57916           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   57917             :                 discard_const_p(char *, kwnames),
   57918             :                 &bigendian_obj,
   57919             :                 &ndr64_obj)) {
   57920           0 :                 return NULL;
   57921             :         }
   57922             : 
   57923           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57924           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   57925             :         }
   57926           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57927           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   57928             :         }
   57929             : 
   57930           0 :         return py_netr_GetForestTrustInformation_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   57931             : }
   57932             : 
   57933           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   57934             : {
   57935           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   57936           0 :         PyObject *bigendian_obj = NULL;
   57937           0 :         PyObject *ndr64_obj = NULL;
   57938           0 :         uint32_t ndr_push_flags = 0;
   57939             : 
   57940           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   57941             :                 discard_const_p(char *, kwnames),
   57942             :                 &bigendian_obj,
   57943             :                 &ndr64_obj)) {
   57944           0 :                 return NULL;
   57945             :         }
   57946             : 
   57947           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   57948           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   57949             :         }
   57950           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   57951           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   57952             :         }
   57953             : 
   57954           0 :         return py_netr_GetForestTrustInformation_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   57955             : }
   57956             : 
   57957           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   57958             : {
   57959           0 :         const struct ndr_interface_call *call = NULL;
   57960           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   57961           0 :         struct ndr_pull *pull = NULL;
   57962             :         enum ndr_err_code err;
   57963             : 
   57964           0 :         if (ndr_table_netlogon.num_calls < 45) {
   57965           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetForestTrustInformation_ndr_unpack");
   57966           0 :                 return NULL;
   57967             :         }
   57968           0 :         call = &ndr_table_netlogon.calls[44];
   57969             : 
   57970           0 :         pull = ndr_pull_init_blob(blob, object);
   57971           0 :         if (pull == NULL) {
   57972           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   57973           0 :                 return NULL;
   57974             :         }
   57975             : 
   57976           0 :         pull->flags |= ndr_pull_flags;
   57977             : 
   57978           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   57979           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   57980           0 :                 TALLOC_FREE(pull);
   57981           0 :                 PyErr_SetNdrError(err);
   57982           0 :                 return NULL;
   57983             :         }
   57984           0 :         if (!allow_remaining) {
   57985             :                 uint32_t highest_ofs;
   57986             : 
   57987           0 :                 if (pull->offset > pull->relative_highest_offset) {
   57988           0 :                         highest_ofs = pull->offset;
   57989             :                 } else {
   57990           0 :                         highest_ofs = pull->relative_highest_offset;
   57991             :                 }
   57992           0 :                 if (highest_ofs < pull->data_size) {
   57993           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   57994             :                                 "not all bytes consumed ofs[%u] size[%u]",
   57995             :                                 highest_ofs, pull->data_size);
   57996           0 :                         TALLOC_FREE(pull);
   57997           0 :                         PyErr_SetNdrError(err);
   57998           0 :                         return NULL;
   57999             :                 }
   58000             :         }
   58001             : 
   58002           0 :         TALLOC_FREE(pull);
   58003           0 :         Py_RETURN_NONE;
   58004             : }
   58005             : 
   58006           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   58007             : {
   58008             :         DATA_BLOB blob;
   58009           0 :         Py_ssize_t blob_length = 0;
   58010           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   58011           0 :         PyObject *bigendian_obj = NULL;
   58012           0 :         PyObject *ndr64_obj = NULL;
   58013           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   58014           0 :         PyObject *allow_remaining_obj = NULL;
   58015           0 :         bool allow_remaining = false;
   58016             : 
   58017           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   58018             :                 discard_const_p(char *, kwnames),
   58019             :                 &blob.data, &blob_length,
   58020             :                 &bigendian_obj,
   58021             :                 &ndr64_obj,
   58022             :                 &allow_remaining_obj)) {
   58023           0 :                 return NULL;
   58024             :         }
   58025           0 :         blob.length = blob_length;
   58026             : 
   58027           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   58028           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   58029             :         }
   58030           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   58031           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   58032             :         }
   58033             : 
   58034           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   58035           0 :                 allow_remaining = true;
   58036             :         }
   58037             : 
   58038           0 :         return py_netr_GetForestTrustInformation_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   58039             : }
   58040             : 
   58041           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   58042             : {
   58043             :         DATA_BLOB blob;
   58044           0 :         Py_ssize_t blob_length = 0;
   58045           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   58046           0 :         PyObject *bigendian_obj = NULL;
   58047           0 :         PyObject *ndr64_obj = NULL;
   58048           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   58049           0 :         PyObject *allow_remaining_obj = NULL;
   58050           0 :         bool allow_remaining = false;
   58051             : 
   58052           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   58053             :                 discard_const_p(char *, kwnames),
   58054             :                 &blob.data, &blob_length,
   58055             :                 &bigendian_obj,
   58056             :                 &ndr64_obj,
   58057             :                 &allow_remaining_obj)) {
   58058           0 :                 return NULL;
   58059             :         }
   58060           0 :         blob.length = blob_length;
   58061             : 
   58062           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   58063           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   58064             :         }
   58065           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   58066           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   58067             :         }
   58068             : 
   58069           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   58070           0 :                 allow_remaining = true;
   58071             :         }
   58072             : 
   58073           0 :         return py_netr_GetForestTrustInformation_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   58074             : }
   58075             : 
   58076           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   58077             : {
   58078           0 :         const struct ndr_interface_call *call = NULL;
   58079           0 :         struct netr_GetForestTrustInformation *object = (struct netr_GetForestTrustInformation *)pytalloc_get_ptr(py_obj);
   58080             :         PyObject *ret;
   58081             :         char *retstr;
   58082             : 
   58083           0 :         if (ndr_table_netlogon.num_calls < 45) {
   58084           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_GetForestTrustInformation_ndr_print");
   58085           0 :                 return NULL;
   58086             :         }
   58087           0 :         call = &ndr_table_netlogon.calls[44];
   58088             : 
   58089           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   58090           0 :         ret = PyUnicode_FromString(retstr);
   58091           0 :         TALLOC_FREE(retstr);
   58092             : 
   58093           0 :         return ret;
   58094             : }
   58095             : 
   58096           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   58097             : {
   58098           0 :         return py_netr_GetForestTrustInformation_ndr_print(py_obj, "netr_GetForestTrustInformation_in", NDR_IN);
   58099             : }
   58100             : 
   58101           0 : static PyObject *py_netr_GetForestTrustInformation_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   58102             : {
   58103           0 :         return py_netr_GetForestTrustInformation_ndr_print(py_obj, "netr_GetForestTrustInformation_out", NDR_OUT);
   58104             : }
   58105             : 
   58106             : static PyMethodDef py_netr_GetForestTrustInformation_methods[] = {
   58107             :         { "opnum", (PyCFunction)py_netr_GetForestTrustInformation_ndr_opnum, METH_NOARGS|METH_CLASS,
   58108             :                 "netlogon.netr_GetForestTrustInformation.opnum() -> 44 (0x2c) " },
   58109             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetForestTrustInformation_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   58110             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   58111             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetForestTrustInformation_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   58112             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   58113             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetForestTrustInformation_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   58114             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   58115             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_GetForestTrustInformation_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   58116             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   58117             :         { "__ndr_print_in__", (PyCFunction)py_netr_GetForestTrustInformation_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   58118             :         { "__ndr_print_out__", (PyCFunction)py_netr_GetForestTrustInformation_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   58119             :         { NULL, NULL, 0, NULL }
   58120             : };
   58121             : 
   58122             : 
   58123             : static PyTypeObject netr_GetForestTrustInformation_Type = {
   58124             :         PyVarObject_HEAD_INIT(NULL, 0)
   58125             :         .tp_name = "netlogon.netr_GetForestTrustInformation",
   58126             :         .tp_getset = py_netr_GetForestTrustInformation_getsetters,
   58127             :         .tp_methods = py_netr_GetForestTrustInformation_methods,
   58128             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   58129             :         .tp_new = py_netr_GetForestTrustInformation_new,
   58130             : };
   58131             : 
   58132           0 : static bool pack_py_netr_GetForestTrustInformation_args_in(PyObject *args, PyObject *kwargs, struct netr_GetForestTrustInformation *r)
   58133             : {
   58134             :         PyObject *py_server_name;
   58135             :         PyObject *py_computer_name;
   58136             :         PyObject *py_credential;
   58137             :         PyObject *py_flags;
   58138           0 :         const char *kwnames[] = {
   58139             :                 "server_name", "computer_name", "credential", "flags", NULL
   58140             :         };
   58141             : 
   58142           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:netr_GetForestTrustInformation", discard_const_p(char *, kwnames), &py_server_name, &py_computer_name, &py_credential, &py_flags)) {
   58143           0 :                 return false;
   58144             :         }
   58145             : 
   58146           0 :         if (py_server_name == NULL) {
   58147           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   58148           0 :                 return false;
   58149             :         }
   58150           0 :         if (py_server_name == Py_None) {
   58151           0 :                 r->in.server_name = NULL;
   58152             :         } else {
   58153           0 :                 r->in.server_name = NULL;
   58154             :                 {
   58155             :                         const char *test_str;
   58156             :                         const char *talloc_str;
   58157           0 :                         PyObject *unicode = NULL;
   58158           0 :                         if (PyUnicode_Check(py_server_name)) {
   58159           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   58160           0 :                                 if (unicode == NULL) {
   58161           0 :                                         PyErr_NoMemory();
   58162           0 :                                         return false;
   58163             :                                 }
   58164           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   58165           0 :                         } else if (PyBytes_Check(py_server_name)) {
   58166           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   58167             :                         } else {
   58168           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   58169           0 :                                 return false;
   58170             :                         }
   58171           0 :                         talloc_str = talloc_strdup(r, test_str);
   58172           0 :                         if (unicode != NULL) {
   58173           0 :                                 Py_DECREF(unicode);
   58174             :                         }
   58175           0 :                         if (talloc_str == NULL) {
   58176           0 :                                 PyErr_NoMemory();
   58177           0 :                                 return false;
   58178             :                         }
   58179           0 :                         r->in.server_name = talloc_str;
   58180             :                 }
   58181             :         }
   58182           0 :         if (py_computer_name == NULL) {
   58183           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   58184           0 :                 return false;
   58185             :         }
   58186           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   58187           0 :         if (r->in.computer_name == NULL) {
   58188           0 :                 PyErr_NoMemory();
   58189           0 :                 return false;
   58190             :         }
   58191             :         {
   58192             :                 const char *test_str;
   58193             :                 const char *talloc_str;
   58194           0 :                 PyObject *unicode = NULL;
   58195           0 :                 if (PyUnicode_Check(py_computer_name)) {
   58196           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   58197           0 :                         if (unicode == NULL) {
   58198           0 :                                 PyErr_NoMemory();
   58199           0 :                                 return false;
   58200             :                         }
   58201           0 :                         test_str = PyBytes_AS_STRING(unicode);
   58202           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   58203           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   58204             :                 } else {
   58205           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   58206           0 :                         return false;
   58207             :                 }
   58208           0 :                 talloc_str = talloc_strdup(r, test_str);
   58209           0 :                 if (unicode != NULL) {
   58210           0 :                         Py_DECREF(unicode);
   58211             :                 }
   58212           0 :                 if (talloc_str == NULL) {
   58213           0 :                         PyErr_NoMemory();
   58214           0 :                         return false;
   58215             :                 }
   58216           0 :                 r->in.computer_name = talloc_str;
   58217             :         }
   58218           0 :         if (py_credential == NULL) {
   58219           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   58220           0 :                 return false;
   58221             :         }
   58222           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   58223           0 :         if (r->in.credential == NULL) {
   58224           0 :                 PyErr_NoMemory();
   58225           0 :                 return false;
   58226             :         }
   58227           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   58228           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   58229           0 :                 PyErr_NoMemory();
   58230           0 :                 return false;
   58231             :         }
   58232           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   58233           0 :         if (py_flags == NULL) {
   58234           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   58235           0 :                 return false;
   58236             :         }
   58237             :         {
   58238           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.flags));
   58239           0 :                 if (PyLong_Check(py_flags)) {
   58240             :                         unsigned long long test_var;
   58241           0 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   58242           0 :                         if (PyErr_Occurred() != NULL) {
   58243           0 :                                 return false;
   58244             :                         }
   58245           0 :                         if (test_var > uint_max) {
   58246           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   58247             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58248           0 :                                 return false;
   58249             :                         }
   58250           0 :                         r->in.flags = test_var;
   58251             :                 } else {
   58252           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   58253             :                           PyLong_Type.tp_name);
   58254           0 :                         return false;
   58255             :                 }
   58256             :         }
   58257           0 :         return true;
   58258             : }
   58259             : 
   58260           0 : static PyObject *unpack_py_netr_GetForestTrustInformation_args_out(struct netr_GetForestTrustInformation *r)
   58261             : {
   58262             :         PyObject *result;
   58263             :         PyObject *py_return_authenticator;
   58264             :         PyObject *py_forest_trust_info;
   58265           0 :         result = PyTuple_New(2);
   58266           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   58267           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   58268           0 :         if (*r->out.forest_trust_info == NULL) {
   58269           0 :                 py_forest_trust_info = Py_None;
   58270           0 :                 Py_INCREF(py_forest_trust_info);
   58271             :         } else {
   58272           0 :                 py_forest_trust_info = pytalloc_reference_ex(lsa_ForestTrustInformation_Type, *r->out.forest_trust_info, *r->out.forest_trust_info);
   58273             :         }
   58274           0 :         PyTuple_SetItem(result, 1, py_forest_trust_info);
   58275           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   58276           0 :                 PyErr_SetNTSTATUS(r->out.result);
   58277           0 :                 return NULL;
   58278             :         }
   58279             : 
   58280           0 :         return result;
   58281             : }
   58282             : 
   58283             : 
   58284           0 : static PyObject *py_netr_LogonSamLogonWithFlags_in_get_server_name(PyObject *obj, void *closure)
   58285             : {
   58286           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   58287             :         PyObject *py_server_name;
   58288           0 :         if (object->in.server_name == NULL) {
   58289           0 :                 Py_RETURN_NONE;
   58290             :         }
   58291           0 :         if (object->in.server_name == NULL) {
   58292           0 :                 py_server_name = Py_None;
   58293           0 :                 Py_INCREF(py_server_name);
   58294             :         } else {
   58295           0 :                 if (object->in.server_name == NULL) {
   58296           0 :                         py_server_name = Py_None;
   58297           0 :                         Py_INCREF(py_server_name);
   58298             :                 } else {
   58299           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   58300             :                 }
   58301             :         }
   58302           0 :         return py_server_name;
   58303             : }
   58304             : 
   58305           0 : static int py_netr_LogonSamLogonWithFlags_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   58306             : {
   58307           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   58308           0 :         if (value == NULL) {
   58309           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   58310           0 :                 return -1;
   58311             :         }
   58312           0 :         if (value == Py_None) {
   58313           0 :                 object->in.server_name = NULL;
   58314             :         } else {
   58315           0 :                 object->in.server_name = NULL;
   58316             :                 {
   58317             :                         const char *test_str;
   58318             :                         const char *talloc_str;
   58319           0 :                         PyObject *unicode = NULL;
   58320           0 :                         if (PyUnicode_Check(value)) {
   58321           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   58322           0 :                                 if (unicode == NULL) {
   58323           0 :                                         PyErr_NoMemory();
   58324           0 :                                         return -1;
   58325             :                                 }
   58326           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   58327           0 :                         } else if (PyBytes_Check(value)) {
   58328           0 :                                 test_str = PyBytes_AS_STRING(value);
   58329             :                         } else {
   58330           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   58331           0 :                                 return -1;
   58332             :                         }
   58333           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   58334           0 :                         if (unicode != NULL) {
   58335           0 :                                 Py_DECREF(unicode);
   58336             :                         }
   58337           0 :                         if (talloc_str == NULL) {
   58338           0 :                                 PyErr_NoMemory();
   58339           0 :                                 return -1;
   58340             :                         }
   58341           0 :                         object->in.server_name = talloc_str;
   58342             :                 }
   58343             :         }
   58344           0 :         return 0;
   58345             : }
   58346             : 
   58347           0 : static PyObject *py_netr_LogonSamLogonWithFlags_in_get_computer_name(PyObject *obj, void *closure)
   58348             : {
   58349           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   58350             :         PyObject *py_computer_name;
   58351           0 :         if (object->in.computer_name == NULL) {
   58352           0 :                 Py_RETURN_NONE;
   58353             :         }
   58354           0 :         if (object->in.computer_name == NULL) {
   58355           0 :                 py_computer_name = Py_None;
   58356           0 :                 Py_INCREF(py_computer_name);
   58357             :         } else {
   58358           0 :                 if (object->in.computer_name == NULL) {
   58359           0 :                         py_computer_name = Py_None;
   58360           0 :                         Py_INCREF(py_computer_name);
   58361             :                 } else {
   58362           0 :                         py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   58363             :                 }
   58364             :         }
   58365           0 :         return py_computer_name;
   58366             : }
   58367             : 
   58368           0 : static int py_netr_LogonSamLogonWithFlags_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   58369             : {
   58370           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   58371           0 :         if (value == NULL) {
   58372           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   58373           0 :                 return -1;
   58374             :         }
   58375           0 :         if (value == Py_None) {
   58376           0 :                 object->in.computer_name = NULL;
   58377             :         } else {
   58378           0 :                 object->in.computer_name = NULL;
   58379             :                 {
   58380             :                         const char *test_str;
   58381             :                         const char *talloc_str;
   58382           0 :                         PyObject *unicode = NULL;
   58383           0 :                         if (PyUnicode_Check(value)) {
   58384           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   58385           0 :                                 if (unicode == NULL) {
   58386           0 :                                         PyErr_NoMemory();
   58387           0 :                                         return -1;
   58388             :                                 }
   58389           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   58390           0 :                         } else if (PyBytes_Check(value)) {
   58391           0 :                                 test_str = PyBytes_AS_STRING(value);
   58392             :                         } else {
   58393           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   58394           0 :                                 return -1;
   58395             :                         }
   58396           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   58397           0 :                         if (unicode != NULL) {
   58398           0 :                                 Py_DECREF(unicode);
   58399             :                         }
   58400           0 :                         if (talloc_str == NULL) {
   58401           0 :                                 PyErr_NoMemory();
   58402           0 :                                 return -1;
   58403             :                         }
   58404           0 :                         object->in.computer_name = talloc_str;
   58405             :                 }
   58406             :         }
   58407           0 :         return 0;
   58408             : }
   58409             : 
   58410           0 : static PyObject *py_netr_LogonSamLogonWithFlags_in_get_credential(PyObject *obj, void *closure)
   58411             : {
   58412           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   58413             :         PyObject *py_credential;
   58414           0 :         if (object->in.credential == NULL) {
   58415           0 :                 Py_RETURN_NONE;
   58416             :         }
   58417           0 :         if (object->in.credential == NULL) {
   58418           0 :                 py_credential = Py_None;
   58419           0 :                 Py_INCREF(py_credential);
   58420             :         } else {
   58421           0 :                 py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   58422             :         }
   58423           0 :         return py_credential;
   58424             : }
   58425             : 
   58426           0 : static int py_netr_LogonSamLogonWithFlags_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   58427             : {
   58428           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   58429           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   58430           0 :         if (value == NULL) {
   58431           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   58432           0 :                 return -1;
   58433             :         }
   58434           0 :         if (value == Py_None) {
   58435           0 :                 object->in.credential = NULL;
   58436             :         } else {
   58437           0 :                 object->in.credential = NULL;
   58438           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   58439           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   58440           0 :                         PyErr_NoMemory();
   58441           0 :                         return -1;
   58442             :                 }
   58443           0 :                 object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   58444             :         }
   58445           0 :         return 0;
   58446             : }
   58447             : 
   58448           0 : static PyObject *py_netr_LogonSamLogonWithFlags_in_get_return_authenticator(PyObject *obj, void *closure)
   58449             : {
   58450           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   58451             :         PyObject *py_return_authenticator;
   58452           0 :         if (object->in.return_authenticator == NULL) {
   58453           0 :                 Py_RETURN_NONE;
   58454             :         }
   58455           0 :         if (object->in.return_authenticator == NULL) {
   58456           0 :                 py_return_authenticator = Py_None;
   58457           0 :                 Py_INCREF(py_return_authenticator);
   58458             :         } else {
   58459           0 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.return_authenticator, object->in.return_authenticator);
   58460             :         }
   58461           0 :         return py_return_authenticator;
   58462             : }
   58463             : 
   58464           0 : static int py_netr_LogonSamLogonWithFlags_in_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   58465             : {
   58466           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   58467           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.return_authenticator));
   58468           0 :         if (value == NULL) {
   58469           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.return_authenticator");
   58470           0 :                 return -1;
   58471             :         }
   58472           0 :         if (value == Py_None) {
   58473           0 :                 object->in.return_authenticator = NULL;
   58474             :         } else {
   58475           0 :                 object->in.return_authenticator = NULL;
   58476           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   58477           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   58478           0 :                         PyErr_NoMemory();
   58479           0 :                         return -1;
   58480             :                 }
   58481           0 :                 object->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   58482             :         }
   58483           0 :         return 0;
   58484             : }
   58485             : 
   58486           0 : static PyObject *py_netr_LogonSamLogonWithFlags_out_get_return_authenticator(PyObject *obj, void *closure)
   58487             : {
   58488           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   58489             :         PyObject *py_return_authenticator;
   58490           0 :         if (object->out.return_authenticator == NULL) {
   58491           0 :                 Py_RETURN_NONE;
   58492             :         }
   58493           0 :         if (object->out.return_authenticator == NULL) {
   58494           0 :                 py_return_authenticator = Py_None;
   58495           0 :                 Py_INCREF(py_return_authenticator);
   58496             :         } else {
   58497           0 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   58498             :         }
   58499           0 :         return py_return_authenticator;
   58500             : }
   58501             : 
   58502           0 : static int py_netr_LogonSamLogonWithFlags_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   58503             : {
   58504           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   58505           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   58506           0 :         if (value == NULL) {
   58507           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   58508           0 :                 return -1;
   58509             :         }
   58510           0 :         if (value == Py_None) {
   58511           0 :                 object->out.return_authenticator = NULL;
   58512             :         } else {
   58513           0 :                 object->out.return_authenticator = NULL;
   58514           0 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   58515           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   58516           0 :                         PyErr_NoMemory();
   58517           0 :                         return -1;
   58518             :                 }
   58519           0 :                 object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   58520             :         }
   58521           0 :         return 0;
   58522             : }
   58523             : 
   58524           0 : static PyObject *py_netr_LogonSamLogonWithFlags_in_get_logon_level(PyObject *obj, void *closure)
   58525             : {
   58526           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   58527             :         PyObject *py_logon_level;
   58528           0 :         py_logon_level = PyLong_FromLong((uint16_t)object->in.logon_level);
   58529           0 :         return py_logon_level;
   58530             : }
   58531             : 
   58532           0 : static int py_netr_LogonSamLogonWithFlags_in_set_logon_level(PyObject *py_obj, PyObject *value, void *closure)
   58533             : {
   58534           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   58535           0 :         if (value == NULL) {
   58536           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon_level");
   58537           0 :                 return -1;
   58538             :         }
   58539             :         {
   58540           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.logon_level));
   58541           0 :                 if (PyLong_Check(value)) {
   58542             :                         unsigned long long test_var;
   58543           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   58544           0 :                         if (PyErr_Occurred() != NULL) {
   58545           0 :                                 return -1;
   58546             :                         }
   58547           0 :                         if (test_var > uint_max) {
   58548           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   58549             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58550           0 :                                 return -1;
   58551             :                         }
   58552           0 :                         object->in.logon_level = test_var;
   58553             :                 } else {
   58554           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   58555             :                           PyLong_Type.tp_name);
   58556           0 :                         return -1;
   58557             :                 }
   58558             :         }
   58559           0 :         return 0;
   58560             : }
   58561             : 
   58562           0 : static PyObject *py_netr_LogonSamLogonWithFlags_in_get_logon(PyObject *obj, void *closure)
   58563             : {
   58564           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   58565             :         PyObject *py_logon;
   58566           0 :         if (object->in.logon == NULL) {
   58567           0 :                 Py_RETURN_NONE;
   58568             :         }
   58569           0 :         py_logon = pyrpc_import_union(&netr_LogonLevel_Type, object->in.logon, object->in.logon_level, object->in.logon, "union netr_LogonLevel");
   58570           0 :         if (py_logon == NULL) {
   58571           0 :                 return NULL;
   58572             :         }
   58573           0 :         return py_logon;
   58574             : }
   58575             : 
   58576           0 : static int py_netr_LogonSamLogonWithFlags_in_set_logon(PyObject *py_obj, PyObject *value, void *closure)
   58577             : {
   58578           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   58579           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.logon));
   58580           0 :         if (value == NULL) {
   58581           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.logon");
   58582           0 :                 return -1;
   58583             :         }
   58584           0 :         object->in.logon = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.logon);
   58585           0 :         if (object->in.logon == NULL) {
   58586           0 :                 PyErr_NoMemory();
   58587           0 :                 return -1;
   58588             :         }
   58589             :         {
   58590             :                 union netr_LogonLevel *logon_switch_1;
   58591           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");
   58592           0 :                 if (logon_switch_1 == NULL) {
   58593           0 :                         return -1;
   58594             :                 }
   58595           0 :                 object->in.logon = logon_switch_1;
   58596             :         }
   58597           0 :         return 0;
   58598             : }
   58599             : 
   58600           0 : static PyObject *py_netr_LogonSamLogonWithFlags_in_get_validation_level(PyObject *obj, void *closure)
   58601             : {
   58602           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   58603             :         PyObject *py_validation_level;
   58604           0 :         py_validation_level = PyLong_FromLong((uint16_t)object->in.validation_level);
   58605           0 :         return py_validation_level;
   58606             : }
   58607             : 
   58608           0 : static int py_netr_LogonSamLogonWithFlags_in_set_validation_level(PyObject *py_obj, PyObject *value, void *closure)
   58609             : {
   58610           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   58611           0 :         if (value == NULL) {
   58612           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.validation_level");
   58613           0 :                 return -1;
   58614             :         }
   58615             :         {
   58616           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.validation_level));
   58617           0 :                 if (PyLong_Check(value)) {
   58618             :                         unsigned long long test_var;
   58619           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   58620           0 :                         if (PyErr_Occurred() != NULL) {
   58621           0 :                                 return -1;
   58622             :                         }
   58623           0 :                         if (test_var > uint_max) {
   58624           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   58625             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58626           0 :                                 return -1;
   58627             :                         }
   58628           0 :                         object->in.validation_level = test_var;
   58629             :                 } else {
   58630           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   58631             :                           PyLong_Type.tp_name);
   58632           0 :                         return -1;
   58633             :                 }
   58634             :         }
   58635           0 :         return 0;
   58636             : }
   58637             : 
   58638           0 : static PyObject *py_netr_LogonSamLogonWithFlags_out_get_validation(PyObject *obj, void *closure)
   58639             : {
   58640           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   58641             :         PyObject *py_validation;
   58642           0 :         if (object->out.validation == NULL) {
   58643           0 :                 Py_RETURN_NONE;
   58644             :         }
   58645           0 :         py_validation = pyrpc_import_union(&netr_Validation_Type, object->out.validation, object->in.validation_level, object->out.validation, "union netr_Validation");
   58646           0 :         if (py_validation == NULL) {
   58647           0 :                 return NULL;
   58648             :         }
   58649           0 :         return py_validation;
   58650             : }
   58651             : 
   58652           0 : static int py_netr_LogonSamLogonWithFlags_out_set_validation(PyObject *py_obj, PyObject *value, void *closure)
   58653             : {
   58654           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   58655           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.validation));
   58656           0 :         if (value == NULL) {
   58657           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.validation");
   58658           0 :                 return -1;
   58659             :         }
   58660           0 :         object->out.validation = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.validation);
   58661           0 :         if (object->out.validation == NULL) {
   58662           0 :                 PyErr_NoMemory();
   58663           0 :                 return -1;
   58664             :         }
   58665             :         {
   58666             :                 union netr_Validation *validation_switch_1;
   58667           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");
   58668           0 :                 if (validation_switch_1 == NULL) {
   58669           0 :                         return -1;
   58670             :                 }
   58671           0 :                 object->out.validation = validation_switch_1;
   58672             :         }
   58673           0 :         return 0;
   58674             : }
   58675             : 
   58676           0 : static PyObject *py_netr_LogonSamLogonWithFlags_out_get_authoritative(PyObject *obj, void *closure)
   58677             : {
   58678           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   58679             :         PyObject *py_authoritative;
   58680           0 :         if (object->out.authoritative == NULL) {
   58681           0 :                 Py_RETURN_NONE;
   58682             :         }
   58683           0 :         py_authoritative = PyLong_FromLong((uint16_t)*object->out.authoritative);
   58684           0 :         return py_authoritative;
   58685             : }
   58686             : 
   58687           0 : static int py_netr_LogonSamLogonWithFlags_out_set_authoritative(PyObject *py_obj, PyObject *value, void *closure)
   58688             : {
   58689           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   58690           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.authoritative));
   58691           0 :         if (value == NULL) {
   58692           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.authoritative");
   58693           0 :                 return -1;
   58694             :         }
   58695           0 :         object->out.authoritative = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.authoritative);
   58696           0 :         if (object->out.authoritative == NULL) {
   58697           0 :                 PyErr_NoMemory();
   58698           0 :                 return -1;
   58699             :         }
   58700             :         {
   58701           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.authoritative));
   58702           0 :                 if (PyLong_Check(value)) {
   58703             :                         unsigned long long test_var;
   58704           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   58705           0 :                         if (PyErr_Occurred() != NULL) {
   58706           0 :                                 return -1;
   58707             :                         }
   58708           0 :                         if (test_var > uint_max) {
   58709           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   58710             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58711           0 :                                 return -1;
   58712             :                         }
   58713           0 :                         *object->out.authoritative = test_var;
   58714             :                 } else {
   58715           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   58716             :                           PyLong_Type.tp_name);
   58717           0 :                         return -1;
   58718             :                 }
   58719             :         }
   58720           0 :         return 0;
   58721             : }
   58722             : 
   58723           0 : static PyObject *py_netr_LogonSamLogonWithFlags_in_get_flags(PyObject *obj, void *closure)
   58724             : {
   58725           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   58726             :         PyObject *py_flags;
   58727           0 :         if (object->in.flags == NULL) {
   58728           0 :                 Py_RETURN_NONE;
   58729             :         }
   58730           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)*object->in.flags);
   58731           0 :         return py_flags;
   58732             : }
   58733             : 
   58734           0 : static int py_netr_LogonSamLogonWithFlags_in_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   58735             : {
   58736           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   58737           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.flags));
   58738           0 :         if (value == NULL) {
   58739           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.flags");
   58740           0 :                 return -1;
   58741             :         }
   58742           0 :         object->in.flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.flags);
   58743           0 :         if (object->in.flags == NULL) {
   58744           0 :                 PyErr_NoMemory();
   58745           0 :                 return -1;
   58746             :         }
   58747             :         {
   58748           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->in.flags));
   58749           0 :                 if (PyLong_Check(value)) {
   58750             :                         unsigned long long test_var;
   58751           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   58752           0 :                         if (PyErr_Occurred() != NULL) {
   58753           0 :                                 return -1;
   58754             :                         }
   58755           0 :                         if (test_var > uint_max) {
   58756           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   58757             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58758           0 :                                 return -1;
   58759             :                         }
   58760           0 :                         *object->in.flags = test_var;
   58761             :                 } else {
   58762           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   58763             :                           PyLong_Type.tp_name);
   58764           0 :                         return -1;
   58765             :                 }
   58766             :         }
   58767           0 :         return 0;
   58768             : }
   58769             : 
   58770           0 : static PyObject *py_netr_LogonSamLogonWithFlags_out_get_flags(PyObject *obj, void *closure)
   58771             : {
   58772           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   58773             :         PyObject *py_flags;
   58774           0 :         if (object->out.flags == NULL) {
   58775           0 :                 Py_RETURN_NONE;
   58776             :         }
   58777           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)*object->out.flags);
   58778           0 :         return py_flags;
   58779             : }
   58780             : 
   58781           0 : static int py_netr_LogonSamLogonWithFlags_out_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   58782             : {
   58783           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   58784           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.flags));
   58785           0 :         if (value == NULL) {
   58786           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.flags");
   58787           0 :                 return -1;
   58788             :         }
   58789           0 :         object->out.flags = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.flags);
   58790           0 :         if (object->out.flags == NULL) {
   58791           0 :                 PyErr_NoMemory();
   58792           0 :                 return -1;
   58793             :         }
   58794             :         {
   58795           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.flags));
   58796           0 :                 if (PyLong_Check(value)) {
   58797             :                         unsigned long long test_var;
   58798           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   58799           0 :                         if (PyErr_Occurred() != NULL) {
   58800           0 :                                 return -1;
   58801             :                         }
   58802           0 :                         if (test_var > uint_max) {
   58803           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   58804             :                                   PyLong_Type.tp_name, uint_max, test_var);
   58805           0 :                                 return -1;
   58806             :                         }
   58807           0 :                         *object->out.flags = test_var;
   58808             :                 } else {
   58809           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   58810             :                           PyLong_Type.tp_name);
   58811           0 :                         return -1;
   58812             :                 }
   58813             :         }
   58814           0 :         return 0;
   58815             : }
   58816             : 
   58817           0 : static PyObject *py_netr_LogonSamLogonWithFlags_get_result(PyObject *obj, void *closure)
   58818             : {
   58819           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(obj);
   58820             :         PyObject *py_result;
   58821           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   58822           0 :         return py_result;
   58823             : }
   58824             : 
   58825           0 : static int py_netr_LogonSamLogonWithFlags_set_result(PyObject *py_obj, PyObject *value, void *closure)
   58826             : {
   58827           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   58828           0 :         if (value == NULL) {
   58829           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   58830           0 :                 return -1;
   58831             :         }
   58832           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   58833           0 :         return 0;
   58834             : }
   58835             : 
   58836             : static PyGetSetDef py_netr_LogonSamLogonWithFlags_getsetters[] = {
   58837             :         {
   58838             :                 .name = discard_const_p(char, "in_server_name"),
   58839             :                 .get = py_netr_LogonSamLogonWithFlags_in_get_server_name,
   58840             :                 .set = py_netr_LogonSamLogonWithFlags_in_set_server_name,
   58841             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   58842             :         },
   58843             :         {
   58844             :                 .name = discard_const_p(char, "in_computer_name"),
   58845             :                 .get = py_netr_LogonSamLogonWithFlags_in_get_computer_name,
   58846             :                 .set = py_netr_LogonSamLogonWithFlags_in_set_computer_name,
   58847             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   58848             :         },
   58849             :         {
   58850             :                 .name = discard_const_p(char, "in_credential"),
   58851             :                 .get = py_netr_LogonSamLogonWithFlags_in_get_credential,
   58852             :                 .set = py_netr_LogonSamLogonWithFlags_in_set_credential,
   58853             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   58854             :         },
   58855             :         {
   58856             :                 .name = discard_const_p(char, "in_return_authenticator"),
   58857             :                 .get = py_netr_LogonSamLogonWithFlags_in_get_return_authenticator,
   58858             :                 .set = py_netr_LogonSamLogonWithFlags_in_set_return_authenticator,
   58859             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   58860             :         },
   58861             :         {
   58862             :                 .name = discard_const_p(char, "out_return_authenticator"),
   58863             :                 .get = py_netr_LogonSamLogonWithFlags_out_get_return_authenticator,
   58864             :                 .set = py_netr_LogonSamLogonWithFlags_out_set_return_authenticator,
   58865             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   58866             :         },
   58867             :         {
   58868             :                 .name = discard_const_p(char, "in_logon_level"),
   58869             :                 .get = py_netr_LogonSamLogonWithFlags_in_get_logon_level,
   58870             :                 .set = py_netr_LogonSamLogonWithFlags_in_set_logon_level,
   58871             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonInfoClass")
   58872             :         },
   58873             :         {
   58874             :                 .name = discard_const_p(char, "in_logon"),
   58875             :                 .get = py_netr_LogonSamLogonWithFlags_in_get_logon,
   58876             :                 .set = py_netr_LogonSamLogonWithFlags_in_set_logon,
   58877             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonLevel")
   58878             :         },
   58879             :         {
   58880             :                 .name = discard_const_p(char, "in_validation_level"),
   58881             :                 .get = py_netr_LogonSamLogonWithFlags_in_get_validation_level,
   58882             :                 .set = py_netr_LogonSamLogonWithFlags_in_set_validation_level,
   58883             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   58884             :         },
   58885             :         {
   58886             :                 .name = discard_const_p(char, "out_validation"),
   58887             :                 .get = py_netr_LogonSamLogonWithFlags_out_get_validation,
   58888             :                 .set = py_netr_LogonSamLogonWithFlags_out_set_validation,
   58889             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Validation")
   58890             :         },
   58891             :         {
   58892             :                 .name = discard_const_p(char, "out_authoritative"),
   58893             :                 .get = py_netr_LogonSamLogonWithFlags_out_get_authoritative,
   58894             :                 .set = py_netr_LogonSamLogonWithFlags_out_set_authoritative,
   58895             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   58896             :         },
   58897             :         {
   58898             :                 .name = discard_const_p(char, "in_flags"),
   58899             :                 .get = py_netr_LogonSamLogonWithFlags_in_get_flags,
   58900             :                 .set = py_netr_LogonSamLogonWithFlags_in_set_flags,
   58901             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonSamLogon_flags")
   58902             :         },
   58903             :         {
   58904             :                 .name = discard_const_p(char, "out_flags"),
   58905             :                 .get = py_netr_LogonSamLogonWithFlags_out_get_flags,
   58906             :                 .set = py_netr_LogonSamLogonWithFlags_out_set_flags,
   58907             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_LogonSamLogon_flags")
   58908             :         },
   58909             :         {
   58910             :                 .name = discard_const_p(char, "result"),
   58911             :                 .get = py_netr_LogonSamLogonWithFlags_get_result,
   58912             :                 .set = py_netr_LogonSamLogonWithFlags_set_result,
   58913             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   58914             :         },
   58915             :         { .name = NULL }
   58916             : };
   58917             : 
   58918           0 : static PyObject *py_netr_LogonSamLogonWithFlags_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   58919             : {
   58920           0 :         PyObject *self = pytalloc_new(struct netr_LogonSamLogonWithFlags, type);
   58921           0 :         struct netr_LogonSamLogonWithFlags *_self = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(self);
   58922           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   58923           0 :         _self->in.logon = talloc_zero(mem_ctx, union netr_LogonLevel);
   58924           0 :         _self->out.validation = talloc_zero(mem_ctx, union netr_Validation);
   58925           0 :         _self->out.authoritative = talloc_zero(mem_ctx, uint8_t);
   58926           0 :         _self->in.flags = talloc_zero(mem_ctx, uint32_t);
   58927           0 :         _self->out.flags = talloc_zero(mem_ctx, uint32_t);
   58928           0 :         return self;
   58929             : }
   58930             : 
   58931           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   58932             : {
   58933             : 
   58934             : 
   58935           0 :         return PyLong_FromLong(45);
   58936             : }
   58937             : 
   58938           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   58939             : {
   58940           0 :         const struct ndr_interface_call *call = NULL;
   58941           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   58942           0 :         PyObject *ret = NULL;
   58943           0 :         struct ndr_push *push = NULL;
   58944             :         DATA_BLOB blob;
   58945             :         enum ndr_err_code err;
   58946             : 
   58947           0 :         if (ndr_table_netlogon.num_calls < 46) {
   58948           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogonWithFlags_ndr_pack");
   58949           0 :                 return NULL;
   58950             :         }
   58951           0 :         call = &ndr_table_netlogon.calls[45];
   58952             : 
   58953           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   58954           0 :         if (push == NULL) {
   58955           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   58956           0 :                 return NULL;
   58957             :         }
   58958             : 
   58959           0 :         push->flags |= ndr_push_flags;
   58960             : 
   58961           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   58962           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   58963           0 :                 TALLOC_FREE(push);
   58964           0 :                 PyErr_SetNdrError(err);
   58965           0 :                 return NULL;
   58966             :         }
   58967           0 :         blob = ndr_push_blob(push);
   58968           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   58969           0 :         TALLOC_FREE(push);
   58970           0 :         return ret;
   58971             : }
   58972             : 
   58973           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   58974             : {
   58975           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   58976           0 :         PyObject *bigendian_obj = NULL;
   58977           0 :         PyObject *ndr64_obj = NULL;
   58978           0 :         uint32_t ndr_push_flags = 0;
   58979             : 
   58980           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   58981             :                 discard_const_p(char *, kwnames),
   58982             :                 &bigendian_obj,
   58983             :                 &ndr64_obj)) {
   58984           0 :                 return NULL;
   58985             :         }
   58986             : 
   58987           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   58988           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   58989             :         }
   58990           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   58991           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   58992             :         }
   58993             : 
   58994           0 :         return py_netr_LogonSamLogonWithFlags_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   58995             : }
   58996             : 
   58997           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   58998             : {
   58999           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   59000           0 :         PyObject *bigendian_obj = NULL;
   59001           0 :         PyObject *ndr64_obj = NULL;
   59002           0 :         uint32_t ndr_push_flags = 0;
   59003             : 
   59004           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   59005             :                 discard_const_p(char *, kwnames),
   59006             :                 &bigendian_obj,
   59007             :                 &ndr64_obj)) {
   59008           0 :                 return NULL;
   59009             :         }
   59010             : 
   59011           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   59012           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   59013             :         }
   59014           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   59015           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   59016             :         }
   59017             : 
   59018           0 :         return py_netr_LogonSamLogonWithFlags_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   59019             : }
   59020             : 
   59021           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   59022             : {
   59023           0 :         const struct ndr_interface_call *call = NULL;
   59024           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   59025           0 :         struct ndr_pull *pull = NULL;
   59026             :         enum ndr_err_code err;
   59027             : 
   59028           0 :         if (ndr_table_netlogon.num_calls < 46) {
   59029           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogonWithFlags_ndr_unpack");
   59030           0 :                 return NULL;
   59031             :         }
   59032           0 :         call = &ndr_table_netlogon.calls[45];
   59033             : 
   59034           0 :         pull = ndr_pull_init_blob(blob, object);
   59035           0 :         if (pull == NULL) {
   59036           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   59037           0 :                 return NULL;
   59038             :         }
   59039             : 
   59040           0 :         pull->flags |= ndr_pull_flags;
   59041             : 
   59042           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   59043           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   59044           0 :                 TALLOC_FREE(pull);
   59045           0 :                 PyErr_SetNdrError(err);
   59046           0 :                 return NULL;
   59047             :         }
   59048           0 :         if (!allow_remaining) {
   59049             :                 uint32_t highest_ofs;
   59050             : 
   59051           0 :                 if (pull->offset > pull->relative_highest_offset) {
   59052           0 :                         highest_ofs = pull->offset;
   59053             :                 } else {
   59054           0 :                         highest_ofs = pull->relative_highest_offset;
   59055             :                 }
   59056           0 :                 if (highest_ofs < pull->data_size) {
   59057           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   59058             :                                 "not all bytes consumed ofs[%u] size[%u]",
   59059             :                                 highest_ofs, pull->data_size);
   59060           0 :                         TALLOC_FREE(pull);
   59061           0 :                         PyErr_SetNdrError(err);
   59062           0 :                         return NULL;
   59063             :                 }
   59064             :         }
   59065             : 
   59066           0 :         TALLOC_FREE(pull);
   59067           0 :         Py_RETURN_NONE;
   59068             : }
   59069             : 
   59070           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   59071             : {
   59072             :         DATA_BLOB blob;
   59073           0 :         Py_ssize_t blob_length = 0;
   59074           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   59075           0 :         PyObject *bigendian_obj = NULL;
   59076           0 :         PyObject *ndr64_obj = NULL;
   59077           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   59078           0 :         PyObject *allow_remaining_obj = NULL;
   59079           0 :         bool allow_remaining = false;
   59080             : 
   59081           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   59082             :                 discard_const_p(char *, kwnames),
   59083             :                 &blob.data, &blob_length,
   59084             :                 &bigendian_obj,
   59085             :                 &ndr64_obj,
   59086             :                 &allow_remaining_obj)) {
   59087           0 :                 return NULL;
   59088             :         }
   59089           0 :         blob.length = blob_length;
   59090             : 
   59091           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   59092           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   59093             :         }
   59094           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   59095           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   59096             :         }
   59097             : 
   59098           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   59099           0 :                 allow_remaining = true;
   59100             :         }
   59101             : 
   59102           0 :         return py_netr_LogonSamLogonWithFlags_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   59103             : }
   59104             : 
   59105           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   59106             : {
   59107             :         DATA_BLOB blob;
   59108           0 :         Py_ssize_t blob_length = 0;
   59109           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   59110           0 :         PyObject *bigendian_obj = NULL;
   59111           0 :         PyObject *ndr64_obj = NULL;
   59112           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   59113           0 :         PyObject *allow_remaining_obj = NULL;
   59114           0 :         bool allow_remaining = false;
   59115             : 
   59116           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   59117             :                 discard_const_p(char *, kwnames),
   59118             :                 &blob.data, &blob_length,
   59119             :                 &bigendian_obj,
   59120             :                 &ndr64_obj,
   59121             :                 &allow_remaining_obj)) {
   59122           0 :                 return NULL;
   59123             :         }
   59124           0 :         blob.length = blob_length;
   59125             : 
   59126           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   59127           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   59128             :         }
   59129           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   59130           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   59131             :         }
   59132             : 
   59133           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   59134           0 :                 allow_remaining = true;
   59135             :         }
   59136             : 
   59137           0 :         return py_netr_LogonSamLogonWithFlags_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   59138             : }
   59139             : 
   59140           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   59141             : {
   59142           0 :         const struct ndr_interface_call *call = NULL;
   59143           0 :         struct netr_LogonSamLogonWithFlags *object = (struct netr_LogonSamLogonWithFlags *)pytalloc_get_ptr(py_obj);
   59144             :         PyObject *ret;
   59145             :         char *retstr;
   59146             : 
   59147           0 :         if (ndr_table_netlogon.num_calls < 46) {
   59148           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_LogonSamLogonWithFlags_ndr_print");
   59149           0 :                 return NULL;
   59150             :         }
   59151           0 :         call = &ndr_table_netlogon.calls[45];
   59152             : 
   59153           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   59154           0 :         ret = PyUnicode_FromString(retstr);
   59155           0 :         TALLOC_FREE(retstr);
   59156             : 
   59157           0 :         return ret;
   59158             : }
   59159             : 
   59160           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   59161             : {
   59162           0 :         return py_netr_LogonSamLogonWithFlags_ndr_print(py_obj, "netr_LogonSamLogonWithFlags_in", NDR_IN);
   59163             : }
   59164             : 
   59165           0 : static PyObject *py_netr_LogonSamLogonWithFlags_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   59166             : {
   59167           0 :         return py_netr_LogonSamLogonWithFlags_ndr_print(py_obj, "netr_LogonSamLogonWithFlags_out", NDR_OUT);
   59168             : }
   59169             : 
   59170             : static PyMethodDef py_netr_LogonSamLogonWithFlags_methods[] = {
   59171             :         { "opnum", (PyCFunction)py_netr_LogonSamLogonWithFlags_ndr_opnum, METH_NOARGS|METH_CLASS,
   59172             :                 "netlogon.netr_LogonSamLogonWithFlags.opnum() -> 45 (0x2d) " },
   59173             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonWithFlags_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   59174             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   59175             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonWithFlags_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   59176             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   59177             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonWithFlags_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   59178             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   59179             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_LogonSamLogonWithFlags_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   59180             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   59181             :         { "__ndr_print_in__", (PyCFunction)py_netr_LogonSamLogonWithFlags_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   59182             :         { "__ndr_print_out__", (PyCFunction)py_netr_LogonSamLogonWithFlags_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   59183             :         { NULL, NULL, 0, NULL }
   59184             : };
   59185             : 
   59186             : 
   59187             : static PyTypeObject netr_LogonSamLogonWithFlags_Type = {
   59188             :         PyVarObject_HEAD_INIT(NULL, 0)
   59189             :         .tp_name = "netlogon.netr_LogonSamLogonWithFlags",
   59190             :         .tp_getset = py_netr_LogonSamLogonWithFlags_getsetters,
   59191             :         .tp_methods = py_netr_LogonSamLogonWithFlags_methods,
   59192             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   59193             :         .tp_new = py_netr_LogonSamLogonWithFlags_new,
   59194             : };
   59195             : 
   59196           4 : static bool pack_py_netr_LogonSamLogonWithFlags_args_in(PyObject *args, PyObject *kwargs, struct netr_LogonSamLogonWithFlags *r)
   59197             : {
   59198             :         PyObject *py_server_name;
   59199             :         PyObject *py_computer_name;
   59200             :         PyObject *py_credential;
   59201             :         PyObject *py_return_authenticator;
   59202             :         PyObject *py_logon_level;
   59203             :         PyObject *py_logon;
   59204             :         PyObject *py_validation_level;
   59205             :         PyObject *py_flags;
   59206           4 :         const char *kwnames[] = {
   59207             :                 "server_name", "computer_name", "credential", "return_authenticator", "logon_level", "logon", "validation_level", "flags", NULL
   59208             :         };
   59209             : 
   59210           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)) {
   59211           0 :                 return false;
   59212             :         }
   59213             : 
   59214           4 :         if (py_server_name == NULL) {
   59215           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   59216           0 :                 return false;
   59217             :         }
   59218           4 :         if (py_server_name == Py_None) {
   59219           0 :                 r->in.server_name = NULL;
   59220             :         } else {
   59221           4 :                 r->in.server_name = NULL;
   59222             :                 {
   59223             :                         const char *test_str;
   59224             :                         const char *talloc_str;
   59225           4 :                         PyObject *unicode = NULL;
   59226           4 :                         if (PyUnicode_Check(py_server_name)) {
   59227           4 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   59228           4 :                                 if (unicode == NULL) {
   59229           0 :                                         PyErr_NoMemory();
   59230           0 :                                         return false;
   59231             :                                 }
   59232           4 :                                 test_str = PyBytes_AS_STRING(unicode);
   59233           0 :                         } else if (PyBytes_Check(py_server_name)) {
   59234           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   59235             :                         } else {
   59236           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   59237           0 :                                 return false;
   59238             :                         }
   59239           4 :                         talloc_str = talloc_strdup(r, test_str);
   59240           4 :                         if (unicode != NULL) {
   59241           4 :                                 Py_DECREF(unicode);
   59242             :                         }
   59243           4 :                         if (talloc_str == NULL) {
   59244           0 :                                 PyErr_NoMemory();
   59245           0 :                                 return false;
   59246             :                         }
   59247           4 :                         r->in.server_name = talloc_str;
   59248             :                 }
   59249             :         }
   59250           4 :         if (py_computer_name == NULL) {
   59251           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   59252           0 :                 return false;
   59253             :         }
   59254           4 :         if (py_computer_name == Py_None) {
   59255           0 :                 r->in.computer_name = NULL;
   59256             :         } else {
   59257           4 :                 r->in.computer_name = NULL;
   59258             :                 {
   59259             :                         const char *test_str;
   59260             :                         const char *talloc_str;
   59261           4 :                         PyObject *unicode = NULL;
   59262           4 :                         if (PyUnicode_Check(py_computer_name)) {
   59263           4 :                                 unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   59264           4 :                                 if (unicode == NULL) {
   59265           0 :                                         PyErr_NoMemory();
   59266           0 :                                         return false;
   59267             :                                 }
   59268           4 :                                 test_str = PyBytes_AS_STRING(unicode);
   59269           0 :                         } else if (PyBytes_Check(py_computer_name)) {
   59270           0 :                                 test_str = PyBytes_AS_STRING(py_computer_name);
   59271             :                         } else {
   59272           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   59273           0 :                                 return false;
   59274             :                         }
   59275           4 :                         talloc_str = talloc_strdup(r, test_str);
   59276           4 :                         if (unicode != NULL) {
   59277           4 :                                 Py_DECREF(unicode);
   59278             :                         }
   59279           4 :                         if (talloc_str == NULL) {
   59280           0 :                                 PyErr_NoMemory();
   59281           0 :                                 return false;
   59282             :                         }
   59283           4 :                         r->in.computer_name = talloc_str;
   59284             :                 }
   59285             :         }
   59286           4 :         if (py_credential == NULL) {
   59287           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   59288           0 :                 return false;
   59289             :         }
   59290           4 :         if (py_credential == Py_None) {
   59291           0 :                 r->in.credential = NULL;
   59292             :         } else {
   59293           4 :                 r->in.credential = NULL;
   59294           4 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   59295           4 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   59296           0 :                         PyErr_NoMemory();
   59297           0 :                         return false;
   59298             :                 }
   59299           4 :                 r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   59300             :         }
   59301           4 :         if (py_return_authenticator == NULL) {
   59302           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.return_authenticator");
   59303           0 :                 return false;
   59304             :         }
   59305           4 :         if (py_return_authenticator == Py_None) {
   59306           0 :                 r->in.return_authenticator = NULL;
   59307             :         } else {
   59308           4 :                 r->in.return_authenticator = NULL;
   59309           4 :                 PY_CHECK_TYPE(&netr_Authenticator_Type, py_return_authenticator, return false;);
   59310           4 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_return_authenticator)) == NULL) {
   59311           0 :                         PyErr_NoMemory();
   59312           0 :                         return false;
   59313             :                 }
   59314           4 :                 r->in.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(py_return_authenticator);
   59315             :         }
   59316           4 :         if (py_logon_level == NULL) {
   59317           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon_level");
   59318           0 :                 return false;
   59319             :         }
   59320             :         {
   59321           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.logon_level));
   59322           4 :                 if (PyLong_Check(py_logon_level)) {
   59323             :                         unsigned long long test_var;
   59324           4 :                         test_var = PyLong_AsUnsignedLongLong(py_logon_level);
   59325           4 :                         if (PyErr_Occurred() != NULL) {
   59326           0 :                                 return false;
   59327             :                         }
   59328           4 :                         if (test_var > uint_max) {
   59329           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   59330             :                                   PyLong_Type.tp_name, uint_max, test_var);
   59331           0 :                                 return false;
   59332             :                         }
   59333           4 :                         r->in.logon_level = test_var;
   59334             :                 } else {
   59335           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   59336             :                           PyLong_Type.tp_name);
   59337           0 :                         return false;
   59338             :                 }
   59339             :         }
   59340           4 :         if (py_logon == NULL) {
   59341           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.logon");
   59342           0 :                 return false;
   59343             :         }
   59344           4 :         r->in.logon = talloc_ptrtype(r, r->in.logon);
   59345           4 :         if (r->in.logon == NULL) {
   59346           0 :                 PyErr_NoMemory();
   59347           0 :                 return false;
   59348             :         }
   59349             :         {
   59350             :                 union netr_LogonLevel *logon_switch_1;
   59351           4 :                 logon_switch_1 = (union netr_LogonLevel *)pyrpc_export_union(&netr_LogonLevel_Type, r, r->in.logon_level, py_logon, "union netr_LogonLevel");
   59352           4 :                 if (logon_switch_1 == NULL) {
   59353           0 :                         return false;
   59354             :                 }
   59355           4 :                 r->in.logon = logon_switch_1;
   59356             :         }
   59357           4 :         if (py_validation_level == NULL) {
   59358           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.validation_level");
   59359           0 :                 return false;
   59360             :         }
   59361             :         {
   59362           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.validation_level));
   59363           4 :                 if (PyLong_Check(py_validation_level)) {
   59364             :                         unsigned long long test_var;
   59365           4 :                         test_var = PyLong_AsUnsignedLongLong(py_validation_level);
   59366           4 :                         if (PyErr_Occurred() != NULL) {
   59367           0 :                                 return false;
   59368             :                         }
   59369           4 :                         if (test_var > uint_max) {
   59370           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   59371             :                                   PyLong_Type.tp_name, uint_max, test_var);
   59372           0 :                                 return false;
   59373             :                         }
   59374           4 :                         r->in.validation_level = test_var;
   59375             :                 } else {
   59376           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   59377             :                           PyLong_Type.tp_name);
   59378           0 :                         return false;
   59379             :                 }
   59380             :         }
   59381           4 :         if (py_flags == NULL) {
   59382           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.flags");
   59383           0 :                 return false;
   59384             :         }
   59385           4 :         r->in.flags = talloc_ptrtype(r, r->in.flags);
   59386           4 :         if (r->in.flags == NULL) {
   59387           0 :                 PyErr_NoMemory();
   59388           0 :                 return false;
   59389             :         }
   59390             :         {
   59391           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*r->in.flags));
   59392           4 :                 if (PyLong_Check(py_flags)) {
   59393             :                         unsigned long long test_var;
   59394           4 :                         test_var = PyLong_AsUnsignedLongLong(py_flags);
   59395           4 :                         if (PyErr_Occurred() != NULL) {
   59396           0 :                                 return false;
   59397             :                         }
   59398           4 :                         if (test_var > uint_max) {
   59399           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   59400             :                                   PyLong_Type.tp_name, uint_max, test_var);
   59401           0 :                                 return false;
   59402             :                         }
   59403           4 :                         *r->in.flags = test_var;
   59404             :                 } else {
   59405           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   59406             :                           PyLong_Type.tp_name);
   59407           0 :                         return false;
   59408             :                 }
   59409             :         }
   59410           4 :         return true;
   59411             : }
   59412             : 
   59413           4 : static PyObject *unpack_py_netr_LogonSamLogonWithFlags_args_out(struct netr_LogonSamLogonWithFlags *r)
   59414             : {
   59415             :         PyObject *result;
   59416             :         PyObject *py_return_authenticator;
   59417             :         PyObject *py_validation;
   59418             :         PyObject *py_authoritative;
   59419             :         PyObject *py_flags;
   59420           4 :         result = PyTuple_New(4);
   59421           4 :         if (r->out.return_authenticator == NULL) {
   59422           0 :                 py_return_authenticator = Py_None;
   59423           0 :                 Py_INCREF(py_return_authenticator);
   59424             :         } else {
   59425           4 :                 py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   59426             :         }
   59427           4 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   59428           4 :         py_validation = pyrpc_import_union(&netr_Validation_Type, r->out.validation, r->in.validation_level, r->out.validation, "union netr_Validation");
   59429           4 :         if (py_validation == NULL) {
   59430           0 :                 return NULL;
   59431             :         }
   59432           4 :         PyTuple_SetItem(result, 1, py_validation);
   59433           4 :         py_authoritative = PyLong_FromLong((uint16_t)*r->out.authoritative);
   59434           4 :         PyTuple_SetItem(result, 2, py_authoritative);
   59435           4 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)*r->out.flags);
   59436           4 :         PyTuple_SetItem(result, 3, py_flags);
   59437           4 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   59438           0 :                 PyErr_SetNTSTATUS(r->out.result);
   59439           0 :                 return NULL;
   59440             :         }
   59441             : 
   59442           4 :         return result;
   59443             : }
   59444             : 
   59445             : 
   59446           0 : static PyObject *py_netr_ServerGetTrustInfo_in_get_server_name(PyObject *obj, void *closure)
   59447             : {
   59448           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(obj);
   59449             :         PyObject *py_server_name;
   59450           0 :         if (object->in.server_name == NULL) {
   59451           0 :                 Py_RETURN_NONE;
   59452             :         }
   59453           0 :         if (object->in.server_name == NULL) {
   59454           0 :                 py_server_name = Py_None;
   59455           0 :                 Py_INCREF(py_server_name);
   59456             :         } else {
   59457           0 :                 if (object->in.server_name == NULL) {
   59458           0 :                         py_server_name = Py_None;
   59459           0 :                         Py_INCREF(py_server_name);
   59460             :                 } else {
   59461           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   59462             :                 }
   59463             :         }
   59464           0 :         return py_server_name;
   59465             : }
   59466             : 
   59467           0 : static int py_netr_ServerGetTrustInfo_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   59468             : {
   59469           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   59470           0 :         if (value == NULL) {
   59471           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   59472           0 :                 return -1;
   59473             :         }
   59474           0 :         if (value == Py_None) {
   59475           0 :                 object->in.server_name = NULL;
   59476             :         } else {
   59477           0 :                 object->in.server_name = NULL;
   59478             :                 {
   59479             :                         const char *test_str;
   59480             :                         const char *talloc_str;
   59481           0 :                         PyObject *unicode = NULL;
   59482           0 :                         if (PyUnicode_Check(value)) {
   59483           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   59484           0 :                                 if (unicode == NULL) {
   59485           0 :                                         PyErr_NoMemory();
   59486           0 :                                         return -1;
   59487             :                                 }
   59488           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   59489           0 :                         } else if (PyBytes_Check(value)) {
   59490           0 :                                 test_str = PyBytes_AS_STRING(value);
   59491             :                         } else {
   59492           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   59493           0 :                                 return -1;
   59494             :                         }
   59495           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   59496           0 :                         if (unicode != NULL) {
   59497           0 :                                 Py_DECREF(unicode);
   59498             :                         }
   59499           0 :                         if (talloc_str == NULL) {
   59500           0 :                                 PyErr_NoMemory();
   59501           0 :                                 return -1;
   59502             :                         }
   59503           0 :                         object->in.server_name = talloc_str;
   59504             :                 }
   59505             :         }
   59506           0 :         return 0;
   59507             : }
   59508             : 
   59509           0 : static PyObject *py_netr_ServerGetTrustInfo_in_get_account_name(PyObject *obj, void *closure)
   59510             : {
   59511           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(obj);
   59512             :         PyObject *py_account_name;
   59513           0 :         if (object->in.account_name == NULL) {
   59514           0 :                 Py_RETURN_NONE;
   59515             :         }
   59516           0 :         if (object->in.account_name == NULL) {
   59517           0 :                 py_account_name = Py_None;
   59518           0 :                 Py_INCREF(py_account_name);
   59519             :         } else {
   59520           0 :                 py_account_name = PyUnicode_Decode(object->in.account_name, strlen(object->in.account_name), "utf-8", "ignore");
   59521             :         }
   59522           0 :         return py_account_name;
   59523             : }
   59524             : 
   59525           0 : static int py_netr_ServerGetTrustInfo_in_set_account_name(PyObject *py_obj, PyObject *value, void *closure)
   59526             : {
   59527           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   59528           0 :         if (value == NULL) {
   59529           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.account_name");
   59530           0 :                 return -1;
   59531             :         }
   59532           0 :         object->in.account_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.account_name);
   59533           0 :         if (object->in.account_name == NULL) {
   59534           0 :                 PyErr_NoMemory();
   59535           0 :                 return -1;
   59536             :         }
   59537             :         {
   59538             :                 const char *test_str;
   59539             :                 const char *talloc_str;
   59540           0 :                 PyObject *unicode = NULL;
   59541           0 :                 if (PyUnicode_Check(value)) {
   59542           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   59543           0 :                         if (unicode == NULL) {
   59544           0 :                                 PyErr_NoMemory();
   59545           0 :                                 return -1;
   59546             :                         }
   59547           0 :                         test_str = PyBytes_AS_STRING(unicode);
   59548           0 :                 } else if (PyBytes_Check(value)) {
   59549           0 :                         test_str = PyBytes_AS_STRING(value);
   59550             :                 } else {
   59551           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   59552           0 :                         return -1;
   59553             :                 }
   59554           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   59555           0 :                 if (unicode != NULL) {
   59556           0 :                         Py_DECREF(unicode);
   59557             :                 }
   59558           0 :                 if (talloc_str == NULL) {
   59559           0 :                         PyErr_NoMemory();
   59560           0 :                         return -1;
   59561             :                 }
   59562           0 :                 object->in.account_name = talloc_str;
   59563             :         }
   59564           0 :         return 0;
   59565             : }
   59566             : 
   59567           0 : static PyObject *py_netr_ServerGetTrustInfo_in_get_secure_channel_type(PyObject *obj, void *closure)
   59568             : {
   59569           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(obj);
   59570             :         PyObject *py_secure_channel_type;
   59571           0 :         py_secure_channel_type = PyLong_FromLong((uint16_t)object->in.secure_channel_type);
   59572           0 :         return py_secure_channel_type;
   59573             : }
   59574             : 
   59575           0 : static int py_netr_ServerGetTrustInfo_in_set_secure_channel_type(PyObject *py_obj, PyObject *value, void *closure)
   59576             : {
   59577           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   59578           0 :         if (value == NULL) {
   59579           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.secure_channel_type");
   59580           0 :                 return -1;
   59581             :         }
   59582             :         {
   59583           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.secure_channel_type));
   59584           0 :                 if (PyLong_Check(value)) {
   59585             :                         unsigned long long test_var;
   59586           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   59587           0 :                         if (PyErr_Occurred() != NULL) {
   59588           0 :                                 return -1;
   59589             :                         }
   59590           0 :                         if (test_var > uint_max) {
   59591           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   59592             :                                   PyLong_Type.tp_name, uint_max, test_var);
   59593           0 :                                 return -1;
   59594             :                         }
   59595           0 :                         object->in.secure_channel_type = test_var;
   59596             :                 } else {
   59597           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   59598             :                           PyLong_Type.tp_name);
   59599           0 :                         return -1;
   59600             :                 }
   59601             :         }
   59602           0 :         return 0;
   59603             : }
   59604             : 
   59605           0 : static PyObject *py_netr_ServerGetTrustInfo_in_get_computer_name(PyObject *obj, void *closure)
   59606             : {
   59607           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(obj);
   59608             :         PyObject *py_computer_name;
   59609           0 :         if (object->in.computer_name == NULL) {
   59610           0 :                 Py_RETURN_NONE;
   59611             :         }
   59612           0 :         if (object->in.computer_name == NULL) {
   59613           0 :                 py_computer_name = Py_None;
   59614           0 :                 Py_INCREF(py_computer_name);
   59615             :         } else {
   59616           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   59617             :         }
   59618           0 :         return py_computer_name;
   59619             : }
   59620             : 
   59621           0 : static int py_netr_ServerGetTrustInfo_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   59622             : {
   59623           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   59624           0 :         if (value == NULL) {
   59625           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   59626           0 :                 return -1;
   59627             :         }
   59628           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   59629           0 :         if (object->in.computer_name == NULL) {
   59630           0 :                 PyErr_NoMemory();
   59631           0 :                 return -1;
   59632             :         }
   59633             :         {
   59634             :                 const char *test_str;
   59635             :                 const char *talloc_str;
   59636           0 :                 PyObject *unicode = NULL;
   59637           0 :                 if (PyUnicode_Check(value)) {
   59638           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   59639           0 :                         if (unicode == NULL) {
   59640           0 :                                 PyErr_NoMemory();
   59641           0 :                                 return -1;
   59642             :                         }
   59643           0 :                         test_str = PyBytes_AS_STRING(unicode);
   59644           0 :                 } else if (PyBytes_Check(value)) {
   59645           0 :                         test_str = PyBytes_AS_STRING(value);
   59646             :                 } else {
   59647           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   59648           0 :                         return -1;
   59649             :                 }
   59650           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   59651           0 :                 if (unicode != NULL) {
   59652           0 :                         Py_DECREF(unicode);
   59653             :                 }
   59654           0 :                 if (talloc_str == NULL) {
   59655           0 :                         PyErr_NoMemory();
   59656           0 :                         return -1;
   59657             :                 }
   59658           0 :                 object->in.computer_name = talloc_str;
   59659             :         }
   59660           0 :         return 0;
   59661             : }
   59662             : 
   59663           0 : static PyObject *py_netr_ServerGetTrustInfo_in_get_credential(PyObject *obj, void *closure)
   59664             : {
   59665           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(obj);
   59666             :         PyObject *py_credential;
   59667           0 :         if (object->in.credential == NULL) {
   59668           0 :                 Py_RETURN_NONE;
   59669             :         }
   59670           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   59671           0 :         return py_credential;
   59672             : }
   59673             : 
   59674           0 : static int py_netr_ServerGetTrustInfo_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   59675             : {
   59676           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   59677           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   59678           0 :         if (value == NULL) {
   59679           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   59680           0 :                 return -1;
   59681             :         }
   59682           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   59683           0 :         if (object->in.credential == NULL) {
   59684           0 :                 PyErr_NoMemory();
   59685           0 :                 return -1;
   59686             :         }
   59687           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   59688           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   59689           0 :                 PyErr_NoMemory();
   59690           0 :                 return -1;
   59691             :         }
   59692           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   59693           0 :         return 0;
   59694             : }
   59695             : 
   59696           0 : static PyObject *py_netr_ServerGetTrustInfo_out_get_return_authenticator(PyObject *obj, void *closure)
   59697             : {
   59698           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(obj);
   59699             :         PyObject *py_return_authenticator;
   59700           0 :         if (object->out.return_authenticator == NULL) {
   59701           0 :                 Py_RETURN_NONE;
   59702             :         }
   59703           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   59704           0 :         return py_return_authenticator;
   59705             : }
   59706             : 
   59707           0 : static int py_netr_ServerGetTrustInfo_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   59708             : {
   59709           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   59710           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   59711           0 :         if (value == NULL) {
   59712           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   59713           0 :                 return -1;
   59714             :         }
   59715           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   59716           0 :         if (object->out.return_authenticator == NULL) {
   59717           0 :                 PyErr_NoMemory();
   59718           0 :                 return -1;
   59719             :         }
   59720           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   59721           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   59722           0 :                 PyErr_NoMemory();
   59723           0 :                 return -1;
   59724             :         }
   59725           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   59726           0 :         return 0;
   59727             : }
   59728             : 
   59729           0 : static PyObject *py_netr_ServerGetTrustInfo_out_get_new_owf_password(PyObject *obj, void *closure)
   59730             : {
   59731           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(obj);
   59732             :         PyObject *py_new_owf_password;
   59733           0 :         if (object->out.new_owf_password == NULL) {
   59734           0 :                 Py_RETURN_NONE;
   59735             :         }
   59736           0 :         py_new_owf_password = pytalloc_reference_ex(samr_Password_Type, object->out.new_owf_password, object->out.new_owf_password);
   59737           0 :         return py_new_owf_password;
   59738             : }
   59739             : 
   59740           0 : static int py_netr_ServerGetTrustInfo_out_set_new_owf_password(PyObject *py_obj, PyObject *value, void *closure)
   59741             : {
   59742           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   59743           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.new_owf_password));
   59744           0 :         if (value == NULL) {
   59745           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.new_owf_password");
   59746           0 :                 return -1;
   59747             :         }
   59748           0 :         object->out.new_owf_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.new_owf_password);
   59749           0 :         if (object->out.new_owf_password == NULL) {
   59750           0 :                 PyErr_NoMemory();
   59751           0 :                 return -1;
   59752             :         }
   59753           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
   59754           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   59755           0 :                 PyErr_NoMemory();
   59756           0 :                 return -1;
   59757             :         }
   59758           0 :         object->out.new_owf_password = (struct samr_Password *)pytalloc_get_ptr(value);
   59759           0 :         return 0;
   59760             : }
   59761             : 
   59762           0 : static PyObject *py_netr_ServerGetTrustInfo_out_get_old_owf_password(PyObject *obj, void *closure)
   59763             : {
   59764           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(obj);
   59765             :         PyObject *py_old_owf_password;
   59766           0 :         if (object->out.old_owf_password == NULL) {
   59767           0 :                 Py_RETURN_NONE;
   59768             :         }
   59769           0 :         py_old_owf_password = pytalloc_reference_ex(samr_Password_Type, object->out.old_owf_password, object->out.old_owf_password);
   59770           0 :         return py_old_owf_password;
   59771             : }
   59772             : 
   59773           0 : static int py_netr_ServerGetTrustInfo_out_set_old_owf_password(PyObject *py_obj, PyObject *value, void *closure)
   59774             : {
   59775           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   59776           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.old_owf_password));
   59777           0 :         if (value == NULL) {
   59778           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.old_owf_password");
   59779           0 :                 return -1;
   59780             :         }
   59781           0 :         object->out.old_owf_password = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.old_owf_password);
   59782           0 :         if (object->out.old_owf_password == NULL) {
   59783           0 :                 PyErr_NoMemory();
   59784           0 :                 return -1;
   59785             :         }
   59786           0 :         PY_CHECK_TYPE(samr_Password_Type, value, return -1;);
   59787           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   59788           0 :                 PyErr_NoMemory();
   59789           0 :                 return -1;
   59790             :         }
   59791           0 :         object->out.old_owf_password = (struct samr_Password *)pytalloc_get_ptr(value);
   59792           0 :         return 0;
   59793             : }
   59794             : 
   59795           0 : static PyObject *py_netr_ServerGetTrustInfo_out_get_trust_info(PyObject *obj, void *closure)
   59796             : {
   59797           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(obj);
   59798             :         PyObject *py_trust_info;
   59799           0 :         if (object->out.trust_info == NULL) {
   59800           0 :                 Py_RETURN_NONE;
   59801             :         }
   59802           0 :         if (*object->out.trust_info == NULL) {
   59803           0 :                 py_trust_info = Py_None;
   59804           0 :                 Py_INCREF(py_trust_info);
   59805             :         } else {
   59806           0 :                 py_trust_info = pytalloc_reference_ex(&netr_TrustInfo_Type, *object->out.trust_info, *object->out.trust_info);
   59807             :         }
   59808           0 :         return py_trust_info;
   59809             : }
   59810             : 
   59811           0 : static int py_netr_ServerGetTrustInfo_out_set_trust_info(PyObject *py_obj, PyObject *value, void *closure)
   59812             : {
   59813           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   59814           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.trust_info));
   59815           0 :         if (value == NULL) {
   59816           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.trust_info");
   59817           0 :                 return -1;
   59818             :         }
   59819           0 :         object->out.trust_info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.trust_info);
   59820           0 :         if (object->out.trust_info == NULL) {
   59821           0 :                 PyErr_NoMemory();
   59822           0 :                 return -1;
   59823             :         }
   59824           0 :         if (value == Py_None) {
   59825           0 :                 *object->out.trust_info = NULL;
   59826             :         } else {
   59827           0 :                 *object->out.trust_info = NULL;
   59828           0 :                 PY_CHECK_TYPE(&netr_TrustInfo_Type, value, return -1;);
   59829           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   59830           0 :                         PyErr_NoMemory();
   59831           0 :                         return -1;
   59832             :                 }
   59833           0 :                 *object->out.trust_info = (struct netr_TrustInfo *)pytalloc_get_ptr(value);
   59834             :         }
   59835           0 :         return 0;
   59836             : }
   59837             : 
   59838           0 : static PyObject *py_netr_ServerGetTrustInfo_get_result(PyObject *obj, void *closure)
   59839             : {
   59840           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(obj);
   59841             :         PyObject *py_result;
   59842           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   59843           0 :         return py_result;
   59844             : }
   59845             : 
   59846           0 : static int py_netr_ServerGetTrustInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   59847             : {
   59848           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   59849           0 :         if (value == NULL) {
   59850           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   59851           0 :                 return -1;
   59852             :         }
   59853           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   59854           0 :         return 0;
   59855             : }
   59856             : 
   59857             : static PyGetSetDef py_netr_ServerGetTrustInfo_getsetters[] = {
   59858             :         {
   59859             :                 .name = discard_const_p(char, "in_server_name"),
   59860             :                 .get = py_netr_ServerGetTrustInfo_in_get_server_name,
   59861             :                 .set = py_netr_ServerGetTrustInfo_in_set_server_name,
   59862             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   59863             :         },
   59864             :         {
   59865             :                 .name = discard_const_p(char, "in_account_name"),
   59866             :                 .get = py_netr_ServerGetTrustInfo_in_get_account_name,
   59867             :                 .set = py_netr_ServerGetTrustInfo_in_set_account_name,
   59868             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   59869             :         },
   59870             :         {
   59871             :                 .name = discard_const_p(char, "in_secure_channel_type"),
   59872             :                 .get = py_netr_ServerGetTrustInfo_in_get_secure_channel_type,
   59873             :                 .set = py_netr_ServerGetTrustInfo_in_set_secure_channel_type,
   59874             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_SchannelType")
   59875             :         },
   59876             :         {
   59877             :                 .name = discard_const_p(char, "in_computer_name"),
   59878             :                 .get = py_netr_ServerGetTrustInfo_in_get_computer_name,
   59879             :                 .set = py_netr_ServerGetTrustInfo_in_set_computer_name,
   59880             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   59881             :         },
   59882             :         {
   59883             :                 .name = discard_const_p(char, "in_credential"),
   59884             :                 .get = py_netr_ServerGetTrustInfo_in_get_credential,
   59885             :                 .set = py_netr_ServerGetTrustInfo_in_set_credential,
   59886             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   59887             :         },
   59888             :         {
   59889             :                 .name = discard_const_p(char, "out_return_authenticator"),
   59890             :                 .get = py_netr_ServerGetTrustInfo_out_get_return_authenticator,
   59891             :                 .set = py_netr_ServerGetTrustInfo_out_set_return_authenticator,
   59892             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   59893             :         },
   59894             :         {
   59895             :                 .name = discard_const_p(char, "out_new_owf_password"),
   59896             :                 .get = py_netr_ServerGetTrustInfo_out_get_new_owf_password,
   59897             :                 .set = py_netr_ServerGetTrustInfo_out_set_new_owf_password,
   59898             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
   59899             :         },
   59900             :         {
   59901             :                 .name = discard_const_p(char, "out_old_owf_password"),
   59902             :                 .get = py_netr_ServerGetTrustInfo_out_get_old_owf_password,
   59903             :                 .set = py_netr_ServerGetTrustInfo_out_set_old_owf_password,
   59904             :                 .doc = discard_const_p(char, "PIDL-generated element of base type samr_Password")
   59905             :         },
   59906             :         {
   59907             :                 .name = discard_const_p(char, "out_trust_info"),
   59908             :                 .get = py_netr_ServerGetTrustInfo_out_get_trust_info,
   59909             :                 .set = py_netr_ServerGetTrustInfo_out_set_trust_info,
   59910             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_TrustInfo")
   59911             :         },
   59912             :         {
   59913             :                 .name = discard_const_p(char, "result"),
   59914             :                 .get = py_netr_ServerGetTrustInfo_get_result,
   59915             :                 .set = py_netr_ServerGetTrustInfo_set_result,
   59916             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   59917             :         },
   59918             :         { .name = NULL }
   59919             : };
   59920             : 
   59921           0 : static PyObject *py_netr_ServerGetTrustInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   59922             : {
   59923           0 :         PyObject *self = pytalloc_new(struct netr_ServerGetTrustInfo, type);
   59924           0 :         struct netr_ServerGetTrustInfo *_self = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(self);
   59925           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   59926           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   59927           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   59928           0 :         _self->out.new_owf_password = talloc_zero(mem_ctx, struct samr_Password);
   59929           0 :         _self->out.old_owf_password = talloc_zero(mem_ctx, struct samr_Password);
   59930             :         /* a pointer to a NULL pointer */
   59931           0 :         _self->out.trust_info = talloc_zero(mem_ctx, struct netr_TrustInfo *);
   59932           0 :         return self;
   59933             : }
   59934             : 
   59935           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   59936             : {
   59937             : 
   59938             : 
   59939           0 :         return PyLong_FromLong(46);
   59940             : }
   59941             : 
   59942           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   59943             : {
   59944           0 :         const struct ndr_interface_call *call = NULL;
   59945           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   59946           0 :         PyObject *ret = NULL;
   59947           0 :         struct ndr_push *push = NULL;
   59948             :         DATA_BLOB blob;
   59949             :         enum ndr_err_code err;
   59950             : 
   59951           0 :         if (ndr_table_netlogon.num_calls < 47) {
   59952           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerGetTrustInfo_ndr_pack");
   59953           0 :                 return NULL;
   59954             :         }
   59955           0 :         call = &ndr_table_netlogon.calls[46];
   59956             : 
   59957           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   59958           0 :         if (push == NULL) {
   59959           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   59960           0 :                 return NULL;
   59961             :         }
   59962             : 
   59963           0 :         push->flags |= ndr_push_flags;
   59964             : 
   59965           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   59966           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   59967           0 :                 TALLOC_FREE(push);
   59968           0 :                 PyErr_SetNdrError(err);
   59969           0 :                 return NULL;
   59970             :         }
   59971           0 :         blob = ndr_push_blob(push);
   59972           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   59973           0 :         TALLOC_FREE(push);
   59974           0 :         return ret;
   59975             : }
   59976             : 
   59977           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   59978             : {
   59979           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   59980           0 :         PyObject *bigendian_obj = NULL;
   59981           0 :         PyObject *ndr64_obj = NULL;
   59982           0 :         uint32_t ndr_push_flags = 0;
   59983             : 
   59984           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   59985             :                 discard_const_p(char *, kwnames),
   59986             :                 &bigendian_obj,
   59987             :                 &ndr64_obj)) {
   59988           0 :                 return NULL;
   59989             :         }
   59990             : 
   59991           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   59992           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   59993             :         }
   59994           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   59995           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   59996             :         }
   59997             : 
   59998           0 :         return py_netr_ServerGetTrustInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   59999             : }
   60000             : 
   60001           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   60002             : {
   60003           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   60004           0 :         PyObject *bigendian_obj = NULL;
   60005           0 :         PyObject *ndr64_obj = NULL;
   60006           0 :         uint32_t ndr_push_flags = 0;
   60007             : 
   60008           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   60009             :                 discard_const_p(char *, kwnames),
   60010             :                 &bigendian_obj,
   60011             :                 &ndr64_obj)) {
   60012           0 :                 return NULL;
   60013             :         }
   60014             : 
   60015           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   60016           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   60017             :         }
   60018           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   60019           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   60020             :         }
   60021             : 
   60022           0 :         return py_netr_ServerGetTrustInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   60023             : }
   60024             : 
   60025           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   60026             : {
   60027           0 :         const struct ndr_interface_call *call = NULL;
   60028           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   60029           0 :         struct ndr_pull *pull = NULL;
   60030             :         enum ndr_err_code err;
   60031             : 
   60032           0 :         if (ndr_table_netlogon.num_calls < 47) {
   60033           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerGetTrustInfo_ndr_unpack");
   60034           0 :                 return NULL;
   60035             :         }
   60036           0 :         call = &ndr_table_netlogon.calls[46];
   60037             : 
   60038           0 :         pull = ndr_pull_init_blob(blob, object);
   60039           0 :         if (pull == NULL) {
   60040           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   60041           0 :                 return NULL;
   60042             :         }
   60043             : 
   60044           0 :         pull->flags |= ndr_pull_flags;
   60045             : 
   60046           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   60047           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   60048           0 :                 TALLOC_FREE(pull);
   60049           0 :                 PyErr_SetNdrError(err);
   60050           0 :                 return NULL;
   60051             :         }
   60052           0 :         if (!allow_remaining) {
   60053             :                 uint32_t highest_ofs;
   60054             : 
   60055           0 :                 if (pull->offset > pull->relative_highest_offset) {
   60056           0 :                         highest_ofs = pull->offset;
   60057             :                 } else {
   60058           0 :                         highest_ofs = pull->relative_highest_offset;
   60059             :                 }
   60060           0 :                 if (highest_ofs < pull->data_size) {
   60061           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   60062             :                                 "not all bytes consumed ofs[%u] size[%u]",
   60063             :                                 highest_ofs, pull->data_size);
   60064           0 :                         TALLOC_FREE(pull);
   60065           0 :                         PyErr_SetNdrError(err);
   60066           0 :                         return NULL;
   60067             :                 }
   60068             :         }
   60069             : 
   60070           0 :         TALLOC_FREE(pull);
   60071           0 :         Py_RETURN_NONE;
   60072             : }
   60073             : 
   60074           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   60075             : {
   60076             :         DATA_BLOB blob;
   60077           0 :         Py_ssize_t blob_length = 0;
   60078           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   60079           0 :         PyObject *bigendian_obj = NULL;
   60080           0 :         PyObject *ndr64_obj = NULL;
   60081           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   60082           0 :         PyObject *allow_remaining_obj = NULL;
   60083           0 :         bool allow_remaining = false;
   60084             : 
   60085           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   60086             :                 discard_const_p(char *, kwnames),
   60087             :                 &blob.data, &blob_length,
   60088             :                 &bigendian_obj,
   60089             :                 &ndr64_obj,
   60090             :                 &allow_remaining_obj)) {
   60091           0 :                 return NULL;
   60092             :         }
   60093           0 :         blob.length = blob_length;
   60094             : 
   60095           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   60096           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   60097             :         }
   60098           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   60099           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   60100             :         }
   60101             : 
   60102           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   60103           0 :                 allow_remaining = true;
   60104             :         }
   60105             : 
   60106           0 :         return py_netr_ServerGetTrustInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   60107             : }
   60108             : 
   60109           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   60110             : {
   60111             :         DATA_BLOB blob;
   60112           0 :         Py_ssize_t blob_length = 0;
   60113           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   60114           0 :         PyObject *bigendian_obj = NULL;
   60115           0 :         PyObject *ndr64_obj = NULL;
   60116           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   60117           0 :         PyObject *allow_remaining_obj = NULL;
   60118           0 :         bool allow_remaining = false;
   60119             : 
   60120           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   60121             :                 discard_const_p(char *, kwnames),
   60122             :                 &blob.data, &blob_length,
   60123             :                 &bigendian_obj,
   60124             :                 &ndr64_obj,
   60125             :                 &allow_remaining_obj)) {
   60126           0 :                 return NULL;
   60127             :         }
   60128           0 :         blob.length = blob_length;
   60129             : 
   60130           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   60131           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   60132             :         }
   60133           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   60134           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   60135             :         }
   60136             : 
   60137           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   60138           0 :                 allow_remaining = true;
   60139             :         }
   60140             : 
   60141           0 :         return py_netr_ServerGetTrustInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   60142             : }
   60143             : 
   60144           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   60145             : {
   60146           0 :         const struct ndr_interface_call *call = NULL;
   60147           0 :         struct netr_ServerGetTrustInfo *object = (struct netr_ServerGetTrustInfo *)pytalloc_get_ptr(py_obj);
   60148             :         PyObject *ret;
   60149             :         char *retstr;
   60150             : 
   60151           0 :         if (ndr_table_netlogon.num_calls < 47) {
   60152           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_ServerGetTrustInfo_ndr_print");
   60153           0 :                 return NULL;
   60154             :         }
   60155           0 :         call = &ndr_table_netlogon.calls[46];
   60156             : 
   60157           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   60158           0 :         ret = PyUnicode_FromString(retstr);
   60159           0 :         TALLOC_FREE(retstr);
   60160             : 
   60161           0 :         return ret;
   60162             : }
   60163             : 
   60164           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   60165             : {
   60166           0 :         return py_netr_ServerGetTrustInfo_ndr_print(py_obj, "netr_ServerGetTrustInfo_in", NDR_IN);
   60167             : }
   60168             : 
   60169           0 : static PyObject *py_netr_ServerGetTrustInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   60170             : {
   60171           0 :         return py_netr_ServerGetTrustInfo_ndr_print(py_obj, "netr_ServerGetTrustInfo_out", NDR_OUT);
   60172             : }
   60173             : 
   60174             : static PyMethodDef py_netr_ServerGetTrustInfo_methods[] = {
   60175             :         { "opnum", (PyCFunction)py_netr_ServerGetTrustInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
   60176             :                 "netlogon.netr_ServerGetTrustInfo.opnum() -> 46 (0x2e) " },
   60177             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerGetTrustInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   60178             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   60179             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerGetTrustInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   60180             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   60181             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerGetTrustInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   60182             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   60183             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_ServerGetTrustInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   60184             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   60185             :         { "__ndr_print_in__", (PyCFunction)py_netr_ServerGetTrustInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   60186             :         { "__ndr_print_out__", (PyCFunction)py_netr_ServerGetTrustInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   60187             :         { NULL, NULL, 0, NULL }
   60188             : };
   60189             : 
   60190             : 
   60191             : static PyTypeObject netr_ServerGetTrustInfo_Type = {
   60192             :         PyVarObject_HEAD_INIT(NULL, 0)
   60193             :         .tp_name = "netlogon.netr_ServerGetTrustInfo",
   60194             :         .tp_getset = py_netr_ServerGetTrustInfo_getsetters,
   60195             :         .tp_methods = py_netr_ServerGetTrustInfo_methods,
   60196             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   60197             :         .tp_new = py_netr_ServerGetTrustInfo_new,
   60198             : };
   60199             : 
   60200           0 : static bool pack_py_netr_ServerGetTrustInfo_args_in(PyObject *args, PyObject *kwargs, struct netr_ServerGetTrustInfo *r)
   60201             : {
   60202             :         PyObject *py_server_name;
   60203             :         PyObject *py_account_name;
   60204             :         PyObject *py_secure_channel_type;
   60205             :         PyObject *py_computer_name;
   60206             :         PyObject *py_credential;
   60207           0 :         const char *kwnames[] = {
   60208             :                 "server_name", "account_name", "secure_channel_type", "computer_name", "credential", NULL
   60209             :         };
   60210             : 
   60211           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)) {
   60212           0 :                 return false;
   60213             :         }
   60214             : 
   60215           0 :         if (py_server_name == NULL) {
   60216           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   60217           0 :                 return false;
   60218             :         }
   60219           0 :         if (py_server_name == Py_None) {
   60220           0 :                 r->in.server_name = NULL;
   60221             :         } else {
   60222           0 :                 r->in.server_name = NULL;
   60223             :                 {
   60224             :                         const char *test_str;
   60225             :                         const char *talloc_str;
   60226           0 :                         PyObject *unicode = NULL;
   60227           0 :                         if (PyUnicode_Check(py_server_name)) {
   60228           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   60229           0 :                                 if (unicode == NULL) {
   60230           0 :                                         PyErr_NoMemory();
   60231           0 :                                         return false;
   60232             :                                 }
   60233           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   60234           0 :                         } else if (PyBytes_Check(py_server_name)) {
   60235           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   60236             :                         } else {
   60237           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   60238           0 :                                 return false;
   60239             :                         }
   60240           0 :                         talloc_str = talloc_strdup(r, test_str);
   60241           0 :                         if (unicode != NULL) {
   60242           0 :                                 Py_DECREF(unicode);
   60243             :                         }
   60244           0 :                         if (talloc_str == NULL) {
   60245           0 :                                 PyErr_NoMemory();
   60246           0 :                                 return false;
   60247             :                         }
   60248           0 :                         r->in.server_name = talloc_str;
   60249             :                 }
   60250             :         }
   60251           0 :         if (py_account_name == NULL) {
   60252           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.account_name");
   60253           0 :                 return false;
   60254             :         }
   60255           0 :         r->in.account_name = talloc_ptrtype(r, r->in.account_name);
   60256           0 :         if (r->in.account_name == NULL) {
   60257           0 :                 PyErr_NoMemory();
   60258           0 :                 return false;
   60259             :         }
   60260             :         {
   60261             :                 const char *test_str;
   60262             :                 const char *talloc_str;
   60263           0 :                 PyObject *unicode = NULL;
   60264           0 :                 if (PyUnicode_Check(py_account_name)) {
   60265           0 :                         unicode = PyUnicode_AsEncodedString(py_account_name, "utf-8", "ignore");
   60266           0 :                         if (unicode == NULL) {
   60267           0 :                                 PyErr_NoMemory();
   60268           0 :                                 return false;
   60269             :                         }
   60270           0 :                         test_str = PyBytes_AS_STRING(unicode);
   60271           0 :                 } else if (PyBytes_Check(py_account_name)) {
   60272           0 :                         test_str = PyBytes_AS_STRING(py_account_name);
   60273             :                 } else {
   60274           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_account_name)->tp_name);
   60275           0 :                         return false;
   60276             :                 }
   60277           0 :                 talloc_str = talloc_strdup(r, test_str);
   60278           0 :                 if (unicode != NULL) {
   60279           0 :                         Py_DECREF(unicode);
   60280             :                 }
   60281           0 :                 if (talloc_str == NULL) {
   60282           0 :                         PyErr_NoMemory();
   60283           0 :                         return false;
   60284             :                 }
   60285           0 :                 r->in.account_name = talloc_str;
   60286             :         }
   60287           0 :         if (py_secure_channel_type == NULL) {
   60288           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.secure_channel_type");
   60289           0 :                 return false;
   60290             :         }
   60291             :         {
   60292           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.secure_channel_type));
   60293           0 :                 if (PyLong_Check(py_secure_channel_type)) {
   60294             :                         unsigned long long test_var;
   60295           0 :                         test_var = PyLong_AsUnsignedLongLong(py_secure_channel_type);
   60296           0 :                         if (PyErr_Occurred() != NULL) {
   60297           0 :                                 return false;
   60298             :                         }
   60299           0 :                         if (test_var > uint_max) {
   60300           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   60301             :                                   PyLong_Type.tp_name, uint_max, test_var);
   60302           0 :                                 return false;
   60303             :                         }
   60304           0 :                         r->in.secure_channel_type = test_var;
   60305             :                 } else {
   60306           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   60307             :                           PyLong_Type.tp_name);
   60308           0 :                         return false;
   60309             :                 }
   60310             :         }
   60311           0 :         if (py_computer_name == NULL) {
   60312           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   60313           0 :                 return false;
   60314             :         }
   60315           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   60316           0 :         if (r->in.computer_name == NULL) {
   60317           0 :                 PyErr_NoMemory();
   60318           0 :                 return false;
   60319             :         }
   60320             :         {
   60321             :                 const char *test_str;
   60322             :                 const char *talloc_str;
   60323           0 :                 PyObject *unicode = NULL;
   60324           0 :                 if (PyUnicode_Check(py_computer_name)) {
   60325           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   60326           0 :                         if (unicode == NULL) {
   60327           0 :                                 PyErr_NoMemory();
   60328           0 :                                 return false;
   60329             :                         }
   60330           0 :                         test_str = PyBytes_AS_STRING(unicode);
   60331           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   60332           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   60333             :                 } else {
   60334           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   60335           0 :                         return false;
   60336             :                 }
   60337           0 :                 talloc_str = talloc_strdup(r, test_str);
   60338           0 :                 if (unicode != NULL) {
   60339           0 :                         Py_DECREF(unicode);
   60340             :                 }
   60341           0 :                 if (talloc_str == NULL) {
   60342           0 :                         PyErr_NoMemory();
   60343           0 :                         return false;
   60344             :                 }
   60345           0 :                 r->in.computer_name = talloc_str;
   60346             :         }
   60347           0 :         if (py_credential == NULL) {
   60348           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   60349           0 :                 return false;
   60350             :         }
   60351           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   60352           0 :         if (r->in.credential == NULL) {
   60353           0 :                 PyErr_NoMemory();
   60354           0 :                 return false;
   60355             :         }
   60356           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   60357           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   60358           0 :                 PyErr_NoMemory();
   60359           0 :                 return false;
   60360             :         }
   60361           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   60362           0 :         return true;
   60363             : }
   60364             : 
   60365           0 : static PyObject *unpack_py_netr_ServerGetTrustInfo_args_out(struct netr_ServerGetTrustInfo *r)
   60366             : {
   60367             :         PyObject *result;
   60368             :         PyObject *py_return_authenticator;
   60369             :         PyObject *py_new_owf_password;
   60370             :         PyObject *py_old_owf_password;
   60371             :         PyObject *py_trust_info;
   60372           0 :         result = PyTuple_New(4);
   60373           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   60374           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   60375           0 :         py_new_owf_password = pytalloc_reference_ex(samr_Password_Type, r->out.new_owf_password, r->out.new_owf_password);
   60376           0 :         PyTuple_SetItem(result, 1, py_new_owf_password);
   60377           0 :         py_old_owf_password = pytalloc_reference_ex(samr_Password_Type, r->out.old_owf_password, r->out.old_owf_password);
   60378           0 :         PyTuple_SetItem(result, 2, py_old_owf_password);
   60379           0 :         if (*r->out.trust_info == NULL) {
   60380           0 :                 py_trust_info = Py_None;
   60381           0 :                 Py_INCREF(py_trust_info);
   60382             :         } else {
   60383           0 :                 py_trust_info = pytalloc_reference_ex(&netr_TrustInfo_Type, *r->out.trust_info, *r->out.trust_info);
   60384             :         }
   60385           0 :         PyTuple_SetItem(result, 3, py_trust_info);
   60386           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   60387           0 :                 PyErr_SetNTSTATUS(r->out.result);
   60388           0 :                 return NULL;
   60389             :         }
   60390             : 
   60391           0 :         return result;
   60392             : }
   60393             : 
   60394             : 
   60395           0 : static PyObject *py_netr_Unused47_get_result(PyObject *obj, void *closure)
   60396             : {
   60397           0 :         struct netr_Unused47 *object = (struct netr_Unused47 *)pytalloc_get_ptr(obj);
   60398             :         PyObject *py_result;
   60399           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   60400           0 :         return py_result;
   60401             : }
   60402             : 
   60403           0 : static int py_netr_Unused47_set_result(PyObject *py_obj, PyObject *value, void *closure)
   60404             : {
   60405           0 :         struct netr_Unused47 *object = (struct netr_Unused47 *)pytalloc_get_ptr(py_obj);
   60406           0 :         if (value == NULL) {
   60407           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   60408           0 :                 return -1;
   60409             :         }
   60410           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   60411           0 :         return 0;
   60412             : }
   60413             : 
   60414             : static PyGetSetDef py_netr_Unused47_getsetters[] = {
   60415             :         {
   60416             :                 .name = discard_const_p(char, "result"),
   60417             :                 .get = py_netr_Unused47_get_result,
   60418             :                 .set = py_netr_Unused47_set_result,
   60419             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   60420             :         },
   60421             :         { .name = NULL }
   60422             : };
   60423             : 
   60424           0 : static PyObject *py_netr_Unused47_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   60425             : {
   60426           0 :         PyObject *self = pytalloc_new(struct netr_Unused47, type);
   60427           0 :         return self;
   60428             : }
   60429             : 
   60430           0 : static PyObject *py_netr_Unused47_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   60431             : {
   60432             : 
   60433             : 
   60434           0 :         return PyLong_FromLong(47);
   60435             : }
   60436             : 
   60437           0 : static PyObject *py_netr_Unused47_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   60438             : {
   60439           0 :         const struct ndr_interface_call *call = NULL;
   60440           0 :         struct netr_Unused47 *object = (struct netr_Unused47 *)pytalloc_get_ptr(py_obj);
   60441           0 :         PyObject *ret = NULL;
   60442           0 :         struct ndr_push *push = NULL;
   60443             :         DATA_BLOB blob;
   60444             :         enum ndr_err_code err;
   60445             : 
   60446           0 :         if (ndr_table_netlogon.num_calls < 48) {
   60447           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_Unused47_ndr_pack");
   60448           0 :                 return NULL;
   60449             :         }
   60450           0 :         call = &ndr_table_netlogon.calls[47];
   60451             : 
   60452           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   60453           0 :         if (push == NULL) {
   60454           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   60455           0 :                 return NULL;
   60456             :         }
   60457             : 
   60458           0 :         push->flags |= ndr_push_flags;
   60459             : 
   60460           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   60461           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   60462           0 :                 TALLOC_FREE(push);
   60463           0 :                 PyErr_SetNdrError(err);
   60464           0 :                 return NULL;
   60465             :         }
   60466           0 :         blob = ndr_push_blob(push);
   60467           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   60468           0 :         TALLOC_FREE(push);
   60469           0 :         return ret;
   60470             : }
   60471             : 
   60472           0 : static PyObject *py_netr_Unused47_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   60473             : {
   60474           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   60475           0 :         PyObject *bigendian_obj = NULL;
   60476           0 :         PyObject *ndr64_obj = NULL;
   60477           0 :         uint32_t ndr_push_flags = 0;
   60478             : 
   60479           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   60480             :                 discard_const_p(char *, kwnames),
   60481             :                 &bigendian_obj,
   60482             :                 &ndr64_obj)) {
   60483           0 :                 return NULL;
   60484             :         }
   60485             : 
   60486           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   60487           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   60488             :         }
   60489           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   60490           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   60491             :         }
   60492             : 
   60493           0 :         return py_netr_Unused47_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   60494             : }
   60495             : 
   60496           0 : static PyObject *py_netr_Unused47_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   60497             : {
   60498           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   60499           0 :         PyObject *bigendian_obj = NULL;
   60500           0 :         PyObject *ndr64_obj = NULL;
   60501           0 :         uint32_t ndr_push_flags = 0;
   60502             : 
   60503           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   60504             :                 discard_const_p(char *, kwnames),
   60505             :                 &bigendian_obj,
   60506             :                 &ndr64_obj)) {
   60507           0 :                 return NULL;
   60508             :         }
   60509             : 
   60510           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   60511           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   60512             :         }
   60513           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   60514           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   60515             :         }
   60516             : 
   60517           0 :         return py_netr_Unused47_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   60518             : }
   60519             : 
   60520           0 : static PyObject *py_netr_Unused47_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   60521             : {
   60522           0 :         const struct ndr_interface_call *call = NULL;
   60523           0 :         struct netr_Unused47 *object = (struct netr_Unused47 *)pytalloc_get_ptr(py_obj);
   60524           0 :         struct ndr_pull *pull = NULL;
   60525             :         enum ndr_err_code err;
   60526             : 
   60527           0 :         if (ndr_table_netlogon.num_calls < 48) {
   60528           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_Unused47_ndr_unpack");
   60529           0 :                 return NULL;
   60530             :         }
   60531           0 :         call = &ndr_table_netlogon.calls[47];
   60532             : 
   60533           0 :         pull = ndr_pull_init_blob(blob, object);
   60534           0 :         if (pull == NULL) {
   60535           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   60536           0 :                 return NULL;
   60537             :         }
   60538             : 
   60539           0 :         pull->flags |= ndr_pull_flags;
   60540             : 
   60541           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   60542           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   60543           0 :                 TALLOC_FREE(pull);
   60544           0 :                 PyErr_SetNdrError(err);
   60545           0 :                 return NULL;
   60546             :         }
   60547           0 :         if (!allow_remaining) {
   60548             :                 uint32_t highest_ofs;
   60549             : 
   60550           0 :                 if (pull->offset > pull->relative_highest_offset) {
   60551           0 :                         highest_ofs = pull->offset;
   60552             :                 } else {
   60553           0 :                         highest_ofs = pull->relative_highest_offset;
   60554             :                 }
   60555           0 :                 if (highest_ofs < pull->data_size) {
   60556           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   60557             :                                 "not all bytes consumed ofs[%u] size[%u]",
   60558             :                                 highest_ofs, pull->data_size);
   60559           0 :                         TALLOC_FREE(pull);
   60560           0 :                         PyErr_SetNdrError(err);
   60561           0 :                         return NULL;
   60562             :                 }
   60563             :         }
   60564             : 
   60565           0 :         TALLOC_FREE(pull);
   60566           0 :         Py_RETURN_NONE;
   60567             : }
   60568             : 
   60569           0 : static PyObject *py_netr_Unused47_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   60570             : {
   60571             :         DATA_BLOB blob;
   60572           0 :         Py_ssize_t blob_length = 0;
   60573           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   60574           0 :         PyObject *bigendian_obj = NULL;
   60575           0 :         PyObject *ndr64_obj = NULL;
   60576           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   60577           0 :         PyObject *allow_remaining_obj = NULL;
   60578           0 :         bool allow_remaining = false;
   60579             : 
   60580           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   60581             :                 discard_const_p(char *, kwnames),
   60582             :                 &blob.data, &blob_length,
   60583             :                 &bigendian_obj,
   60584             :                 &ndr64_obj,
   60585             :                 &allow_remaining_obj)) {
   60586           0 :                 return NULL;
   60587             :         }
   60588           0 :         blob.length = blob_length;
   60589             : 
   60590           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   60591           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   60592             :         }
   60593           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   60594           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   60595             :         }
   60596             : 
   60597           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   60598           0 :                 allow_remaining = true;
   60599             :         }
   60600             : 
   60601           0 :         return py_netr_Unused47_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   60602             : }
   60603             : 
   60604           0 : static PyObject *py_netr_Unused47_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   60605             : {
   60606             :         DATA_BLOB blob;
   60607           0 :         Py_ssize_t blob_length = 0;
   60608           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   60609           0 :         PyObject *bigendian_obj = NULL;
   60610           0 :         PyObject *ndr64_obj = NULL;
   60611           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   60612           0 :         PyObject *allow_remaining_obj = NULL;
   60613           0 :         bool allow_remaining = false;
   60614             : 
   60615           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   60616             :                 discard_const_p(char *, kwnames),
   60617             :                 &blob.data, &blob_length,
   60618             :                 &bigendian_obj,
   60619             :                 &ndr64_obj,
   60620             :                 &allow_remaining_obj)) {
   60621           0 :                 return NULL;
   60622             :         }
   60623           0 :         blob.length = blob_length;
   60624             : 
   60625           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   60626           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   60627             :         }
   60628           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   60629           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   60630             :         }
   60631             : 
   60632           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   60633           0 :                 allow_remaining = true;
   60634             :         }
   60635             : 
   60636           0 :         return py_netr_Unused47_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   60637             : }
   60638             : 
   60639           0 : static PyObject *py_netr_Unused47_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   60640             : {
   60641           0 :         const struct ndr_interface_call *call = NULL;
   60642           0 :         struct netr_Unused47 *object = (struct netr_Unused47 *)pytalloc_get_ptr(py_obj);
   60643             :         PyObject *ret;
   60644             :         char *retstr;
   60645             : 
   60646           0 :         if (ndr_table_netlogon.num_calls < 48) {
   60647           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_Unused47_ndr_print");
   60648           0 :                 return NULL;
   60649             :         }
   60650           0 :         call = &ndr_table_netlogon.calls[47];
   60651             : 
   60652           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   60653           0 :         ret = PyUnicode_FromString(retstr);
   60654           0 :         TALLOC_FREE(retstr);
   60655             : 
   60656           0 :         return ret;
   60657             : }
   60658             : 
   60659           0 : static PyObject *py_netr_Unused47_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   60660             : {
   60661           0 :         return py_netr_Unused47_ndr_print(py_obj, "netr_Unused47_in", NDR_IN);
   60662             : }
   60663             : 
   60664           0 : static PyObject *py_netr_Unused47_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   60665             : {
   60666           0 :         return py_netr_Unused47_ndr_print(py_obj, "netr_Unused47_out", NDR_OUT);
   60667             : }
   60668             : 
   60669             : static PyMethodDef py_netr_Unused47_methods[] = {
   60670             :         { "opnum", (PyCFunction)py_netr_Unused47_ndr_opnum, METH_NOARGS|METH_CLASS,
   60671             :                 "netlogon.netr_Unused47.opnum() -> 47 (0x2f) " },
   60672             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Unused47_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   60673             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   60674             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Unused47_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   60675             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   60676             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Unused47_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   60677             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   60678             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_Unused47_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   60679             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   60680             :         { "__ndr_print_in__", (PyCFunction)py_netr_Unused47_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   60681             :         { "__ndr_print_out__", (PyCFunction)py_netr_Unused47_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   60682             :         { NULL, NULL, 0, NULL }
   60683             : };
   60684             : 
   60685             : 
   60686             : static PyTypeObject netr_Unused47_Type = {
   60687             :         PyVarObject_HEAD_INIT(NULL, 0)
   60688             :         .tp_name = "netlogon.netr_Unused47",
   60689             :         .tp_getset = py_netr_Unused47_getsetters,
   60690             :         .tp_methods = py_netr_Unused47_methods,
   60691             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   60692             :         .tp_new = py_netr_Unused47_new,
   60693             : };
   60694             : 
   60695           0 : static bool pack_py_netr_Unused47_args_in(PyObject *args, PyObject *kwargs, struct netr_Unused47 *r)
   60696             : {
   60697           0 :         const char *kwnames[] = {
   60698             :                 NULL
   60699             :         };
   60700             : 
   60701           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":netr_Unused47", discard_const_p(char *, kwnames))) {
   60702           0 :                 return false;
   60703             :         }
   60704             : 
   60705           0 :         return true;
   60706             : }
   60707             : 
   60708           0 : static PyObject *unpack_py_netr_Unused47_args_out(struct netr_Unused47 *r)
   60709             : {
   60710             :         PyObject *result;
   60711           0 :         result = Py_None;
   60712           0 :         Py_INCREF(result);
   60713           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   60714           0 :                 PyErr_SetNTSTATUS(r->out.result);
   60715           0 :                 return NULL;
   60716             :         }
   60717             : 
   60718           0 :         return result;
   60719             : }
   60720             : 
   60721             : 
   60722           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_server_name(PyObject *obj, void *closure)
   60723             : {
   60724           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   60725             :         PyObject *py_server_name;
   60726           0 :         if (object->in.server_name == NULL) {
   60727           0 :                 Py_RETURN_NONE;
   60728             :         }
   60729           0 :         if (object->in.server_name == NULL) {
   60730           0 :                 py_server_name = Py_None;
   60731           0 :                 Py_INCREF(py_server_name);
   60732             :         } else {
   60733           0 :                 if (object->in.server_name == NULL) {
   60734           0 :                         py_server_name = Py_None;
   60735           0 :                         Py_INCREF(py_server_name);
   60736             :                 } else {
   60737           0 :                         py_server_name = PyUnicode_Decode(object->in.server_name, strlen(object->in.server_name), "utf-8", "ignore");
   60738             :                 }
   60739             :         }
   60740           0 :         return py_server_name;
   60741             : }
   60742             : 
   60743           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_server_name(PyObject *py_obj, PyObject *value, void *closure)
   60744             : {
   60745           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   60746           0 :         if (value == NULL) {
   60747           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.server_name");
   60748           0 :                 return -1;
   60749             :         }
   60750           0 :         if (value == Py_None) {
   60751           0 :                 object->in.server_name = NULL;
   60752             :         } else {
   60753           0 :                 object->in.server_name = NULL;
   60754             :                 {
   60755             :                         const char *test_str;
   60756             :                         const char *talloc_str;
   60757           0 :                         PyObject *unicode = NULL;
   60758           0 :                         if (PyUnicode_Check(value)) {
   60759           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   60760           0 :                                 if (unicode == NULL) {
   60761           0 :                                         PyErr_NoMemory();
   60762           0 :                                         return -1;
   60763             :                                 }
   60764           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   60765           0 :                         } else if (PyBytes_Check(value)) {
   60766           0 :                                 test_str = PyBytes_AS_STRING(value);
   60767             :                         } else {
   60768           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   60769           0 :                                 return -1;
   60770             :                         }
   60771           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   60772           0 :                         if (unicode != NULL) {
   60773           0 :                                 Py_DECREF(unicode);
   60774             :                         }
   60775           0 :                         if (talloc_str == NULL) {
   60776           0 :                                 PyErr_NoMemory();
   60777           0 :                                 return -1;
   60778             :                         }
   60779           0 :                         object->in.server_name = talloc_str;
   60780             :                 }
   60781             :         }
   60782           0 :         return 0;
   60783             : }
   60784             : 
   60785           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_computer_name(PyObject *obj, void *closure)
   60786             : {
   60787           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   60788             :         PyObject *py_computer_name;
   60789           0 :         if (object->in.computer_name == NULL) {
   60790           0 :                 Py_RETURN_NONE;
   60791             :         }
   60792           0 :         if (object->in.computer_name == NULL) {
   60793           0 :                 py_computer_name = Py_None;
   60794           0 :                 Py_INCREF(py_computer_name);
   60795             :         } else {
   60796           0 :                 py_computer_name = PyUnicode_Decode(object->in.computer_name, strlen(object->in.computer_name), "utf-8", "ignore");
   60797             :         }
   60798           0 :         return py_computer_name;
   60799             : }
   60800             : 
   60801           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_computer_name(PyObject *py_obj, PyObject *value, void *closure)
   60802             : {
   60803           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   60804           0 :         if (value == NULL) {
   60805           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.computer_name");
   60806           0 :                 return -1;
   60807             :         }
   60808           0 :         object->in.computer_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.computer_name);
   60809           0 :         if (object->in.computer_name == NULL) {
   60810           0 :                 PyErr_NoMemory();
   60811           0 :                 return -1;
   60812             :         }
   60813             :         {
   60814             :                 const char *test_str;
   60815             :                 const char *talloc_str;
   60816           0 :                 PyObject *unicode = NULL;
   60817           0 :                 if (PyUnicode_Check(value)) {
   60818           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   60819           0 :                         if (unicode == NULL) {
   60820           0 :                                 PyErr_NoMemory();
   60821           0 :                                 return -1;
   60822             :                         }
   60823           0 :                         test_str = PyBytes_AS_STRING(unicode);
   60824           0 :                 } else if (PyBytes_Check(value)) {
   60825           0 :                         test_str = PyBytes_AS_STRING(value);
   60826             :                 } else {
   60827           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   60828           0 :                         return -1;
   60829             :                 }
   60830           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   60831           0 :                 if (unicode != NULL) {
   60832           0 :                         Py_DECREF(unicode);
   60833             :                 }
   60834           0 :                 if (talloc_str == NULL) {
   60835           0 :                         PyErr_NoMemory();
   60836           0 :                         return -1;
   60837             :                 }
   60838           0 :                 object->in.computer_name = talloc_str;
   60839             :         }
   60840           0 :         return 0;
   60841             : }
   60842             : 
   60843           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_credential(PyObject *obj, void *closure)
   60844             : {
   60845           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   60846             :         PyObject *py_credential;
   60847           0 :         if (object->in.credential == NULL) {
   60848           0 :                 Py_RETURN_NONE;
   60849             :         }
   60850           0 :         py_credential = pytalloc_reference_ex(&netr_Authenticator_Type, object->in.credential, object->in.credential);
   60851           0 :         return py_credential;
   60852             : }
   60853             : 
   60854           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_credential(PyObject *py_obj, PyObject *value, void *closure)
   60855             : {
   60856           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   60857           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.credential));
   60858           0 :         if (value == NULL) {
   60859           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.credential");
   60860           0 :                 return -1;
   60861             :         }
   60862           0 :         object->in.credential = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.credential);
   60863           0 :         if (object->in.credential == NULL) {
   60864           0 :                 PyErr_NoMemory();
   60865           0 :                 return -1;
   60866             :         }
   60867           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   60868           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   60869           0 :                 PyErr_NoMemory();
   60870           0 :                 return -1;
   60871             :         }
   60872           0 :         object->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   60873           0 :         return 0;
   60874             : }
   60875             : 
   60876           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_out_get_return_authenticator(PyObject *obj, void *closure)
   60877             : {
   60878           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   60879             :         PyObject *py_return_authenticator;
   60880           0 :         if (object->out.return_authenticator == NULL) {
   60881           0 :                 Py_RETURN_NONE;
   60882             :         }
   60883           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, object->out.return_authenticator, object->out.return_authenticator);
   60884           0 :         return py_return_authenticator;
   60885             : }
   60886             : 
   60887           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_out_set_return_authenticator(PyObject *py_obj, PyObject *value, void *closure)
   60888             : {
   60889           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   60890           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.return_authenticator));
   60891           0 :         if (value == NULL) {
   60892           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.return_authenticator");
   60893           0 :                 return -1;
   60894             :         }
   60895           0 :         object->out.return_authenticator = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.return_authenticator);
   60896           0 :         if (object->out.return_authenticator == NULL) {
   60897           0 :                 PyErr_NoMemory();
   60898           0 :                 return -1;
   60899             :         }
   60900           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, value, return -1;);
   60901           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   60902           0 :                 PyErr_NoMemory();
   60903           0 :                 return -1;
   60904             :         }
   60905           0 :         object->out.return_authenticator = (struct netr_Authenticator *)pytalloc_get_ptr(value);
   60906           0 :         return 0;
   60907             : }
   60908             : 
   60909           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_site_name(PyObject *obj, void *closure)
   60910             : {
   60911           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   60912             :         PyObject *py_site_name;
   60913           0 :         if (object->in.site_name == NULL) {
   60914           0 :                 Py_RETURN_NONE;
   60915             :         }
   60916           0 :         if (object->in.site_name == NULL) {
   60917           0 :                 py_site_name = Py_None;
   60918           0 :                 Py_INCREF(py_site_name);
   60919             :         } else {
   60920           0 :                 if (object->in.site_name == NULL) {
   60921           0 :                         py_site_name = Py_None;
   60922           0 :                         Py_INCREF(py_site_name);
   60923             :                 } else {
   60924           0 :                         py_site_name = PyUnicode_Decode(object->in.site_name, strlen(object->in.site_name), "utf-8", "ignore");
   60925             :                 }
   60926             :         }
   60927           0 :         return py_site_name;
   60928             : }
   60929             : 
   60930           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
   60931             : {
   60932           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   60933           0 :         if (value == NULL) {
   60934           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.site_name");
   60935           0 :                 return -1;
   60936             :         }
   60937           0 :         if (value == Py_None) {
   60938           0 :                 object->in.site_name = NULL;
   60939             :         } else {
   60940           0 :                 object->in.site_name = NULL;
   60941             :                 {
   60942             :                         const char *test_str;
   60943             :                         const char *talloc_str;
   60944           0 :                         PyObject *unicode = NULL;
   60945           0 :                         if (PyUnicode_Check(value)) {
   60946           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   60947           0 :                                 if (unicode == NULL) {
   60948           0 :                                         PyErr_NoMemory();
   60949           0 :                                         return -1;
   60950             :                                 }
   60951           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   60952           0 :                         } else if (PyBytes_Check(value)) {
   60953           0 :                                 test_str = PyBytes_AS_STRING(value);
   60954             :                         } else {
   60955           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   60956           0 :                                 return -1;
   60957             :                         }
   60958           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   60959           0 :                         if (unicode != NULL) {
   60960           0 :                                 Py_DECREF(unicode);
   60961             :                         }
   60962           0 :                         if (talloc_str == NULL) {
   60963           0 :                                 PyErr_NoMemory();
   60964           0 :                                 return -1;
   60965             :                         }
   60966           0 :                         object->in.site_name = talloc_str;
   60967             :                 }
   60968             :         }
   60969           0 :         return 0;
   60970             : }
   60971             : 
   60972           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_dns_ttl(PyObject *obj, void *closure)
   60973             : {
   60974           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   60975             :         PyObject *py_dns_ttl;
   60976           0 :         py_dns_ttl = PyLong_FromUnsignedLongLong((uint32_t)object->in.dns_ttl);
   60977           0 :         return py_dns_ttl;
   60978             : }
   60979             : 
   60980           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_dns_ttl(PyObject *py_obj, PyObject *value, void *closure)
   60981             : {
   60982           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   60983           0 :         if (value == NULL) {
   60984           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dns_ttl");
   60985           0 :                 return -1;
   60986             :         }
   60987             :         {
   60988           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dns_ttl));
   60989           0 :                 if (PyLong_Check(value)) {
   60990             :                         unsigned long long test_var;
   60991           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   60992           0 :                         if (PyErr_Occurred() != NULL) {
   60993           0 :                                 return -1;
   60994             :                         }
   60995           0 :                         if (test_var > uint_max) {
   60996           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   60997             :                                   PyLong_Type.tp_name, uint_max, test_var);
   60998           0 :                                 return -1;
   60999             :                         }
   61000           0 :                         object->in.dns_ttl = test_var;
   61001             :                 } else {
   61002           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   61003             :                           PyLong_Type.tp_name);
   61004           0 :                         return -1;
   61005             :                 }
   61006             :         }
   61007           0 :         return 0;
   61008             : }
   61009             : 
   61010           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_dns_names(PyObject *obj, void *closure)
   61011             : {
   61012           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   61013             :         PyObject *py_dns_names;
   61014           0 :         if (object->in.dns_names == NULL) {
   61015           0 :                 Py_RETURN_NONE;
   61016             :         }
   61017           0 :         py_dns_names = pytalloc_reference_ex(&NL_DNS_NAME_INFO_ARRAY_Type, object->in.dns_names, object->in.dns_names);
   61018           0 :         return py_dns_names;
   61019             : }
   61020             : 
   61021           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_dns_names(PyObject *py_obj, PyObject *value, void *closure)
   61022             : {
   61023           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   61024           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.dns_names));
   61025           0 :         if (value == NULL) {
   61026           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dns_names");
   61027           0 :                 return -1;
   61028             :         }
   61029           0 :         object->in.dns_names = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.dns_names);
   61030           0 :         if (object->in.dns_names == NULL) {
   61031           0 :                 PyErr_NoMemory();
   61032           0 :                 return -1;
   61033             :         }
   61034           0 :         PY_CHECK_TYPE(&NL_DNS_NAME_INFO_ARRAY_Type, value, return -1;);
   61035           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   61036           0 :                 PyErr_NoMemory();
   61037           0 :                 return -1;
   61038             :         }
   61039           0 :         object->in.dns_names = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(value);
   61040           0 :         return 0;
   61041             : }
   61042             : 
   61043           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_out_get_dns_names(PyObject *obj, void *closure)
   61044             : {
   61045           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   61046             :         PyObject *py_dns_names;
   61047           0 :         if (object->out.dns_names == NULL) {
   61048           0 :                 Py_RETURN_NONE;
   61049             :         }
   61050           0 :         py_dns_names = pytalloc_reference_ex(&NL_DNS_NAME_INFO_ARRAY_Type, object->out.dns_names, object->out.dns_names);
   61051           0 :         return py_dns_names;
   61052             : }
   61053             : 
   61054           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_out_set_dns_names(PyObject *py_obj, PyObject *value, void *closure)
   61055             : {
   61056           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   61057           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.dns_names));
   61058           0 :         if (value == NULL) {
   61059           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.dns_names");
   61060           0 :                 return -1;
   61061             :         }
   61062           0 :         object->out.dns_names = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.dns_names);
   61063           0 :         if (object->out.dns_names == NULL) {
   61064           0 :                 PyErr_NoMemory();
   61065           0 :                 return -1;
   61066             :         }
   61067           0 :         PY_CHECK_TYPE(&NL_DNS_NAME_INFO_ARRAY_Type, value, return -1;);
   61068           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   61069           0 :                 PyErr_NoMemory();
   61070           0 :                 return -1;
   61071             :         }
   61072           0 :         object->out.dns_names = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(value);
   61073           0 :         return 0;
   61074             : }
   61075             : 
   61076           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_get_result(PyObject *obj, void *closure)
   61077             : {
   61078           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(obj);
   61079             :         PyObject *py_result;
   61080           0 :         py_result = PyErr_FromNTSTATUS(object->out.result);
   61081           0 :         return py_result;
   61082             : }
   61083             : 
   61084           0 : static int py_netr_DsrUpdateReadOnlyServerDnsRecords_set_result(PyObject *py_obj, PyObject *value, void *closure)
   61085             : {
   61086           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   61087           0 :         if (value == NULL) {
   61088           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   61089           0 :                 return -1;
   61090             :         }
   61091           0 :         object->out.result = NT_STATUS(PyLong_AsLong(value));
   61092           0 :         return 0;
   61093             : }
   61094             : 
   61095             : static PyGetSetDef py_netr_DsrUpdateReadOnlyServerDnsRecords_getsetters[] = {
   61096             :         {
   61097             :                 .name = discard_const_p(char, "in_server_name"),
   61098             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_server_name,
   61099             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_server_name,
   61100             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   61101             :         },
   61102             :         {
   61103             :                 .name = discard_const_p(char, "in_computer_name"),
   61104             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_computer_name,
   61105             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_computer_name,
   61106             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   61107             :         },
   61108             :         {
   61109             :                 .name = discard_const_p(char, "in_credential"),
   61110             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_credential,
   61111             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_credential,
   61112             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   61113             :         },
   61114             :         {
   61115             :                 .name = discard_const_p(char, "out_return_authenticator"),
   61116             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_out_get_return_authenticator,
   61117             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_out_set_return_authenticator,
   61118             :                 .doc = discard_const_p(char, "PIDL-generated element of base type netr_Authenticator")
   61119             :         },
   61120             :         {
   61121             :                 .name = discard_const_p(char, "in_site_name"),
   61122             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_site_name,
   61123             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_site_name,
   61124             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   61125             :         },
   61126             :         {
   61127             :                 .name = discard_const_p(char, "in_dns_ttl"),
   61128             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_dns_ttl,
   61129             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_dns_ttl,
   61130             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   61131             :         },
   61132             :         {
   61133             :                 .name = discard_const_p(char, "in_dns_names"),
   61134             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_get_dns_names,
   61135             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_in_set_dns_names,
   61136             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NL_DNS_NAME_INFO_ARRAY")
   61137             :         },
   61138             :         {
   61139             :                 .name = discard_const_p(char, "out_dns_names"),
   61140             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_out_get_dns_names,
   61141             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_out_set_dns_names,
   61142             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NL_DNS_NAME_INFO_ARRAY")
   61143             :         },
   61144             :         {
   61145             :                 .name = discard_const_p(char, "result"),
   61146             :                 .get = py_netr_DsrUpdateReadOnlyServerDnsRecords_get_result,
   61147             :                 .set = py_netr_DsrUpdateReadOnlyServerDnsRecords_set_result,
   61148             :                 .doc = discard_const_p(char, "PIDL-generated element of type NTSTATUS")
   61149             :         },
   61150             :         { .name = NULL }
   61151             : };
   61152             : 
   61153           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   61154             : {
   61155           0 :         PyObject *self = pytalloc_new(struct netr_DsrUpdateReadOnlyServerDnsRecords, type);
   61156           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *_self = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(self);
   61157           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   61158           0 :         _self->in.credential = talloc_zero(mem_ctx, struct netr_Authenticator);
   61159           0 :         _self->out.return_authenticator = talloc_zero(mem_ctx, struct netr_Authenticator);
   61160           0 :         _self->in.dns_names = talloc_zero(mem_ctx, struct NL_DNS_NAME_INFO_ARRAY);
   61161           0 :         _self->out.dns_names = talloc_zero(mem_ctx, struct NL_DNS_NAME_INFO_ARRAY);
   61162           0 :         return self;
   61163             : }
   61164             : 
   61165           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   61166             : {
   61167             : 
   61168             : 
   61169           0 :         return PyLong_FromLong(48);
   61170             : }
   61171             : 
   61172           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
   61173             : {
   61174           0 :         const struct ndr_interface_call *call = NULL;
   61175           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   61176           0 :         PyObject *ret = NULL;
   61177           0 :         struct ndr_push *push = NULL;
   61178             :         DATA_BLOB blob;
   61179             :         enum ndr_err_code err;
   61180             : 
   61181           0 :         if (ndr_table_netlogon.num_calls < 49) {
   61182           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack");
   61183           0 :                 return NULL;
   61184             :         }
   61185           0 :         call = &ndr_table_netlogon.calls[48];
   61186             : 
   61187           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   61188           0 :         if (push == NULL) {
   61189           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   61190           0 :                 return NULL;
   61191             :         }
   61192             : 
   61193           0 :         push->flags |= ndr_push_flags;
   61194             : 
   61195           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   61196           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   61197           0 :                 TALLOC_FREE(push);
   61198           0 :                 PyErr_SetNdrError(err);
   61199           0 :                 return NULL;
   61200             :         }
   61201           0 :         blob = ndr_push_blob(push);
   61202           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   61203           0 :         TALLOC_FREE(push);
   61204           0 :         return ret;
   61205             : }
   61206             : 
   61207           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   61208             : {
   61209           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   61210           0 :         PyObject *bigendian_obj = NULL;
   61211           0 :         PyObject *ndr64_obj = NULL;
   61212           0 :         uint32_t ndr_push_flags = 0;
   61213             : 
   61214           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   61215             :                 discard_const_p(char *, kwnames),
   61216             :                 &bigendian_obj,
   61217             :                 &ndr64_obj)) {
   61218           0 :                 return NULL;
   61219             :         }
   61220             : 
   61221           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   61222           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   61223             :         }
   61224           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   61225           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   61226             :         }
   61227             : 
   61228           0 :         return py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   61229             : }
   61230             : 
   61231           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   61232             : {
   61233           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   61234           0 :         PyObject *bigendian_obj = NULL;
   61235           0 :         PyObject *ndr64_obj = NULL;
   61236           0 :         uint32_t ndr_push_flags = 0;
   61237             : 
   61238           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   61239             :                 discard_const_p(char *, kwnames),
   61240             :                 &bigendian_obj,
   61241             :                 &ndr64_obj)) {
   61242           0 :                 return NULL;
   61243             :         }
   61244             : 
   61245           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   61246           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   61247             :         }
   61248           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   61249           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   61250             :         }
   61251             : 
   61252           0 :         return py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   61253             : }
   61254             : 
   61255           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
   61256             : {
   61257           0 :         const struct ndr_interface_call *call = NULL;
   61258           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   61259           0 :         struct ndr_pull *pull = NULL;
   61260             :         enum ndr_err_code err;
   61261             : 
   61262           0 :         if (ndr_table_netlogon.num_calls < 49) {
   61263           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack");
   61264           0 :                 return NULL;
   61265             :         }
   61266           0 :         call = &ndr_table_netlogon.calls[48];
   61267             : 
   61268           0 :         pull = ndr_pull_init_blob(blob, object);
   61269           0 :         if (pull == NULL) {
   61270           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   61271           0 :                 return NULL;
   61272             :         }
   61273             : 
   61274           0 :         pull->flags |= ndr_pull_flags;
   61275             : 
   61276           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   61277           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   61278           0 :                 TALLOC_FREE(pull);
   61279           0 :                 PyErr_SetNdrError(err);
   61280           0 :                 return NULL;
   61281             :         }
   61282           0 :         if (!allow_remaining) {
   61283             :                 uint32_t highest_ofs;
   61284             : 
   61285           0 :                 if (pull->offset > pull->relative_highest_offset) {
   61286           0 :                         highest_ofs = pull->offset;
   61287             :                 } else {
   61288           0 :                         highest_ofs = pull->relative_highest_offset;
   61289             :                 }
   61290           0 :                 if (highest_ofs < pull->data_size) {
   61291           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   61292             :                                 "not all bytes consumed ofs[%u] size[%u]",
   61293             :                                 highest_ofs, pull->data_size);
   61294           0 :                         TALLOC_FREE(pull);
   61295           0 :                         PyErr_SetNdrError(err);
   61296           0 :                         return NULL;
   61297             :                 }
   61298             :         }
   61299             : 
   61300           0 :         TALLOC_FREE(pull);
   61301           0 :         Py_RETURN_NONE;
   61302             : }
   61303             : 
   61304           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   61305             : {
   61306             :         DATA_BLOB blob;
   61307           0 :         Py_ssize_t blob_length = 0;
   61308           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   61309           0 :         PyObject *bigendian_obj = NULL;
   61310           0 :         PyObject *ndr64_obj = NULL;
   61311           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   61312           0 :         PyObject *allow_remaining_obj = NULL;
   61313           0 :         bool allow_remaining = false;
   61314             : 
   61315           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   61316             :                 discard_const_p(char *, kwnames),
   61317             :                 &blob.data, &blob_length,
   61318             :                 &bigendian_obj,
   61319             :                 &ndr64_obj,
   61320             :                 &allow_remaining_obj)) {
   61321           0 :                 return NULL;
   61322             :         }
   61323           0 :         blob.length = blob_length;
   61324             : 
   61325           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   61326           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   61327             :         }
   61328           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   61329           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   61330             :         }
   61331             : 
   61332           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   61333           0 :                 allow_remaining = true;
   61334             :         }
   61335             : 
   61336           0 :         return py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   61337             : }
   61338             : 
   61339           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   61340             : {
   61341             :         DATA_BLOB blob;
   61342           0 :         Py_ssize_t blob_length = 0;
   61343           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   61344           0 :         PyObject *bigendian_obj = NULL;
   61345           0 :         PyObject *ndr64_obj = NULL;
   61346           0 :         uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   61347           0 :         PyObject *allow_remaining_obj = NULL;
   61348           0 :         bool allow_remaining = false;
   61349             : 
   61350           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   61351             :                 discard_const_p(char *, kwnames),
   61352             :                 &blob.data, &blob_length,
   61353             :                 &bigendian_obj,
   61354             :                 &ndr64_obj,
   61355             :                 &allow_remaining_obj)) {
   61356           0 :                 return NULL;
   61357             :         }
   61358           0 :         blob.length = blob_length;
   61359             : 
   61360           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   61361           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   61362             :         }
   61363           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   61364           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   61365             :         }
   61366             : 
   61367           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   61368           0 :                 allow_remaining = true;
   61369             :         }
   61370             : 
   61371           0 :         return py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   61372             : }
   61373             : 
   61374           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
   61375             : {
   61376           0 :         const struct ndr_interface_call *call = NULL;
   61377           0 :         struct netr_DsrUpdateReadOnlyServerDnsRecords *object = (struct netr_DsrUpdateReadOnlyServerDnsRecords *)pytalloc_get_ptr(py_obj);
   61378             :         PyObject *ret;
   61379             :         char *retstr;
   61380             : 
   61381           0 :         if (ndr_table_netlogon.num_calls < 49) {
   61382           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print");
   61383           0 :                 return NULL;
   61384             :         }
   61385           0 :         call = &ndr_table_netlogon.calls[48];
   61386             : 
   61387           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   61388           0 :         ret = PyUnicode_FromString(retstr);
   61389           0 :         TALLOC_FREE(retstr);
   61390             : 
   61391           0 :         return ret;
   61392             : }
   61393             : 
   61394           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   61395             : {
   61396           0 :         return py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print(py_obj, "netr_DsrUpdateReadOnlyServerDnsRecords_in", NDR_IN);
   61397             : }
   61398             : 
   61399           0 : static PyObject *py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   61400             : {
   61401           0 :         return py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print(py_obj, "netr_DsrUpdateReadOnlyServerDnsRecords_out", NDR_OUT);
   61402             : }
   61403             : 
   61404             : static PyMethodDef py_netr_DsrUpdateReadOnlyServerDnsRecords_methods[] = {
   61405             :         { "opnum", (PyCFunction)py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_opnum, METH_NOARGS|METH_CLASS,
   61406             :                 "netlogon.netr_DsrUpdateReadOnlyServerDnsRecords.opnum() -> 48 (0x30) " },
   61407             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   61408             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   61409             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   61410             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   61411             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   61412             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   61413             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   61414             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   61415             :         { "__ndr_print_in__", (PyCFunction)py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   61416             :         { "__ndr_print_out__", (PyCFunction)py_netr_DsrUpdateReadOnlyServerDnsRecords_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   61417             :         { NULL, NULL, 0, NULL }
   61418             : };
   61419             : 
   61420             : 
   61421             : static PyTypeObject netr_DsrUpdateReadOnlyServerDnsRecords_Type = {
   61422             :         PyVarObject_HEAD_INIT(NULL, 0)
   61423             :         .tp_name = "netlogon.netr_DsrUpdateReadOnlyServerDnsRecords",
   61424             :         .tp_getset = py_netr_DsrUpdateReadOnlyServerDnsRecords_getsetters,
   61425             :         .tp_methods = py_netr_DsrUpdateReadOnlyServerDnsRecords_methods,
   61426             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   61427             :         .tp_new = py_netr_DsrUpdateReadOnlyServerDnsRecords_new,
   61428             : };
   61429             : 
   61430           0 : static bool pack_py_netr_DsrUpdateReadOnlyServerDnsRecords_args_in(PyObject *args, PyObject *kwargs, struct netr_DsrUpdateReadOnlyServerDnsRecords *r)
   61431             : {
   61432             :         PyObject *py_server_name;
   61433             :         PyObject *py_computer_name;
   61434             :         PyObject *py_credential;
   61435             :         PyObject *py_site_name;
   61436             :         PyObject *py_dns_ttl;
   61437             :         PyObject *py_dns_names;
   61438           0 :         const char *kwnames[] = {
   61439             :                 "server_name", "computer_name", "credential", "site_name", "dns_ttl", "dns_names", NULL
   61440             :         };
   61441             : 
   61442           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)) {
   61443           0 :                 return false;
   61444             :         }
   61445             : 
   61446           0 :         if (py_server_name == NULL) {
   61447           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.server_name");
   61448           0 :                 return false;
   61449             :         }
   61450           0 :         if (py_server_name == Py_None) {
   61451           0 :                 r->in.server_name = NULL;
   61452             :         } else {
   61453           0 :                 r->in.server_name = NULL;
   61454             :                 {
   61455             :                         const char *test_str;
   61456             :                         const char *talloc_str;
   61457           0 :                         PyObject *unicode = NULL;
   61458           0 :                         if (PyUnicode_Check(py_server_name)) {
   61459           0 :                                 unicode = PyUnicode_AsEncodedString(py_server_name, "utf-8", "ignore");
   61460           0 :                                 if (unicode == NULL) {
   61461           0 :                                         PyErr_NoMemory();
   61462           0 :                                         return false;
   61463             :                                 }
   61464           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   61465           0 :                         } else if (PyBytes_Check(py_server_name)) {
   61466           0 :                                 test_str = PyBytes_AS_STRING(py_server_name);
   61467             :                         } else {
   61468           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_server_name)->tp_name);
   61469           0 :                                 return false;
   61470             :                         }
   61471           0 :                         talloc_str = talloc_strdup(r, test_str);
   61472           0 :                         if (unicode != NULL) {
   61473           0 :                                 Py_DECREF(unicode);
   61474             :                         }
   61475           0 :                         if (talloc_str == NULL) {
   61476           0 :                                 PyErr_NoMemory();
   61477           0 :                                 return false;
   61478             :                         }
   61479           0 :                         r->in.server_name = talloc_str;
   61480             :                 }
   61481             :         }
   61482           0 :         if (py_computer_name == NULL) {
   61483           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.computer_name");
   61484           0 :                 return false;
   61485             :         }
   61486           0 :         r->in.computer_name = talloc_ptrtype(r, r->in.computer_name);
   61487           0 :         if (r->in.computer_name == NULL) {
   61488           0 :                 PyErr_NoMemory();
   61489           0 :                 return false;
   61490             :         }
   61491             :         {
   61492             :                 const char *test_str;
   61493             :                 const char *talloc_str;
   61494           0 :                 PyObject *unicode = NULL;
   61495           0 :                 if (PyUnicode_Check(py_computer_name)) {
   61496           0 :                         unicode = PyUnicode_AsEncodedString(py_computer_name, "utf-8", "ignore");
   61497           0 :                         if (unicode == NULL) {
   61498           0 :                                 PyErr_NoMemory();
   61499           0 :                                 return false;
   61500             :                         }
   61501           0 :                         test_str = PyBytes_AS_STRING(unicode);
   61502           0 :                 } else if (PyBytes_Check(py_computer_name)) {
   61503           0 :                         test_str = PyBytes_AS_STRING(py_computer_name);
   61504             :                 } else {
   61505           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_computer_name)->tp_name);
   61506           0 :                         return false;
   61507             :                 }
   61508           0 :                 talloc_str = talloc_strdup(r, test_str);
   61509           0 :                 if (unicode != NULL) {
   61510           0 :                         Py_DECREF(unicode);
   61511             :                 }
   61512           0 :                 if (talloc_str == NULL) {
   61513           0 :                         PyErr_NoMemory();
   61514           0 :                         return false;
   61515             :                 }
   61516           0 :                 r->in.computer_name = talloc_str;
   61517             :         }
   61518           0 :         if (py_credential == NULL) {
   61519           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.credential");
   61520           0 :                 return false;
   61521             :         }
   61522           0 :         r->in.credential = talloc_ptrtype(r, r->in.credential);
   61523           0 :         if (r->in.credential == NULL) {
   61524           0 :                 PyErr_NoMemory();
   61525           0 :                 return false;
   61526             :         }
   61527           0 :         PY_CHECK_TYPE(&netr_Authenticator_Type, py_credential, return false;);
   61528           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_credential)) == NULL) {
   61529           0 :                 PyErr_NoMemory();
   61530           0 :                 return false;
   61531             :         }
   61532           0 :         r->in.credential = (struct netr_Authenticator *)pytalloc_get_ptr(py_credential);
   61533           0 :         if (py_site_name == NULL) {
   61534           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.site_name");
   61535           0 :                 return false;
   61536             :         }
   61537           0 :         if (py_site_name == Py_None) {
   61538           0 :                 r->in.site_name = NULL;
   61539             :         } else {
   61540           0 :                 r->in.site_name = NULL;
   61541             :                 {
   61542             :                         const char *test_str;
   61543             :                         const char *talloc_str;
   61544           0 :                         PyObject *unicode = NULL;
   61545           0 :                         if (PyUnicode_Check(py_site_name)) {
   61546           0 :                                 unicode = PyUnicode_AsEncodedString(py_site_name, "utf-8", "ignore");
   61547           0 :                                 if (unicode == NULL) {
   61548           0 :                                         PyErr_NoMemory();
   61549           0 :                                         return false;
   61550             :                                 }
   61551           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   61552           0 :                         } else if (PyBytes_Check(py_site_name)) {
   61553           0 :                                 test_str = PyBytes_AS_STRING(py_site_name);
   61554             :                         } else {
   61555           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_site_name)->tp_name);
   61556           0 :                                 return false;
   61557             :                         }
   61558           0 :                         talloc_str = talloc_strdup(r, test_str);
   61559           0 :                         if (unicode != NULL) {
   61560           0 :                                 Py_DECREF(unicode);
   61561             :                         }
   61562           0 :                         if (talloc_str == NULL) {
   61563           0 :                                 PyErr_NoMemory();
   61564           0 :                                 return false;
   61565             :                         }
   61566           0 :                         r->in.site_name = talloc_str;
   61567             :                 }
   61568             :         }
   61569           0 :         if (py_dns_ttl == NULL) {
   61570           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dns_ttl");
   61571           0 :                 return false;
   61572             :         }
   61573             :         {
   61574           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dns_ttl));
   61575           0 :                 if (PyLong_Check(py_dns_ttl)) {
   61576             :                         unsigned long long test_var;
   61577           0 :                         test_var = PyLong_AsUnsignedLongLong(py_dns_ttl);
   61578           0 :                         if (PyErr_Occurred() != NULL) {
   61579           0 :                                 return false;
   61580             :                         }
   61581           0 :                         if (test_var > uint_max) {
   61582           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",\
   61583             :                                   PyLong_Type.tp_name, uint_max, test_var);
   61584           0 :                                 return false;
   61585             :                         }
   61586           0 :                         r->in.dns_ttl = test_var;
   61587             :                 } else {
   61588           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",\
   61589             :                           PyLong_Type.tp_name);
   61590           0 :                         return false;
   61591             :                 }
   61592             :         }
   61593           0 :         if (py_dns_names == NULL) {
   61594           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dns_names");
   61595           0 :                 return false;
   61596             :         }
   61597           0 :         r->in.dns_names = talloc_ptrtype(r, r->in.dns_names);
   61598           0 :         if (r->in.dns_names == NULL) {
   61599           0 :                 PyErr_NoMemory();
   61600           0 :                 return false;
   61601             :         }
   61602           0 :         PY_CHECK_TYPE(&NL_DNS_NAME_INFO_ARRAY_Type, py_dns_names, return false;);
   61603           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_dns_names)) == NULL) {
   61604           0 :                 PyErr_NoMemory();
   61605           0 :                 return false;
   61606             :         }
   61607           0 :         r->in.dns_names = (struct NL_DNS_NAME_INFO_ARRAY *)pytalloc_get_ptr(py_dns_names);
   61608           0 :         return true;
   61609             : }
   61610             : 
   61611           0 : static PyObject *unpack_py_netr_DsrUpdateReadOnlyServerDnsRecords_args_out(struct netr_DsrUpdateReadOnlyServerDnsRecords *r)
   61612             : {
   61613             :         PyObject *result;
   61614             :         PyObject *py_return_authenticator;
   61615             :         PyObject *py_dns_names;
   61616           0 :         result = PyTuple_New(2);
   61617           0 :         py_return_authenticator = pytalloc_reference_ex(&netr_Authenticator_Type, r->out.return_authenticator, r->out.return_authenticator);
   61618           0 :         PyTuple_SetItem(result, 0, py_return_authenticator);
   61619           0 :         py_dns_names = pytalloc_reference_ex(&NL_DNS_NAME_INFO_ARRAY_Type, r->out.dns_names, r->out.dns_names);
   61620           0 :         PyTuple_SetItem(result, 1, py_dns_names);
   61621           0 :         if (NT_STATUS_IS_ERR(r->out.result)) {
   61622           0 :                 PyErr_SetNTSTATUS(r->out.result);
   61623           0 :                 return NULL;
   61624             :         }
   61625             : 
   61626           0 :         return result;
   61627             : }
   61628             : 
   61629             : const struct PyNdrRpcMethodDef py_ndr_netlogon_methods[] = {
   61630             :         { "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 },
   61631             :         { "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 },
   61632             :         { "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 },
   61633             :         { "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 },
   61634             :         { "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 },
   61635             :         { "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 },
   61636             :         { "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 },
   61637             :         { "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 },
   61638             :         { "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 },
   61639             :         { "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 },
   61640             :         { "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 },
   61641             :         { "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 },
   61642             :         { "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 },
   61643             :         { "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 },
   61644             :         { "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 },
   61645             :         { "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 },
   61646             :         { "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 },
   61647             :         { "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 },
   61648             :         { "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 },
   61649             :         { "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 },
   61650             :         { "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 },
   61651             :         { "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 },
   61652             :         { "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 },
   61653             :         { "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 },
   61654             :         { "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 },
   61655             :         { "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 },
   61656             :         { "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 },
   61657             :         { "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 },
   61658             :         { "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 },
   61659             :         { "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 },
   61660             :         { "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 },
   61661             :         { "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 },
   61662             :         { "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 },
   61663             :         { "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 },
   61664             :         { "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 },
   61665             :         { "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 },
   61666             :         { "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 },
   61667             :         { "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 },
   61668             :         { "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 },
   61669             :         { "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 },
   61670             :         { "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 },
   61671             :         { "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 },
   61672             :         { "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 },
   61673             :         { "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 },
   61674             :         { "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 },
   61675             :         {0}
   61676             : };
   61677             : 
   61678         266 : static PyObject *interface_netlogon_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   61679             : {
   61680         266 :         return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_netlogon);
   61681             : }
   61682             : 
   61683             : static PyTypeObject netlogon_InterfaceType = {
   61684             :         PyVarObject_HEAD_INIT(NULL, 0)
   61685             :         .tp_name = "netlogon.netlogon",
   61686             :         .tp_basicsize = sizeof(dcerpc_InterfaceObject),
   61687             :         .tp_doc = "netlogon(binding, lp_ctx=None, credentials=None) -> connection\n"
   61688             : "\n"
   61689             : "binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
   61690             : "lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
   61691             : "credentials should be a credentials.Credentials object.\n\n",
   61692             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   61693             :         .tp_new = interface_netlogon_new,
   61694             : };
   61695             : 
   61696          48 : static PyObject *syntax_netlogon_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   61697             : {
   61698          48 :         return py_dcerpc_syntax_init_helper(type, args, kwargs, &ndr_table_netlogon.syntax_id);
   61699             : }
   61700             : 
   61701             : static PyTypeObject netlogon_SyntaxType = {
   61702             :         PyVarObject_HEAD_INIT(NULL, 0)
   61703             :         .tp_name = "netlogon.netlogon_abstract_syntax",
   61704             :         .tp_doc = "netlogon_abstract_syntax()\n",
   61705             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   61706             :         .tp_new = syntax_netlogon_new,
   61707             : };
   61708             : 
   61709             : static PyMethodDef netlogon_methods[] = {
   61710             :         { NULL, NULL, 0, NULL }
   61711             : };
   61712             : 
   61713             : static struct PyModuleDef moduledef = {
   61714             :         PyModuleDef_HEAD_INIT,
   61715             :         .m_name = "netlogon",
   61716             :         .m_doc = "netlogon DCE/RPC",
   61717             :         .m_size = -1,
   61718             :         .m_methods = netlogon_methods,
   61719             : };
   61720        3559 : MODULE_INIT_FUNC(netlogon)
   61721             : {
   61722        3559 :         PyObject *m = NULL;
   61723        3559 :         PyObject *dep_samba_dcerpc_misc = NULL;
   61724        3559 :         PyObject *dep_samba_dcerpc_lsa = NULL;
   61725        3559 :         PyObject *dep_samba_dcerpc_samr = NULL;
   61726        3559 :         PyObject *dep_samba_dcerpc_security = NULL;
   61727        3559 :         PyObject *dep_talloc = NULL;
   61728        3559 :         PyObject *dep_samba_dcerpc_base = NULL;
   61729             : 
   61730        3559 :         dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
   61731        3559 :         if (dep_samba_dcerpc_misc == NULL)
   61732           0 :                 goto out;
   61733             : 
   61734        3559 :         dep_samba_dcerpc_lsa = PyImport_ImportModule("samba.dcerpc.lsa");
   61735        3559 :         if (dep_samba_dcerpc_lsa == NULL)
   61736           0 :                 goto out;
   61737             : 
   61738        3559 :         dep_samba_dcerpc_samr = PyImport_ImportModule("samba.dcerpc.samr");
   61739        3559 :         if (dep_samba_dcerpc_samr == NULL)
   61740           0 :                 goto out;
   61741             : 
   61742        3559 :         dep_samba_dcerpc_security = PyImport_ImportModule("samba.dcerpc.security");
   61743        3559 :         if (dep_samba_dcerpc_security == NULL)
   61744           0 :                 goto out;
   61745             : 
   61746        3559 :         dep_talloc = PyImport_ImportModule("talloc");
   61747        3559 :         if (dep_talloc == NULL)
   61748           0 :                 goto out;
   61749             : 
   61750        3559 :         dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
   61751        3559 :         if (dep_samba_dcerpc_base == NULL)
   61752           0 :                 goto out;
   61753             : 
   61754        3559 :         BaseObject_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "BaseObject");
   61755        3559 :         if (BaseObject_Type == NULL)
   61756           0 :                 goto out;
   61757             : 
   61758        3559 :         lsa_String_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "String");
   61759        3559 :         if (lsa_String_Type == NULL)
   61760           0 :                 goto out;
   61761             : 
   61762        3559 :         samr_Password_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_samr, "Password");
   61763        3559 :         if (samr_Password_Type == NULL)
   61764           0 :                 goto out;
   61765             : 
   61766        3559 :         samr_RidWithAttributeArray_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_samr, "RidWithAttributeArray");
   61767        3559 :         if (samr_RidWithAttributeArray_Type == NULL)
   61768           0 :                 goto out;
   61769             : 
   61770        3559 :         lsa_StringLarge_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "StringLarge");
   61771        3559 :         if (lsa_StringLarge_Type == NULL)
   61772           0 :                 goto out;
   61773             : 
   61774        3559 :         dom_sid_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_security, "dom_sid");
   61775        3559 :         if (dom_sid_Type == NULL)
   61776           0 :                 goto out;
   61777             : 
   61778        3559 :         samr_LogonHours_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_samr, "LogonHours");
   61779        3559 :         if (samr_LogonHours_Type == NULL)
   61780           0 :                 goto out;
   61781             : 
   61782        3559 :         lsa_BinaryString_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "BinaryString");
   61783        3559 :         if (lsa_BinaryString_Type == NULL)
   61784           0 :                 goto out;
   61785             : 
   61786        3559 :         sec_desc_buf_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_security, "sec_desc_buf");
   61787        3559 :         if (sec_desc_buf_Type == NULL)
   61788           0 :                 goto out;
   61789             : 
   61790        3559 :         lsa_SidArray_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "SidArray");
   61791        3559 :         if (lsa_SidArray_Type == NULL)
   61792           0 :                 goto out;
   61793             : 
   61794        3559 :         GUID_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "GUID");
   61795        3559 :         if (GUID_Type == NULL)
   61796           0 :                 goto out;
   61797             : 
   61798        3559 :         lsa_ForestTrustInformation_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "ForestTrustInformation");
   61799        3559 :         if (lsa_ForestTrustInformation_Type == NULL)
   61800           0 :                 goto out;
   61801             : 
   61802        3559 :         ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
   61803        3559 :         if (ClientConnection_Type == NULL)
   61804           0 :                 goto out;
   61805             : 
   61806        3559 :         ndr_syntax_id_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "ndr_syntax_id");
   61807        3559 :         if (ndr_syntax_id_Type == NULL)
   61808           0 :                 goto out;
   61809             : 
   61810        3559 :         netr_UasInfo_Type.tp_base = BaseObject_Type;
   61811        3559 :         netr_UasInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   61812             : 
   61813        3559 :         netr_UasLogoffInfo_Type.tp_base = BaseObject_Type;
   61814        3559 :         netr_UasLogoffInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   61815             : 
   61816        3559 :         netr_AcctLockStr_Type.tp_base = BaseObject_Type;
   61817        3559 :         netr_AcctLockStr_Type.tp_basicsize = pytalloc_BaseObject_size();
   61818             : 
   61819        3559 :         netr_IdentityInfo_Type.tp_base = BaseObject_Type;
   61820        3559 :         netr_IdentityInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   61821             : 
   61822        3559 :         netr_PasswordInfo_Type.tp_base = BaseObject_Type;
   61823        3559 :         netr_PasswordInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   61824             : 
   61825        3559 :         netr_ChallengeResponse_Type.tp_base = BaseObject_Type;
   61826        3559 :         netr_ChallengeResponse_Type.tp_basicsize = pytalloc_BaseObject_size();
   61827             : 
   61828        3559 :         netr_NetworkInfo_Type.tp_base = BaseObject_Type;
   61829        3559 :         netr_NetworkInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   61830             : 
   61831        3559 :         netr_GenericInfo_Type.tp_base = BaseObject_Type;
   61832        3559 :         netr_GenericInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   61833             : 
   61834        3559 :         netr_LogonLevel_Type.tp_base = BaseObject_Type;
   61835        3559 :         netr_LogonLevel_Type.tp_basicsize = pytalloc_BaseObject_size();
   61836             : 
   61837        3559 :         netr_UserSessionKey_Type.tp_base = BaseObject_Type;
   61838        3559 :         netr_UserSessionKey_Type.tp_basicsize = pytalloc_BaseObject_size();
   61839             : 
   61840        3559 :         netr_LMSessionKey_Type.tp_base = BaseObject_Type;
   61841        3559 :         netr_LMSessionKey_Type.tp_basicsize = pytalloc_BaseObject_size();
   61842             : 
   61843        3559 :         netr_SamBaseInfo_Type.tp_base = BaseObject_Type;
   61844        3559 :         netr_SamBaseInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   61845             : 
   61846        3559 :         netr_SamInfo2_Type.tp_base = BaseObject_Type;
   61847        3559 :         netr_SamInfo2_Type.tp_basicsize = pytalloc_BaseObject_size();
   61848             : 
   61849        3559 :         netr_SidAttr_Type.tp_base = BaseObject_Type;
   61850        3559 :         netr_SidAttr_Type.tp_basicsize = pytalloc_BaseObject_size();
   61851             : 
   61852        3559 :         netr_SamInfo3_Type.tp_base = BaseObject_Type;
   61853        3559 :         netr_SamInfo3_Type.tp_basicsize = pytalloc_BaseObject_size();
   61854             : 
   61855        3559 :         netr_SamInfo6_Type.tp_base = BaseObject_Type;
   61856        3559 :         netr_SamInfo6_Type.tp_basicsize = pytalloc_BaseObject_size();
   61857             : 
   61858        3559 :         netr_PacInfo_Type.tp_base = BaseObject_Type;
   61859        3559 :         netr_PacInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   61860             : 
   61861        3559 :         netr_GenericInfo2_Type.tp_base = BaseObject_Type;
   61862        3559 :         netr_GenericInfo2_Type.tp_basicsize = pytalloc_BaseObject_size();
   61863             : 
   61864        3559 :         netr_Validation_Type.tp_base = BaseObject_Type;
   61865        3559 :         netr_Validation_Type.tp_basicsize = pytalloc_BaseObject_size();
   61866             : 
   61867        3559 :         netr_Credential_Type.tp_base = BaseObject_Type;
   61868        3559 :         netr_Credential_Type.tp_basicsize = pytalloc_BaseObject_size();
   61869             : 
   61870        3559 :         netr_Authenticator_Type.tp_base = BaseObject_Type;
   61871        3559 :         netr_Authenticator_Type.tp_basicsize = pytalloc_BaseObject_size();
   61872             : 
   61873        3559 :         netr_DELTA_DELETE_USER_Type.tp_base = BaseObject_Type;
   61874        3559 :         netr_DELTA_DELETE_USER_Type.tp_basicsize = pytalloc_BaseObject_size();
   61875             : 
   61876        3559 :         netr_USER_KEY16_Type.tp_base = BaseObject_Type;
   61877        3559 :         netr_USER_KEY16_Type.tp_basicsize = pytalloc_BaseObject_size();
   61878             : 
   61879        3559 :         netr_PasswordHistory_Type.tp_base = BaseObject_Type;
   61880        3559 :         netr_PasswordHistory_Type.tp_basicsize = pytalloc_BaseObject_size();
   61881             : 
   61882        3559 :         netr_USER_KEYS2_Type.tp_base = BaseObject_Type;
   61883        3559 :         netr_USER_KEYS2_Type.tp_basicsize = pytalloc_BaseObject_size();
   61884             : 
   61885        3559 :         netr_USER_KEY_UNION_Type.tp_base = BaseObject_Type;
   61886        3559 :         netr_USER_KEY_UNION_Type.tp_basicsize = pytalloc_BaseObject_size();
   61887             : 
   61888        3559 :         netr_USER_KEYS_Type.tp_base = BaseObject_Type;
   61889        3559 :         netr_USER_KEYS_Type.tp_basicsize = pytalloc_BaseObject_size();
   61890             : 
   61891        3559 :         netr_USER_PRIVATE_INFO_Type.tp_base = BaseObject_Type;
   61892        3559 :         netr_USER_PRIVATE_INFO_Type.tp_basicsize = pytalloc_BaseObject_size();
   61893             : 
   61894        3559 :         netr_DELTA_USER_Type.tp_base = BaseObject_Type;
   61895        3559 :         netr_DELTA_USER_Type.tp_basicsize = pytalloc_BaseObject_size();
   61896             : 
   61897        3559 :         netr_DELTA_DOMAIN_Type.tp_base = BaseObject_Type;
   61898        3559 :         netr_DELTA_DOMAIN_Type.tp_basicsize = pytalloc_BaseObject_size();
   61899             : 
   61900        3559 :         netr_DELTA_GROUP_Type.tp_base = BaseObject_Type;
   61901        3559 :         netr_DELTA_GROUP_Type.tp_basicsize = pytalloc_BaseObject_size();
   61902             : 
   61903        3559 :         netr_DELTA_RENAME_Type.tp_base = BaseObject_Type;
   61904        3559 :         netr_DELTA_RENAME_Type.tp_basicsize = pytalloc_BaseObject_size();
   61905             : 
   61906        3559 :         netr_DELTA_GROUP_MEMBER_Type.tp_base = BaseObject_Type;
   61907        3559 :         netr_DELTA_GROUP_MEMBER_Type.tp_basicsize = pytalloc_BaseObject_size();
   61908             : 
   61909        3559 :         netr_DELTA_ALIAS_Type.tp_base = BaseObject_Type;
   61910        3559 :         netr_DELTA_ALIAS_Type.tp_basicsize = pytalloc_BaseObject_size();
   61911             : 
   61912        3559 :         netr_DELTA_ALIAS_MEMBER_Type.tp_base = BaseObject_Type;
   61913        3559 :         netr_DELTA_ALIAS_MEMBER_Type.tp_basicsize = pytalloc_BaseObject_size();
   61914             : 
   61915        3559 :         netr_QUOTA_LIMITS_Type.tp_base = BaseObject_Type;
   61916        3559 :         netr_QUOTA_LIMITS_Type.tp_basicsize = pytalloc_BaseObject_size();
   61917             : 
   61918        3559 :         netr_DELTA_POLICY_Type.tp_base = BaseObject_Type;
   61919        3559 :         netr_DELTA_POLICY_Type.tp_basicsize = pytalloc_BaseObject_size();
   61920             : 
   61921        3559 :         netr_DELTA_TRUSTED_DOMAIN_Type.tp_base = BaseObject_Type;
   61922        3559 :         netr_DELTA_TRUSTED_DOMAIN_Type.tp_basicsize = pytalloc_BaseObject_size();
   61923             : 
   61924        3559 :         netr_DELTA_ACCOUNT_Type.tp_base = BaseObject_Type;
   61925        3559 :         netr_DELTA_ACCOUNT_Type.tp_basicsize = pytalloc_BaseObject_size();
   61926             : 
   61927        3559 :         netr_CIPHER_VALUE_Type.tp_base = BaseObject_Type;
   61928        3559 :         netr_CIPHER_VALUE_Type.tp_basicsize = pytalloc_BaseObject_size();
   61929             : 
   61930        3559 :         netr_DELTA_SECRET_Type.tp_base = BaseObject_Type;
   61931        3559 :         netr_DELTA_SECRET_Type.tp_basicsize = pytalloc_BaseObject_size();
   61932             : 
   61933        3559 :         netr_DELTA_UNION_Type.tp_base = BaseObject_Type;
   61934        3559 :         netr_DELTA_UNION_Type.tp_basicsize = pytalloc_BaseObject_size();
   61935             : 
   61936        3559 :         netr_DELTA_ID_UNION_Type.tp_base = BaseObject_Type;
   61937        3559 :         netr_DELTA_ID_UNION_Type.tp_basicsize = pytalloc_BaseObject_size();
   61938             : 
   61939        3559 :         netr_DELTA_ENUM_Type.tp_base = BaseObject_Type;
   61940        3559 :         netr_DELTA_ENUM_Type.tp_basicsize = pytalloc_BaseObject_size();
   61941             : 
   61942        3559 :         netr_DELTA_ENUM_ARRAY_Type.tp_base = BaseObject_Type;
   61943        3559 :         netr_DELTA_ENUM_ARRAY_Type.tp_basicsize = pytalloc_BaseObject_size();
   61944             : 
   61945        3559 :         netr_UAS_INFO_0_Type.tp_base = BaseObject_Type;
   61946        3559 :         netr_UAS_INFO_0_Type.tp_basicsize = pytalloc_BaseObject_size();
   61947             : 
   61948        3559 :         netr_AccountBuffer_Type.tp_base = BaseObject_Type;
   61949        3559 :         netr_AccountBuffer_Type.tp_basicsize = pytalloc_BaseObject_size();
   61950             : 
   61951        3559 :         netr_NETLOGON_INFO_1_Type.tp_base = BaseObject_Type;
   61952        3559 :         netr_NETLOGON_INFO_1_Type.tp_basicsize = pytalloc_BaseObject_size();
   61953             : 
   61954        3559 :         netr_NETLOGON_INFO_2_Type.tp_base = BaseObject_Type;
   61955        3559 :         netr_NETLOGON_INFO_2_Type.tp_basicsize = pytalloc_BaseObject_size();
   61956             : 
   61957        3559 :         netr_NETLOGON_INFO_3_Type.tp_base = BaseObject_Type;
   61958        3559 :         netr_NETLOGON_INFO_3_Type.tp_basicsize = pytalloc_BaseObject_size();
   61959             : 
   61960        3559 :         netr_NETLOGON_INFO_4_Type.tp_base = BaseObject_Type;
   61961        3559 :         netr_NETLOGON_INFO_4_Type.tp_basicsize = pytalloc_BaseObject_size();
   61962             : 
   61963        3559 :         netr_CONTROL_QUERY_INFORMATION_Type.tp_base = BaseObject_Type;
   61964        3559 :         netr_CONTROL_QUERY_INFORMATION_Type.tp_basicsize = pytalloc_BaseObject_size();
   61965             : 
   61966        3559 :         netr_CONTROL_DATA_INFORMATION_Type.tp_base = BaseObject_Type;
   61967        3559 :         netr_CONTROL_DATA_INFORMATION_Type.tp_basicsize = pytalloc_BaseObject_size();
   61968             : 
   61969        3559 :         netr_ChangeLogObject_Type.tp_base = BaseObject_Type;
   61970        3559 :         netr_ChangeLogObject_Type.tp_basicsize = pytalloc_BaseObject_size();
   61971             : 
   61972        3559 :         netr_ChangeLogEntry_Type.tp_base = BaseObject_Type;
   61973        3559 :         netr_ChangeLogEntry_Type.tp_basicsize = pytalloc_BaseObject_size();
   61974             : 
   61975        3559 :         netr_Blob_Type.tp_base = BaseObject_Type;
   61976        3559 :         netr_Blob_Type.tp_basicsize = pytalloc_BaseObject_size();
   61977             : 
   61978        3559 :         netr_DsRGetDCNameInfo_Type.tp_base = BaseObject_Type;
   61979        3559 :         netr_DsRGetDCNameInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   61980             : 
   61981        3559 :         netr_Capabilities_Type.tp_base = BaseObject_Type;
   61982        3559 :         netr_Capabilities_Type.tp_basicsize = pytalloc_BaseObject_size();
   61983             : 
   61984        3559 :         netr_LsaPolicyInformation_Type.tp_base = BaseObject_Type;
   61985        3559 :         netr_LsaPolicyInformation_Type.tp_basicsize = pytalloc_BaseObject_size();
   61986             : 
   61987        3559 :         netr_OsVersionInfoEx_Type.tp_base = BaseObject_Type;
   61988        3559 :         netr_OsVersionInfoEx_Type.tp_basicsize = pytalloc_BaseObject_size();
   61989             : 
   61990        3559 :         netr_OsVersion_Type.tp_base = BaseObject_Type;
   61991        3559 :         netr_OsVersion_Type.tp_basicsize = pytalloc_BaseObject_size();
   61992             : 
   61993        3559 :         netr_OsVersionContainer_Type.tp_base = BaseObject_Type;
   61994        3559 :         netr_OsVersionContainer_Type.tp_basicsize = pytalloc_BaseObject_size();
   61995             : 
   61996        3559 :         netr_WorkstationInformation_Type.tp_base = BaseObject_Type;
   61997        3559 :         netr_WorkstationInformation_Type.tp_basicsize = pytalloc_BaseObject_size();
   61998             : 
   61999        3559 :         netr_WorkstationInfo_Type.tp_base = BaseObject_Type;
   62000        3559 :         netr_WorkstationInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62001             : 
   62002        3559 :         netr_trust_extension_info_Type.tp_base = BaseObject_Type;
   62003        3559 :         netr_trust_extension_info_Type.tp_basicsize = pytalloc_BaseObject_size();
   62004             : 
   62005        3559 :         netr_trust_extension_Type.tp_base = BaseObject_Type;
   62006        3559 :         netr_trust_extension_Type.tp_basicsize = pytalloc_BaseObject_size();
   62007             : 
   62008        3559 :         netr_trust_extension_container_Type.tp_base = BaseObject_Type;
   62009        3559 :         netr_trust_extension_container_Type.tp_basicsize = pytalloc_BaseObject_size();
   62010             : 
   62011        3559 :         netr_OneDomainInfo_Type.tp_base = BaseObject_Type;
   62012        3559 :         netr_OneDomainInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62013             : 
   62014        3559 :         netr_DomainInformation_Type.tp_base = BaseObject_Type;
   62015        3559 :         netr_DomainInformation_Type.tp_basicsize = pytalloc_BaseObject_size();
   62016             : 
   62017        3559 :         netr_DomainInfo_Type.tp_base = BaseObject_Type;
   62018        3559 :         netr_DomainInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62019             : 
   62020        3559 :         NL_PASSWORD_VERSION_Type.tp_base = BaseObject_Type;
   62021        3559 :         NL_PASSWORD_VERSION_Type.tp_basicsize = pytalloc_BaseObject_size();
   62022             : 
   62023        3559 :         netr_CryptPassword_Type.tp_base = BaseObject_Type;
   62024        3559 :         netr_CryptPassword_Type.tp_basicsize = pytalloc_BaseObject_size();
   62025             : 
   62026        3559 :         netr_SendToSamResetBadPasswordCount_Type.tp_base = BaseObject_Type;
   62027        3559 :         netr_SendToSamResetBadPasswordCount_Type.tp_basicsize = pytalloc_BaseObject_size();
   62028             : 
   62029        3559 :         netr_SendToSamMessage_Type.tp_base = BaseObject_Type;
   62030        3559 :         netr_SendToSamMessage_Type.tp_basicsize = pytalloc_BaseObject_size();
   62031             : 
   62032        3559 :         netr_SendToSamBase_Type.tp_base = BaseObject_Type;
   62033        3559 :         netr_SendToSamBase_Type.tp_basicsize = pytalloc_BaseObject_size();
   62034             : 
   62035        3559 :         netr_DsRAddressToSitenamesWCtr_Type.tp_base = BaseObject_Type;
   62036        3559 :         netr_DsRAddressToSitenamesWCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   62037             : 
   62038        3559 :         netr_DsRAddress_Type.tp_base = BaseObject_Type;
   62039        3559 :         netr_DsRAddress_Type.tp_basicsize = pytalloc_BaseObject_size();
   62040             : 
   62041        3559 :         netr_DomainTrust_Type.tp_base = BaseObject_Type;
   62042        3559 :         netr_DomainTrust_Type.tp_basicsize = pytalloc_BaseObject_size();
   62043             : 
   62044        3559 :         netr_DomainTrustList_Type.tp_base = BaseObject_Type;
   62045        3559 :         netr_DomainTrustList_Type.tp_basicsize = pytalloc_BaseObject_size();
   62046             : 
   62047        3559 :         netr_DsRAddressToSitenamesExWCtr_Type.tp_base = BaseObject_Type;
   62048        3559 :         netr_DsRAddressToSitenamesExWCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   62049             : 
   62050        3559 :         DcSitesCtr_Type.tp_base = BaseObject_Type;
   62051        3559 :         DcSitesCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   62052             : 
   62053        3559 :         netr_TrustInfo_Type.tp_base = BaseObject_Type;
   62054        3559 :         netr_TrustInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62055             : 
   62056        3559 :         NL_DNS_NAME_INFO_Type.tp_base = BaseObject_Type;
   62057        3559 :         NL_DNS_NAME_INFO_Type.tp_basicsize = pytalloc_BaseObject_size();
   62058             : 
   62059        3559 :         NL_DNS_NAME_INFO_ARRAY_Type.tp_base = BaseObject_Type;
   62060        3559 :         NL_DNS_NAME_INFO_ARRAY_Type.tp_basicsize = pytalloc_BaseObject_size();
   62061             : 
   62062        3559 :         netr_LogonUasLogon_Type.tp_base = BaseObject_Type;
   62063        3559 :         netr_LogonUasLogon_Type.tp_basicsize = pytalloc_BaseObject_size();
   62064             : 
   62065        3559 :         netr_LogonUasLogoff_Type.tp_base = BaseObject_Type;
   62066        3559 :         netr_LogonUasLogoff_Type.tp_basicsize = pytalloc_BaseObject_size();
   62067             : 
   62068        3559 :         netr_LogonSamLogon_Type.tp_base = BaseObject_Type;
   62069        3559 :         netr_LogonSamLogon_Type.tp_basicsize = pytalloc_BaseObject_size();
   62070             : 
   62071        3559 :         netr_LogonSamLogoff_Type.tp_base = BaseObject_Type;
   62072        3559 :         netr_LogonSamLogoff_Type.tp_basicsize = pytalloc_BaseObject_size();
   62073             : 
   62074        3559 :         netr_ServerReqChallenge_Type.tp_base = BaseObject_Type;
   62075        3559 :         netr_ServerReqChallenge_Type.tp_basicsize = pytalloc_BaseObject_size();
   62076             : 
   62077        3559 :         netr_ServerAuthenticate_Type.tp_base = BaseObject_Type;
   62078        3559 :         netr_ServerAuthenticate_Type.tp_basicsize = pytalloc_BaseObject_size();
   62079             : 
   62080        3559 :         netr_ServerPasswordSet_Type.tp_base = BaseObject_Type;
   62081        3559 :         netr_ServerPasswordSet_Type.tp_basicsize = pytalloc_BaseObject_size();
   62082             : 
   62083        3559 :         netr_DatabaseDeltas_Type.tp_base = BaseObject_Type;
   62084        3559 :         netr_DatabaseDeltas_Type.tp_basicsize = pytalloc_BaseObject_size();
   62085             : 
   62086        3559 :         netr_DatabaseSync_Type.tp_base = BaseObject_Type;
   62087        3559 :         netr_DatabaseSync_Type.tp_basicsize = pytalloc_BaseObject_size();
   62088             : 
   62089        3559 :         netr_AccountDeltas_Type.tp_base = BaseObject_Type;
   62090        3559 :         netr_AccountDeltas_Type.tp_basicsize = pytalloc_BaseObject_size();
   62091             : 
   62092        3559 :         netr_AccountSync_Type.tp_base = BaseObject_Type;
   62093        3559 :         netr_AccountSync_Type.tp_basicsize = pytalloc_BaseObject_size();
   62094             : 
   62095        3559 :         netr_GetDcName_Type.tp_base = BaseObject_Type;
   62096        3559 :         netr_GetDcName_Type.tp_basicsize = pytalloc_BaseObject_size();
   62097             : 
   62098        3559 :         netr_LogonControl_Type.tp_base = BaseObject_Type;
   62099        3559 :         netr_LogonControl_Type.tp_basicsize = pytalloc_BaseObject_size();
   62100             : 
   62101        3559 :         netr_GetAnyDCName_Type.tp_base = BaseObject_Type;
   62102        3559 :         netr_GetAnyDCName_Type.tp_basicsize = pytalloc_BaseObject_size();
   62103             : 
   62104        3559 :         netr_LogonControl2_Type.tp_base = BaseObject_Type;
   62105        3559 :         netr_LogonControl2_Type.tp_basicsize = pytalloc_BaseObject_size();
   62106             : 
   62107        3559 :         netr_ServerAuthenticate2_Type.tp_base = BaseObject_Type;
   62108        3559 :         netr_ServerAuthenticate2_Type.tp_basicsize = pytalloc_BaseObject_size();
   62109             : 
   62110        3559 :         netr_DatabaseSync2_Type.tp_base = BaseObject_Type;
   62111        3559 :         netr_DatabaseSync2_Type.tp_basicsize = pytalloc_BaseObject_size();
   62112             : 
   62113        3559 :         netr_DatabaseRedo_Type.tp_base = BaseObject_Type;
   62114        3559 :         netr_DatabaseRedo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62115             : 
   62116        3559 :         netr_LogonControl2Ex_Type.tp_base = BaseObject_Type;
   62117        3559 :         netr_LogonControl2Ex_Type.tp_basicsize = pytalloc_BaseObject_size();
   62118             : 
   62119        3559 :         netr_NetrEnumerateTrustedDomains_Type.tp_base = BaseObject_Type;
   62120        3559 :         netr_NetrEnumerateTrustedDomains_Type.tp_basicsize = pytalloc_BaseObject_size();
   62121             : 
   62122        3559 :         netr_DsRGetDCName_Type.tp_base = BaseObject_Type;
   62123        3559 :         netr_DsRGetDCName_Type.tp_basicsize = pytalloc_BaseObject_size();
   62124             : 
   62125        3559 :         netr_LogonGetCapabilities_Type.tp_base = BaseObject_Type;
   62126        3559 :         netr_LogonGetCapabilities_Type.tp_basicsize = pytalloc_BaseObject_size();
   62127             : 
   62128        3559 :         netr_LogonGetTrustRid_Type.tp_base = BaseObject_Type;
   62129        3559 :         netr_LogonGetTrustRid_Type.tp_basicsize = pytalloc_BaseObject_size();
   62130             : 
   62131        3559 :         netr_ServerAuthenticate3_Type.tp_base = BaseObject_Type;
   62132        3559 :         netr_ServerAuthenticate3_Type.tp_basicsize = pytalloc_BaseObject_size();
   62133             : 
   62134        3559 :         netr_DsRGetDCNameEx_Type.tp_base = BaseObject_Type;
   62135        3559 :         netr_DsRGetDCNameEx_Type.tp_basicsize = pytalloc_BaseObject_size();
   62136             : 
   62137        3559 :         netr_DsRGetSiteName_Type.tp_base = BaseObject_Type;
   62138        3559 :         netr_DsRGetSiteName_Type.tp_basicsize = pytalloc_BaseObject_size();
   62139             : 
   62140        3559 :         netr_LogonGetDomainInfo_Type.tp_base = BaseObject_Type;
   62141        3559 :         netr_LogonGetDomainInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62142             : 
   62143        3559 :         netr_ServerPasswordSet2_Type.tp_base = BaseObject_Type;
   62144        3559 :         netr_ServerPasswordSet2_Type.tp_basicsize = pytalloc_BaseObject_size();
   62145             : 
   62146        3559 :         netr_ServerPasswordGet_Type.tp_base = BaseObject_Type;
   62147        3559 :         netr_ServerPasswordGet_Type.tp_basicsize = pytalloc_BaseObject_size();
   62148             : 
   62149        3559 :         netr_NetrLogonSendToSam_Type.tp_base = BaseObject_Type;
   62150        3559 :         netr_NetrLogonSendToSam_Type.tp_basicsize = pytalloc_BaseObject_size();
   62151             : 
   62152        3559 :         netr_DsRAddressToSitenamesW_Type.tp_base = BaseObject_Type;
   62153        3559 :         netr_DsRAddressToSitenamesW_Type.tp_basicsize = pytalloc_BaseObject_size();
   62154             : 
   62155        3559 :         netr_DsRGetDCNameEx2_Type.tp_base = BaseObject_Type;
   62156        3559 :         netr_DsRGetDCNameEx2_Type.tp_basicsize = pytalloc_BaseObject_size();
   62157             : 
   62158        3559 :         netr_NetrEnumerateTrustedDomainsEx_Type.tp_base = BaseObject_Type;
   62159        3559 :         netr_NetrEnumerateTrustedDomainsEx_Type.tp_basicsize = pytalloc_BaseObject_size();
   62160             : 
   62161        3559 :         netr_DsRAddressToSitenamesExW_Type.tp_base = BaseObject_Type;
   62162        3559 :         netr_DsRAddressToSitenamesExW_Type.tp_basicsize = pytalloc_BaseObject_size();
   62163             : 
   62164        3559 :         netr_DsrGetDcSiteCoverageW_Type.tp_base = BaseObject_Type;
   62165        3559 :         netr_DsrGetDcSiteCoverageW_Type.tp_basicsize = pytalloc_BaseObject_size();
   62166             : 
   62167        3559 :         netr_LogonSamLogonEx_Type.tp_base = BaseObject_Type;
   62168        3559 :         netr_LogonSamLogonEx_Type.tp_basicsize = pytalloc_BaseObject_size();
   62169             : 
   62170        3559 :         netr_DsrEnumerateDomainTrusts_Type.tp_base = BaseObject_Type;
   62171        3559 :         netr_DsrEnumerateDomainTrusts_Type.tp_basicsize = pytalloc_BaseObject_size();
   62172             : 
   62173        3559 :         netr_DsrDeregisterDNSHostRecords_Type.tp_base = BaseObject_Type;
   62174        3559 :         netr_DsrDeregisterDNSHostRecords_Type.tp_basicsize = pytalloc_BaseObject_size();
   62175             : 
   62176        3559 :         netr_ServerTrustPasswordsGet_Type.tp_base = BaseObject_Type;
   62177        3559 :         netr_ServerTrustPasswordsGet_Type.tp_basicsize = pytalloc_BaseObject_size();
   62178             : 
   62179        3559 :         netr_DsRGetForestTrustInformation_Type.tp_base = BaseObject_Type;
   62180        3559 :         netr_DsRGetForestTrustInformation_Type.tp_basicsize = pytalloc_BaseObject_size();
   62181             : 
   62182        3559 :         netr_GetForestTrustInformation_Type.tp_base = BaseObject_Type;
   62183        3559 :         netr_GetForestTrustInformation_Type.tp_basicsize = pytalloc_BaseObject_size();
   62184             : 
   62185        3559 :         netr_LogonSamLogonWithFlags_Type.tp_base = BaseObject_Type;
   62186        3559 :         netr_LogonSamLogonWithFlags_Type.tp_basicsize = pytalloc_BaseObject_size();
   62187             : 
   62188        3559 :         netr_ServerGetTrustInfo_Type.tp_base = BaseObject_Type;
   62189        3559 :         netr_ServerGetTrustInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   62190             : 
   62191        3559 :         netr_Unused47_Type.tp_base = BaseObject_Type;
   62192        3559 :         netr_Unused47_Type.tp_basicsize = pytalloc_BaseObject_size();
   62193             : 
   62194        3559 :         netr_DsrUpdateReadOnlyServerDnsRecords_Type.tp_base = BaseObject_Type;
   62195        3559 :         netr_DsrUpdateReadOnlyServerDnsRecords_Type.tp_basicsize = pytalloc_BaseObject_size();
   62196             : 
   62197        3559 :         netlogon_InterfaceType.tp_base = ClientConnection_Type;
   62198             : 
   62199        3559 :         netlogon_SyntaxType.tp_base = ndr_syntax_id_Type;
   62200        3559 :         netlogon_SyntaxType.tp_basicsize = pytalloc_BaseObject_size();
   62201             : 
   62202        3559 :         if (PyType_Ready(&netr_UasInfo_Type) < 0)
   62203           0 :                 goto out;
   62204        3559 :         if (PyType_Ready(&netr_UasLogoffInfo_Type) < 0)
   62205           0 :                 goto out;
   62206        3559 :         if (PyType_Ready(&netr_AcctLockStr_Type) < 0)
   62207           0 :                 goto out;
   62208        3559 :         if (PyType_Ready(&netr_IdentityInfo_Type) < 0)
   62209           0 :                 goto out;
   62210        3559 :         if (PyType_Ready(&netr_PasswordInfo_Type) < 0)
   62211           0 :                 goto out;
   62212        3559 :         if (PyType_Ready(&netr_ChallengeResponse_Type) < 0)
   62213           0 :                 goto out;
   62214        3559 :         if (PyType_Ready(&netr_NetworkInfo_Type) < 0)
   62215           0 :                 goto out;
   62216        3559 :         if (PyType_Ready(&netr_GenericInfo_Type) < 0)
   62217           0 :                 goto out;
   62218        3559 :         if (PyType_Ready(&netr_LogonLevel_Type) < 0)
   62219           0 :                 goto out;
   62220        3559 :         if (PyType_Ready(&netr_UserSessionKey_Type) < 0)
   62221           0 :                 goto out;
   62222        3559 :         if (PyType_Ready(&netr_LMSessionKey_Type) < 0)
   62223           0 :                 goto out;
   62224        3559 :         if (PyType_Ready(&netr_SamBaseInfo_Type) < 0)
   62225           0 :                 goto out;
   62226        3559 :         if (PyType_Ready(&netr_SamInfo2_Type) < 0)
   62227           0 :                 goto out;
   62228        3559 :         if (PyType_Ready(&netr_SidAttr_Type) < 0)
   62229           0 :                 goto out;
   62230        3559 :         if (PyType_Ready(&netr_SamInfo3_Type) < 0)
   62231           0 :                 goto out;
   62232        3559 :         if (PyType_Ready(&netr_SamInfo6_Type) < 0)
   62233           0 :                 goto out;
   62234        3559 :         if (PyType_Ready(&netr_PacInfo_Type) < 0)
   62235           0 :                 goto out;
   62236        3559 :         if (PyType_Ready(&netr_GenericInfo2_Type) < 0)
   62237           0 :                 goto out;
   62238        3559 :         if (PyType_Ready(&netr_Validation_Type) < 0)
   62239           0 :                 goto out;
   62240        3559 :         if (PyType_Ready(&netr_Credential_Type) < 0)
   62241           0 :                 goto out;
   62242        3559 :         if (PyType_Ready(&netr_Authenticator_Type) < 0)
   62243           0 :                 goto out;
   62244        3559 :         if (PyType_Ready(&netr_DELTA_DELETE_USER_Type) < 0)
   62245           0 :                 goto out;
   62246        3559 :         if (PyType_Ready(&netr_USER_KEY16_Type) < 0)
   62247           0 :                 goto out;
   62248        3559 :         if (PyType_Ready(&netr_PasswordHistory_Type) < 0)
   62249           0 :                 goto out;
   62250        3559 :         if (PyType_Ready(&netr_USER_KEYS2_Type) < 0)
   62251           0 :                 goto out;
   62252        3559 :         if (PyType_Ready(&netr_USER_KEY_UNION_Type) < 0)
   62253           0 :                 goto out;
   62254        3559 :         if (PyType_Ready(&netr_USER_KEYS_Type) < 0)
   62255           0 :                 goto out;
   62256        3559 :         if (PyType_Ready(&netr_USER_PRIVATE_INFO_Type) < 0)
   62257           0 :                 goto out;
   62258        3559 :         if (PyType_Ready(&netr_DELTA_USER_Type) < 0)
   62259           0 :                 goto out;
   62260        3559 :         if (PyType_Ready(&netr_DELTA_DOMAIN_Type) < 0)
   62261           0 :                 goto out;
   62262        3559 :         if (PyType_Ready(&netr_DELTA_GROUP_Type) < 0)
   62263           0 :                 goto out;
   62264        3559 :         if (PyType_Ready(&netr_DELTA_RENAME_Type) < 0)
   62265           0 :                 goto out;
   62266        3559 :         if (PyType_Ready(&netr_DELTA_GROUP_MEMBER_Type) < 0)
   62267           0 :                 goto out;
   62268        3559 :         if (PyType_Ready(&netr_DELTA_ALIAS_Type) < 0)
   62269           0 :                 goto out;
   62270        3559 :         if (PyType_Ready(&netr_DELTA_ALIAS_MEMBER_Type) < 0)
   62271           0 :                 goto out;
   62272        3559 :         if (PyType_Ready(&netr_QUOTA_LIMITS_Type) < 0)
   62273           0 :                 goto out;
   62274        3559 :         if (PyType_Ready(&netr_DELTA_POLICY_Type) < 0)
   62275           0 :                 goto out;
   62276        3559 :         if (PyType_Ready(&netr_DELTA_TRUSTED_DOMAIN_Type) < 0)
   62277           0 :                 goto out;
   62278        3559 :         if (PyType_Ready(&netr_DELTA_ACCOUNT_Type) < 0)
   62279           0 :                 goto out;
   62280        3559 :         if (PyType_Ready(&netr_CIPHER_VALUE_Type) < 0)
   62281           0 :                 goto out;
   62282        3559 :         if (PyType_Ready(&netr_DELTA_SECRET_Type) < 0)
   62283           0 :                 goto out;
   62284        3559 :         if (PyType_Ready(&netr_DELTA_UNION_Type) < 0)
   62285           0 :                 goto out;
   62286        3559 :         if (PyType_Ready(&netr_DELTA_ID_UNION_Type) < 0)
   62287           0 :                 goto out;
   62288        3559 :         if (PyType_Ready(&netr_DELTA_ENUM_Type) < 0)
   62289           0 :                 goto out;
   62290        3559 :         if (PyType_Ready(&netr_DELTA_ENUM_ARRAY_Type) < 0)
   62291           0 :                 goto out;
   62292        3559 :         if (PyType_Ready(&netr_UAS_INFO_0_Type) < 0)
   62293           0 :                 goto out;
   62294        3559 :         if (PyType_Ready(&netr_AccountBuffer_Type) < 0)
   62295           0 :                 goto out;
   62296        3559 :         if (PyType_Ready(&netr_NETLOGON_INFO_1_Type) < 0)
   62297           0 :                 goto out;
   62298        3559 :         if (PyType_Ready(&netr_NETLOGON_INFO_2_Type) < 0)
   62299           0 :                 goto out;
   62300        3559 :         if (PyType_Ready(&netr_NETLOGON_INFO_3_Type) < 0)
   62301           0 :                 goto out;
   62302        3559 :         if (PyType_Ready(&netr_NETLOGON_INFO_4_Type) < 0)
   62303           0 :                 goto out;
   62304        3559 :         if (PyType_Ready(&netr_CONTROL_QUERY_INFORMATION_Type) < 0)
   62305           0 :                 goto out;
   62306        3559 :         if (PyType_Ready(&netr_CONTROL_DATA_INFORMATION_Type) < 0)
   62307           0 :                 goto out;
   62308        3559 :         if (PyType_Ready(&netr_ChangeLogObject_Type) < 0)
   62309           0 :                 goto out;
   62310        3559 :         if (PyType_Ready(&netr_ChangeLogEntry_Type) < 0)
   62311           0 :                 goto out;
   62312        3559 :         if (PyType_Ready(&netr_Blob_Type) < 0)
   62313           0 :                 goto out;
   62314        3559 :         if (PyType_Ready(&netr_DsRGetDCNameInfo_Type) < 0)
   62315           0 :                 goto out;
   62316        3559 :         if (PyType_Ready(&netr_Capabilities_Type) < 0)
   62317           0 :                 goto out;
   62318        3559 :         if (PyType_Ready(&netr_LsaPolicyInformation_Type) < 0)
   62319           0 :                 goto out;
   62320        3559 :         if (PyType_Ready(&netr_OsVersionInfoEx_Type) < 0)
   62321           0 :                 goto out;
   62322        3559 :         if (PyType_Ready(&netr_OsVersion_Type) < 0)
   62323           0 :                 goto out;
   62324        3559 :         if (PyType_Ready(&netr_OsVersionContainer_Type) < 0)
   62325           0 :                 goto out;
   62326        3559 :         if (PyType_Ready(&netr_WorkstationInformation_Type) < 0)
   62327           0 :                 goto out;
   62328        3559 :         if (PyType_Ready(&netr_WorkstationInfo_Type) < 0)
   62329           0 :                 goto out;
   62330        3559 :         if (PyType_Ready(&netr_trust_extension_info_Type) < 0)
   62331           0 :                 goto out;
   62332        3559 :         if (PyType_Ready(&netr_trust_extension_Type) < 0)
   62333           0 :                 goto out;
   62334        3559 :         if (PyType_Ready(&netr_trust_extension_container_Type) < 0)
   62335           0 :                 goto out;
   62336        3559 :         if (PyType_Ready(&netr_OneDomainInfo_Type) < 0)
   62337           0 :                 goto out;
   62338        3559 :         if (PyType_Ready(&netr_DomainInformation_Type) < 0)
   62339           0 :                 goto out;
   62340        3559 :         if (PyType_Ready(&netr_DomainInfo_Type) < 0)
   62341           0 :                 goto out;
   62342        3559 :         if (PyType_Ready(&NL_PASSWORD_VERSION_Type) < 0)
   62343           0 :                 goto out;
   62344        3559 :         if (PyType_Ready(&netr_CryptPassword_Type) < 0)
   62345           0 :                 goto out;
   62346        3559 :         if (PyType_Ready(&netr_SendToSamResetBadPasswordCount_Type) < 0)
   62347           0 :                 goto out;
   62348        3559 :         if (PyType_Ready(&netr_SendToSamMessage_Type) < 0)
   62349           0 :                 goto out;
   62350        3559 :         if (PyType_Ready(&netr_SendToSamBase_Type) < 0)
   62351           0 :                 goto out;
   62352        3559 :         if (PyType_Ready(&netr_DsRAddressToSitenamesWCtr_Type) < 0)
   62353           0 :                 goto out;
   62354        3559 :         if (PyType_Ready(&netr_DsRAddress_Type) < 0)
   62355           0 :                 goto out;
   62356        3559 :         if (PyType_Ready(&netr_DomainTrust_Type) < 0)
   62357           0 :                 goto out;
   62358        3559 :         if (PyType_Ready(&netr_DomainTrustList_Type) < 0)
   62359           0 :                 goto out;
   62360        3559 :         if (PyType_Ready(&netr_DsRAddressToSitenamesExWCtr_Type) < 0)
   62361           0 :                 goto out;
   62362        3559 :         if (PyType_Ready(&DcSitesCtr_Type) < 0)
   62363           0 :                 goto out;
   62364        3559 :         if (PyType_Ready(&netr_TrustInfo_Type) < 0)
   62365           0 :                 goto out;
   62366        3559 :         if (PyType_Ready(&NL_DNS_NAME_INFO_Type) < 0)
   62367           0 :                 goto out;
   62368        3559 :         if (PyType_Ready(&NL_DNS_NAME_INFO_ARRAY_Type) < 0)
   62369           0 :                 goto out;
   62370        3559 :         if (PyType_Ready(&netr_LogonUasLogon_Type) < 0)
   62371           0 :                 goto out;
   62372        3559 :         if (PyType_Ready(&netr_LogonUasLogoff_Type) < 0)
   62373           0 :                 goto out;
   62374        3559 :         if (PyType_Ready(&netr_LogonSamLogon_Type) < 0)
   62375           0 :                 goto out;
   62376        3559 :         if (PyType_Ready(&netr_LogonSamLogoff_Type) < 0)
   62377           0 :                 goto out;
   62378        3559 :         if (PyType_Ready(&netr_ServerReqChallenge_Type) < 0)
   62379           0 :                 goto out;
   62380        3559 :         if (PyType_Ready(&netr_ServerAuthenticate_Type) < 0)
   62381           0 :                 goto out;
   62382        3559 :         if (PyType_Ready(&netr_ServerPasswordSet_Type) < 0)
   62383           0 :                 goto out;
   62384        3559 :         if (PyType_Ready(&netr_DatabaseDeltas_Type) < 0)
   62385           0 :                 goto out;
   62386        3559 :         if (PyType_Ready(&netr_DatabaseSync_Type) < 0)
   62387           0 :                 goto out;
   62388        3559 :         if (PyType_Ready(&netr_AccountDeltas_Type) < 0)
   62389           0 :                 goto out;
   62390        3559 :         if (PyType_Ready(&netr_AccountSync_Type) < 0)
   62391           0 :                 goto out;
   62392        3559 :         if (PyType_Ready(&netr_GetDcName_Type) < 0)
   62393           0 :                 goto out;
   62394        3559 :         if (PyType_Ready(&netr_LogonControl_Type) < 0)
   62395           0 :                 goto out;
   62396        3559 :         if (PyType_Ready(&netr_GetAnyDCName_Type) < 0)
   62397           0 :                 goto out;
   62398        3559 :         if (PyType_Ready(&netr_LogonControl2_Type) < 0)
   62399           0 :                 goto out;
   62400        3559 :         if (PyType_Ready(&netr_ServerAuthenticate2_Type) < 0)
   62401           0 :                 goto out;
   62402        3559 :         if (PyType_Ready(&netr_DatabaseSync2_Type) < 0)
   62403           0 :                 goto out;
   62404        3559 :         if (PyType_Ready(&netr_DatabaseRedo_Type) < 0)
   62405           0 :                 goto out;
   62406        3559 :         if (PyType_Ready(&netr_LogonControl2Ex_Type) < 0)
   62407           0 :                 goto out;
   62408        3559 :         if (PyType_Ready(&netr_NetrEnumerateTrustedDomains_Type) < 0)
   62409           0 :                 goto out;
   62410        3559 :         if (PyType_Ready(&netr_DsRGetDCName_Type) < 0)
   62411           0 :                 goto out;
   62412        3559 :         if (PyType_Ready(&netr_LogonGetCapabilities_Type) < 0)
   62413           0 :                 goto out;
   62414        3559 :         if (PyType_Ready(&netr_LogonGetTrustRid_Type) < 0)
   62415           0 :                 goto out;
   62416        3559 :         if (PyType_Ready(&netr_ServerAuthenticate3_Type) < 0)
   62417           0 :                 goto out;
   62418        3559 :         if (PyType_Ready(&netr_DsRGetDCNameEx_Type) < 0)
   62419           0 :                 goto out;
   62420        3559 :         if (PyType_Ready(&netr_DsRGetSiteName_Type) < 0)
   62421           0 :                 goto out;
   62422        3559 :         if (PyType_Ready(&netr_LogonGetDomainInfo_Type) < 0)
   62423           0 :                 goto out;
   62424        3559 :         if (PyType_Ready(&netr_ServerPasswordSet2_Type) < 0)
   62425           0 :                 goto out;
   62426        3559 :         if (PyType_Ready(&netr_ServerPasswordGet_Type) < 0)
   62427           0 :                 goto out;
   62428        3559 :         if (PyType_Ready(&netr_NetrLogonSendToSam_Type) < 0)
   62429           0 :                 goto out;
   62430        3559 :         if (PyType_Ready(&netr_DsRAddressToSitenamesW_Type) < 0)
   62431           0 :                 goto out;
   62432        3559 :         if (PyType_Ready(&netr_DsRGetDCNameEx2_Type) < 0)
   62433           0 :                 goto out;
   62434        3559 :         if (PyType_Ready(&netr_NetrEnumerateTrustedDomainsEx_Type) < 0)
   62435           0 :                 goto out;
   62436        3559 :         if (PyType_Ready(&netr_DsRAddressToSitenamesExW_Type) < 0)
   62437           0 :                 goto out;
   62438        3559 :         if (PyType_Ready(&netr_DsrGetDcSiteCoverageW_Type) < 0)
   62439           0 :                 goto out;
   62440        3559 :         if (PyType_Ready(&netr_LogonSamLogonEx_Type) < 0)
   62441           0 :                 goto out;
   62442        3559 :         if (PyType_Ready(&netr_DsrEnumerateDomainTrusts_Type) < 0)
   62443           0 :                 goto out;
   62444        3559 :         if (PyType_Ready(&netr_DsrDeregisterDNSHostRecords_Type) < 0)
   62445           0 :                 goto out;
   62446        3559 :         if (PyType_Ready(&netr_ServerTrustPasswordsGet_Type) < 0)
   62447           0 :                 goto out;
   62448        3559 :         if (PyType_Ready(&netr_DsRGetForestTrustInformation_Type) < 0)
   62449           0 :                 goto out;
   62450        3559 :         if (PyType_Ready(&netr_GetForestTrustInformation_Type) < 0)
   62451           0 :                 goto out;
   62452        3559 :         if (PyType_Ready(&netr_LogonSamLogonWithFlags_Type) < 0)
   62453           0 :                 goto out;
   62454        3559 :         if (PyType_Ready(&netr_ServerGetTrustInfo_Type) < 0)
   62455           0 :                 goto out;
   62456        3559 :         if (PyType_Ready(&netr_Unused47_Type) < 0)
   62457           0 :                 goto out;
   62458        3559 :         if (PyType_Ready(&netr_DsrUpdateReadOnlyServerDnsRecords_Type) < 0)
   62459           0 :                 goto out;
   62460        3559 :         if (PyType_Ready(&netlogon_InterfaceType) < 0)
   62461           0 :                 goto out;
   62462        3559 :         if (PyType_Ready(&netlogon_SyntaxType) < 0)
   62463           0 :                 goto out;
   62464        3559 :         if (!PyInterface_AddNdrRpcMethods(&netlogon_InterfaceType, py_ndr_netlogon_methods))
   62465           0 :                 return NULL;
   62466             : 
   62467             : #ifdef PY_NETR_UASINFO_PATCH
   62468             :         PY_NETR_UASINFO_PATCH(&netr_UasInfo_Type);
   62469             : #endif
   62470             : #ifdef PY_NETR_UASLOGOFFINFO_PATCH
   62471             :         PY_NETR_UASLOGOFFINFO_PATCH(&netr_UasLogoffInfo_Type);
   62472             : #endif
   62473             : #ifdef PY_NETR_ACCTLOCKSTR_PATCH
   62474             :         PY_NETR_ACCTLOCKSTR_PATCH(&netr_AcctLockStr_Type);
   62475             : #endif
   62476             : #ifdef PY_NETR_IDENTITYINFO_PATCH
   62477             :         PY_NETR_IDENTITYINFO_PATCH(&netr_IdentityInfo_Type);
   62478             : #endif
   62479             : #ifdef PY_NETR_PASSWORDINFO_PATCH
   62480             :         PY_NETR_PASSWORDINFO_PATCH(&netr_PasswordInfo_Type);
   62481             : #endif
   62482             : #ifdef PY_NETR_CHALLENGERESPONSE_PATCH
   62483             :         PY_NETR_CHALLENGERESPONSE_PATCH(&netr_ChallengeResponse_Type);
   62484             : #endif
   62485             : #ifdef PY_NETR_NETWORKINFO_PATCH
   62486             :         PY_NETR_NETWORKINFO_PATCH(&netr_NetworkInfo_Type);
   62487             : #endif
   62488             : #ifdef PY_NETR_GENERICINFO_PATCH
   62489             :         PY_NETR_GENERICINFO_PATCH(&netr_GenericInfo_Type);
   62490             : #endif
   62491             : #ifdef PY_NETR_LOGONLEVEL_PATCH
   62492             :         PY_NETR_LOGONLEVEL_PATCH(&netr_LogonLevel_Type);
   62493             : #endif
   62494             : #ifdef PY_NETR_USERSESSIONKEY_PATCH
   62495             :         PY_NETR_USERSESSIONKEY_PATCH(&netr_UserSessionKey_Type);
   62496             : #endif
   62497             : #ifdef PY_NETR_LMSESSIONKEY_PATCH
   62498             :         PY_NETR_LMSESSIONKEY_PATCH(&netr_LMSessionKey_Type);
   62499             : #endif
   62500             : #ifdef PY_NETR_SAMBASEINFO_PATCH
   62501             :         PY_NETR_SAMBASEINFO_PATCH(&netr_SamBaseInfo_Type);
   62502             : #endif
   62503             : #ifdef PY_NETR_SAMINFO2_PATCH
   62504             :         PY_NETR_SAMINFO2_PATCH(&netr_SamInfo2_Type);
   62505             : #endif
   62506             : #ifdef PY_NETR_SIDATTR_PATCH
   62507             :         PY_NETR_SIDATTR_PATCH(&netr_SidAttr_Type);
   62508             : #endif
   62509             : #ifdef PY_NETR_SAMINFO3_PATCH
   62510             :         PY_NETR_SAMINFO3_PATCH(&netr_SamInfo3_Type);
   62511             : #endif
   62512             : #ifdef PY_NETR_SAMINFO6_PATCH
   62513             :         PY_NETR_SAMINFO6_PATCH(&netr_SamInfo6_Type);
   62514             : #endif
   62515             : #ifdef PY_NETR_PACINFO_PATCH
   62516             :         PY_NETR_PACINFO_PATCH(&netr_PacInfo_Type);
   62517             : #endif
   62518             : #ifdef PY_NETR_GENERICINFO2_PATCH
   62519             :         PY_NETR_GENERICINFO2_PATCH(&netr_GenericInfo2_Type);
   62520             : #endif
   62521             : #ifdef PY_NETR_VALIDATION_PATCH
   62522             :         PY_NETR_VALIDATION_PATCH(&netr_Validation_Type);
   62523             : #endif
   62524             : #ifdef PY_NETR_CREDENTIAL_PATCH
   62525             :         PY_NETR_CREDENTIAL_PATCH(&netr_Credential_Type);
   62526             : #endif
   62527             : #ifdef PY_NETR_AUTHENTICATOR_PATCH
   62528             :         PY_NETR_AUTHENTICATOR_PATCH(&netr_Authenticator_Type);
   62529             : #endif
   62530             : #ifdef PY_NETR_DELTA_DELETE_USER_PATCH
   62531             :         PY_NETR_DELTA_DELETE_USER_PATCH(&netr_DELTA_DELETE_USER_Type);
   62532             : #endif
   62533             : #ifdef PY_NETR_USER_KEY16_PATCH
   62534             :         PY_NETR_USER_KEY16_PATCH(&netr_USER_KEY16_Type);
   62535             : #endif
   62536             : #ifdef PY_NETR_PASSWORDHISTORY_PATCH
   62537             :         PY_NETR_PASSWORDHISTORY_PATCH(&netr_PasswordHistory_Type);
   62538             : #endif
   62539             : #ifdef PY_NETR_USER_KEYS2_PATCH
   62540             :         PY_NETR_USER_KEYS2_PATCH(&netr_USER_KEYS2_Type);
   62541             : #endif
   62542             : #ifdef PY_NETR_USER_KEY_UNION_PATCH
   62543             :         PY_NETR_USER_KEY_UNION_PATCH(&netr_USER_KEY_UNION_Type);
   62544             : #endif
   62545             : #ifdef PY_NETR_USER_KEYS_PATCH
   62546             :         PY_NETR_USER_KEYS_PATCH(&netr_USER_KEYS_Type);
   62547             : #endif
   62548             : #ifdef PY_NETR_USER_PRIVATE_INFO_PATCH
   62549             :         PY_NETR_USER_PRIVATE_INFO_PATCH(&netr_USER_PRIVATE_INFO_Type);
   62550             : #endif
   62551             : #ifdef PY_NETR_DELTA_USER_PATCH
   62552             :         PY_NETR_DELTA_USER_PATCH(&netr_DELTA_USER_Type);
   62553             : #endif
   62554             : #ifdef PY_NETR_DELTA_DOMAIN_PATCH
   62555             :         PY_NETR_DELTA_DOMAIN_PATCH(&netr_DELTA_DOMAIN_Type);
   62556             : #endif
   62557             : #ifdef PY_NETR_DELTA_GROUP_PATCH
   62558             :         PY_NETR_DELTA_GROUP_PATCH(&netr_DELTA_GROUP_Type);
   62559             : #endif
   62560             : #ifdef PY_NETR_DELTA_RENAME_PATCH
   62561             :         PY_NETR_DELTA_RENAME_PATCH(&netr_DELTA_RENAME_Type);
   62562             : #endif
   62563             : #ifdef PY_NETR_DELTA_GROUP_MEMBER_PATCH
   62564             :         PY_NETR_DELTA_GROUP_MEMBER_PATCH(&netr_DELTA_GROUP_MEMBER_Type);
   62565             : #endif
   62566             : #ifdef PY_NETR_DELTA_ALIAS_PATCH
   62567             :         PY_NETR_DELTA_ALIAS_PATCH(&netr_DELTA_ALIAS_Type);
   62568             : #endif
   62569             : #ifdef PY_NETR_DELTA_ALIAS_MEMBER_PATCH
   62570             :         PY_NETR_DELTA_ALIAS_MEMBER_PATCH(&netr_DELTA_ALIAS_MEMBER_Type);
   62571             : #endif
   62572             : #ifdef PY_NETR_QUOTA_LIMITS_PATCH
   62573             :         PY_NETR_QUOTA_LIMITS_PATCH(&netr_QUOTA_LIMITS_Type);
   62574             : #endif
   62575             : #ifdef PY_NETR_DELTA_POLICY_PATCH
   62576             :         PY_NETR_DELTA_POLICY_PATCH(&netr_DELTA_POLICY_Type);
   62577             : #endif
   62578             : #ifdef PY_NETR_DELTA_TRUSTED_DOMAIN_PATCH
   62579             :         PY_NETR_DELTA_TRUSTED_DOMAIN_PATCH(&netr_DELTA_TRUSTED_DOMAIN_Type);
   62580             : #endif
   62581             : #ifdef PY_NETR_DELTA_ACCOUNT_PATCH
   62582             :         PY_NETR_DELTA_ACCOUNT_PATCH(&netr_DELTA_ACCOUNT_Type);
   62583             : #endif
   62584             : #ifdef PY_NETR_CIPHER_VALUE_PATCH
   62585             :         PY_NETR_CIPHER_VALUE_PATCH(&netr_CIPHER_VALUE_Type);
   62586             : #endif
   62587             : #ifdef PY_NETR_DELTA_SECRET_PATCH
   62588             :         PY_NETR_DELTA_SECRET_PATCH(&netr_DELTA_SECRET_Type);
   62589             : #endif
   62590             : #ifdef PY_NETR_DELTA_UNION_PATCH
   62591             :         PY_NETR_DELTA_UNION_PATCH(&netr_DELTA_UNION_Type);
   62592             : #endif
   62593             : #ifdef PY_NETR_DELTA_ID_UNION_PATCH
   62594             :         PY_NETR_DELTA_ID_UNION_PATCH(&netr_DELTA_ID_UNION_Type);
   62595             : #endif
   62596             : #ifdef PY_NETR_DELTA_ENUM_PATCH
   62597             :         PY_NETR_DELTA_ENUM_PATCH(&netr_DELTA_ENUM_Type);
   62598             : #endif
   62599             : #ifdef PY_NETR_DELTA_ENUM_ARRAY_PATCH
   62600             :         PY_NETR_DELTA_ENUM_ARRAY_PATCH(&netr_DELTA_ENUM_ARRAY_Type);
   62601             : #endif
   62602             : #ifdef PY_NETR_UAS_INFO_0_PATCH
   62603             :         PY_NETR_UAS_INFO_0_PATCH(&netr_UAS_INFO_0_Type);
   62604             : #endif
   62605             : #ifdef PY_NETR_ACCOUNTBUFFER_PATCH
   62606             :         PY_NETR_ACCOUNTBUFFER_PATCH(&netr_AccountBuffer_Type);
   62607             : #endif
   62608             : #ifdef PY_NETR_NETLOGON_INFO_1_PATCH
   62609             :         PY_NETR_NETLOGON_INFO_1_PATCH(&netr_NETLOGON_INFO_1_Type);
   62610             : #endif
   62611             : #ifdef PY_NETR_NETLOGON_INFO_2_PATCH
   62612             :         PY_NETR_NETLOGON_INFO_2_PATCH(&netr_NETLOGON_INFO_2_Type);
   62613             : #endif
   62614             : #ifdef PY_NETR_NETLOGON_INFO_3_PATCH
   62615             :         PY_NETR_NETLOGON_INFO_3_PATCH(&netr_NETLOGON_INFO_3_Type);
   62616             : #endif
   62617             : #ifdef PY_NETR_NETLOGON_INFO_4_PATCH
   62618             :         PY_NETR_NETLOGON_INFO_4_PATCH(&netr_NETLOGON_INFO_4_Type);
   62619             : #endif
   62620             : #ifdef PY_NETR_CONTROL_QUERY_INFORMATION_PATCH
   62621             :         PY_NETR_CONTROL_QUERY_INFORMATION_PATCH(&netr_CONTROL_QUERY_INFORMATION_Type);
   62622             : #endif
   62623             : #ifdef PY_NETR_CONTROL_DATA_INFORMATION_PATCH
   62624             :         PY_NETR_CONTROL_DATA_INFORMATION_PATCH(&netr_CONTROL_DATA_INFORMATION_Type);
   62625             : #endif
   62626             : #ifdef PY_NETR_CHANGELOGOBJECT_PATCH
   62627             :         PY_NETR_CHANGELOGOBJECT_PATCH(&netr_ChangeLogObject_Type);
   62628             : #endif
   62629             : #ifdef PY_NETR_CHANGELOGENTRY_PATCH
   62630             :         PY_NETR_CHANGELOGENTRY_PATCH(&netr_ChangeLogEntry_Type);
   62631             : #endif
   62632             : #ifdef PY_NETR_BLOB_PATCH
   62633             :         PY_NETR_BLOB_PATCH(&netr_Blob_Type);
   62634             : #endif
   62635             : #ifdef PY_NETR_DSRGETDCNAMEINFO_PATCH
   62636             :         PY_NETR_DSRGETDCNAMEINFO_PATCH(&netr_DsRGetDCNameInfo_Type);
   62637             : #endif
   62638             : #ifdef PY_NETR_CAPABILITIES_PATCH
   62639             :         PY_NETR_CAPABILITIES_PATCH(&netr_Capabilities_Type);
   62640             : #endif
   62641             : #ifdef PY_NETR_LSAPOLICYINFORMATION_PATCH
   62642             :         PY_NETR_LSAPOLICYINFORMATION_PATCH(&netr_LsaPolicyInformation_Type);
   62643             : #endif
   62644             : #ifdef PY_NETR_OSVERSIONINFOEX_PATCH
   62645             :         PY_NETR_OSVERSIONINFOEX_PATCH(&netr_OsVersionInfoEx_Type);
   62646             : #endif
   62647             : #ifdef PY_NETR_OSVERSION_PATCH
   62648             :         PY_NETR_OSVERSION_PATCH(&netr_OsVersion_Type);
   62649             : #endif
   62650             : #ifdef PY_NETR_OSVERSIONCONTAINER_PATCH
   62651             :         PY_NETR_OSVERSIONCONTAINER_PATCH(&netr_OsVersionContainer_Type);
   62652             : #endif
   62653             : #ifdef PY_NETR_WORKSTATIONINFORMATION_PATCH
   62654             :         PY_NETR_WORKSTATIONINFORMATION_PATCH(&netr_WorkstationInformation_Type);
   62655             : #endif
   62656             : #ifdef PY_NETR_WORKSTATIONINFO_PATCH
   62657             :         PY_NETR_WORKSTATIONINFO_PATCH(&netr_WorkstationInfo_Type);
   62658             : #endif
   62659             : #ifdef PY_NETR_TRUST_EXTENSION_INFO_PATCH
   62660             :         PY_NETR_TRUST_EXTENSION_INFO_PATCH(&netr_trust_extension_info_Type);
   62661             : #endif
   62662             : #ifdef PY_NETR_TRUST_EXTENSION_PATCH
   62663             :         PY_NETR_TRUST_EXTENSION_PATCH(&netr_trust_extension_Type);
   62664             : #endif
   62665             : #ifdef PY_NETR_TRUST_EXTENSION_CONTAINER_PATCH
   62666             :         PY_NETR_TRUST_EXTENSION_CONTAINER_PATCH(&netr_trust_extension_container_Type);
   62667             : #endif
   62668             : #ifdef PY_NETR_ONEDOMAININFO_PATCH
   62669             :         PY_NETR_ONEDOMAININFO_PATCH(&netr_OneDomainInfo_Type);
   62670             : #endif
   62671             : #ifdef PY_NETR_DOMAININFORMATION_PATCH
   62672             :         PY_NETR_DOMAININFORMATION_PATCH(&netr_DomainInformation_Type);
   62673             : #endif
   62674             : #ifdef PY_NETR_DOMAININFO_PATCH
   62675             :         PY_NETR_DOMAININFO_PATCH(&netr_DomainInfo_Type);
   62676             : #endif
   62677             : #ifdef PY_NL_PASSWORD_VERSION_PATCH
   62678             :         PY_NL_PASSWORD_VERSION_PATCH(&NL_PASSWORD_VERSION_Type);
   62679             : #endif
   62680             : #ifdef PY_NETR_CRYPTPASSWORD_PATCH
   62681             :         PY_NETR_CRYPTPASSWORD_PATCH(&netr_CryptPassword_Type);
   62682             : #endif
   62683             : #ifdef PY_NETR_SENDTOSAMRESETBADPASSWORDCOUNT_PATCH
   62684             :         PY_NETR_SENDTOSAMRESETBADPASSWORDCOUNT_PATCH(&netr_SendToSamResetBadPasswordCount_Type);
   62685             : #endif
   62686             : #ifdef PY_NETR_SENDTOSAMMESSAGE_PATCH
   62687             :         PY_NETR_SENDTOSAMMESSAGE_PATCH(&netr_SendToSamMessage_Type);
   62688             : #endif
   62689             : #ifdef PY_NETR_SENDTOSAMBASE_PATCH
   62690             :         PY_NETR_SENDTOSAMBASE_PATCH(&netr_SendToSamBase_Type);
   62691             : #endif
   62692             : #ifdef PY_NETR_DSRADDRESSTOSITENAMESWCTR_PATCH
   62693             :         PY_NETR_DSRADDRESSTOSITENAMESWCTR_PATCH(&netr_DsRAddressToSitenamesWCtr_Type);
   62694             : #endif
   62695             : #ifdef PY_NETR_DSRADDRESS_PATCH
   62696             :         PY_NETR_DSRADDRESS_PATCH(&netr_DsRAddress_Type);
   62697             : #endif
   62698             : #ifdef PY_NETR_DOMAINTRUST_PATCH
   62699             :         PY_NETR_DOMAINTRUST_PATCH(&netr_DomainTrust_Type);
   62700             : #endif
   62701             : #ifdef PY_NETR_DOMAINTRUSTLIST_PATCH
   62702             :         PY_NETR_DOMAINTRUSTLIST_PATCH(&netr_DomainTrustList_Type);
   62703             : #endif
   62704             : #ifdef PY_NETR_DSRADDRESSTOSITENAMESEXWCTR_PATCH
   62705             :         PY_NETR_DSRADDRESSTOSITENAMESEXWCTR_PATCH(&netr_DsRAddressToSitenamesExWCtr_Type);
   62706             : #endif
   62707             : #ifdef PY_DCSITESCTR_PATCH
   62708             :         PY_DCSITESCTR_PATCH(&DcSitesCtr_Type);
   62709             : #endif
   62710             : #ifdef PY_NETR_TRUSTINFO_PATCH
   62711             :         PY_NETR_TRUSTINFO_PATCH(&netr_TrustInfo_Type);
   62712             : #endif
   62713             : #ifdef PY_NL_DNS_NAME_INFO_PATCH
   62714             :         PY_NL_DNS_NAME_INFO_PATCH(&NL_DNS_NAME_INFO_Type);
   62715             : #endif
   62716             : #ifdef PY_NL_DNS_NAME_INFO_ARRAY_PATCH
   62717             :         PY_NL_DNS_NAME_INFO_ARRAY_PATCH(&NL_DNS_NAME_INFO_ARRAY_Type);
   62718             : #endif
   62719             : #ifdef PY_NETR_LOGONUASLOGON_PATCH
   62720             :         PY_NETR_LOGONUASLOGON_PATCH(&netr_LogonUasLogon_Type);
   62721             : #endif
   62722             : #ifdef PY_NETR_LOGONUASLOGOFF_PATCH
   62723             :         PY_NETR_LOGONUASLOGOFF_PATCH(&netr_LogonUasLogoff_Type);
   62724             : #endif
   62725             : #ifdef PY_NETR_LOGONSAMLOGON_PATCH
   62726             :         PY_NETR_LOGONSAMLOGON_PATCH(&netr_LogonSamLogon_Type);
   62727             : #endif
   62728             : #ifdef PY_NETR_LOGONSAMLOGOFF_PATCH
   62729             :         PY_NETR_LOGONSAMLOGOFF_PATCH(&netr_LogonSamLogoff_Type);
   62730             : #endif
   62731             : #ifdef PY_NETR_SERVERREQCHALLENGE_PATCH
   62732             :         PY_NETR_SERVERREQCHALLENGE_PATCH(&netr_ServerReqChallenge_Type);
   62733             : #endif
   62734             : #ifdef PY_NETR_SERVERAUTHENTICATE_PATCH
   62735             :         PY_NETR_SERVERAUTHENTICATE_PATCH(&netr_ServerAuthenticate_Type);
   62736             : #endif
   62737             : #ifdef PY_NETR_SERVERPASSWORDSET_PATCH
   62738             :         PY_NETR_SERVERPASSWORDSET_PATCH(&netr_ServerPasswordSet_Type);
   62739             : #endif
   62740             : #ifdef PY_NETR_DATABASEDELTAS_PATCH
   62741             :         PY_NETR_DATABASEDELTAS_PATCH(&netr_DatabaseDeltas_Type);
   62742             : #endif
   62743             : #ifdef PY_NETR_DATABASESYNC_PATCH
   62744             :         PY_NETR_DATABASESYNC_PATCH(&netr_DatabaseSync_Type);
   62745             : #endif
   62746             : #ifdef PY_NETR_ACCOUNTDELTAS_PATCH
   62747             :         PY_NETR_ACCOUNTDELTAS_PATCH(&netr_AccountDeltas_Type);
   62748             : #endif
   62749             : #ifdef PY_NETR_ACCOUNTSYNC_PATCH
   62750             :         PY_NETR_ACCOUNTSYNC_PATCH(&netr_AccountSync_Type);
   62751             : #endif
   62752             : #ifdef PY_NETR_GETDCNAME_PATCH
   62753             :         PY_NETR_GETDCNAME_PATCH(&netr_GetDcName_Type);
   62754             : #endif
   62755             : #ifdef PY_NETR_LOGONCONTROL_PATCH
   62756             :         PY_NETR_LOGONCONTROL_PATCH(&netr_LogonControl_Type);
   62757             : #endif
   62758             : #ifdef PY_NETR_GETANYDCNAME_PATCH
   62759             :         PY_NETR_GETANYDCNAME_PATCH(&netr_GetAnyDCName_Type);
   62760             : #endif
   62761             : #ifdef PY_NETR_LOGONCONTROL2_PATCH
   62762             :         PY_NETR_LOGONCONTROL2_PATCH(&netr_LogonControl2_Type);
   62763             : #endif
   62764             : #ifdef PY_NETR_SERVERAUTHENTICATE2_PATCH
   62765             :         PY_NETR_SERVERAUTHENTICATE2_PATCH(&netr_ServerAuthenticate2_Type);
   62766             : #endif
   62767             : #ifdef PY_NETR_DATABASESYNC2_PATCH
   62768             :         PY_NETR_DATABASESYNC2_PATCH(&netr_DatabaseSync2_Type);
   62769             : #endif
   62770             : #ifdef PY_NETR_DATABASEREDO_PATCH
   62771             :         PY_NETR_DATABASEREDO_PATCH(&netr_DatabaseRedo_Type);
   62772             : #endif
   62773             : #ifdef PY_NETR_LOGONCONTROL2EX_PATCH
   62774             :         PY_NETR_LOGONCONTROL2EX_PATCH(&netr_LogonControl2Ex_Type);
   62775             : #endif
   62776             : #ifdef PY_NETR_NETRENUMERATETRUSTEDDOMAINS_PATCH
   62777             :         PY_NETR_NETRENUMERATETRUSTEDDOMAINS_PATCH(&netr_NetrEnumerateTrustedDomains_Type);
   62778             : #endif
   62779             : #ifdef PY_NETR_DSRGETDCNAME_PATCH
   62780             :         PY_NETR_DSRGETDCNAME_PATCH(&netr_DsRGetDCName_Type);
   62781             : #endif
   62782             : #ifdef PY_NETR_LOGONGETCAPABILITIES_PATCH
   62783             :         PY_NETR_LOGONGETCAPABILITIES_PATCH(&netr_LogonGetCapabilities_Type);
   62784             : #endif
   62785             : #ifdef PY_NETR_LOGONGETTRUSTRID_PATCH
   62786             :         PY_NETR_LOGONGETTRUSTRID_PATCH(&netr_LogonGetTrustRid_Type);
   62787             : #endif
   62788             : #ifdef PY_NETR_SERVERAUTHENTICATE3_PATCH
   62789             :         PY_NETR_SERVERAUTHENTICATE3_PATCH(&netr_ServerAuthenticate3_Type);
   62790             : #endif
   62791             : #ifdef PY_NETR_DSRGETDCNAMEEX_PATCH
   62792             :         PY_NETR_DSRGETDCNAMEEX_PATCH(&netr_DsRGetDCNameEx_Type);
   62793             : #endif
   62794             : #ifdef PY_NETR_DSRGETSITENAME_PATCH
   62795             :         PY_NETR_DSRGETSITENAME_PATCH(&netr_DsRGetSiteName_Type);
   62796             : #endif
   62797             : #ifdef PY_NETR_LOGONGETDOMAININFO_PATCH
   62798             :         PY_NETR_LOGONGETDOMAININFO_PATCH(&netr_LogonGetDomainInfo_Type);
   62799             : #endif
   62800             : #ifdef PY_NETR_SERVERPASSWORDSET2_PATCH
   62801             :         PY_NETR_SERVERPASSWORDSET2_PATCH(&netr_ServerPasswordSet2_Type);
   62802             : #endif
   62803             : #ifdef PY_NETR_SERVERPASSWORDGET_PATCH
   62804             :         PY_NETR_SERVERPASSWORDGET_PATCH(&netr_ServerPasswordGet_Type);
   62805             : #endif
   62806             : #ifdef PY_NETR_NETRLOGONSENDTOSAM_PATCH
   62807             :         PY_NETR_NETRLOGONSENDTOSAM_PATCH(&netr_NetrLogonSendToSam_Type);
   62808             : #endif
   62809             : #ifdef PY_NETR_DSRADDRESSTOSITENAMESW_PATCH
   62810             :         PY_NETR_DSRADDRESSTOSITENAMESW_PATCH(&netr_DsRAddressToSitenamesW_Type);
   62811             : #endif
   62812             : #ifdef PY_NETR_DSRGETDCNAMEEX2_PATCH
   62813             :         PY_NETR_DSRGETDCNAMEEX2_PATCH(&netr_DsRGetDCNameEx2_Type);
   62814             : #endif
   62815             : #ifdef PY_NETR_NETRENUMERATETRUSTEDDOMAINSEX_PATCH
   62816             :         PY_NETR_NETRENUMERATETRUSTEDDOMAINSEX_PATCH(&netr_NetrEnumerateTrustedDomainsEx_Type);
   62817             : #endif
   62818             : #ifdef PY_NETR_DSRADDRESSTOSITENAMESEXW_PATCH
   62819             :         PY_NETR_DSRADDRESSTOSITENAMESEXW_PATCH(&netr_DsRAddressToSitenamesExW_Type);
   62820             : #endif
   62821             : #ifdef PY_NETR_DSRGETDCSITECOVERAGEW_PATCH
   62822             :         PY_NETR_DSRGETDCSITECOVERAGEW_PATCH(&netr_DsrGetDcSiteCoverageW_Type);
   62823             : #endif
   62824             : #ifdef PY_NETR_LOGONSAMLOGONEX_PATCH
   62825             :         PY_NETR_LOGONSAMLOGONEX_PATCH(&netr_LogonSamLogonEx_Type);
   62826             : #endif
   62827             : #ifdef PY_NETR_DSRENUMERATEDOMAINTRUSTS_PATCH
   62828             :         PY_NETR_DSRENUMERATEDOMAINTRUSTS_PATCH(&netr_DsrEnumerateDomainTrusts_Type);
   62829             : #endif
   62830             : #ifdef PY_NETR_DSRDEREGISTERDNSHOSTRECORDS_PATCH
   62831             :         PY_NETR_DSRDEREGISTERDNSHOSTRECORDS_PATCH(&netr_DsrDeregisterDNSHostRecords_Type);
   62832             : #endif
   62833             : #ifdef PY_NETR_SERVERTRUSTPASSWORDSGET_PATCH
   62834             :         PY_NETR_SERVERTRUSTPASSWORDSGET_PATCH(&netr_ServerTrustPasswordsGet_Type);
   62835             : #endif
   62836             : #ifdef PY_NETR_DSRGETFORESTTRUSTINFORMATION_PATCH
   62837             :         PY_NETR_DSRGETFORESTTRUSTINFORMATION_PATCH(&netr_DsRGetForestTrustInformation_Type);
   62838             : #endif
   62839             : #ifdef PY_NETR_GETFORESTTRUSTINFORMATION_PATCH
   62840             :         PY_NETR_GETFORESTTRUSTINFORMATION_PATCH(&netr_GetForestTrustInformation_Type);
   62841             : #endif
   62842             : #ifdef PY_NETR_LOGONSAMLOGONWITHFLAGS_PATCH
   62843             :         PY_NETR_LOGONSAMLOGONWITHFLAGS_PATCH(&netr_LogonSamLogonWithFlags_Type);
   62844             : #endif
   62845             : #ifdef PY_NETR_SERVERGETTRUSTINFO_PATCH
   62846             :         PY_NETR_SERVERGETTRUSTINFO_PATCH(&netr_ServerGetTrustInfo_Type);
   62847             : #endif
   62848             : #ifdef PY_NETR_UNUSED47_PATCH
   62849             :         PY_NETR_UNUSED47_PATCH(&netr_Unused47_Type);
   62850             : #endif
   62851             : #ifdef PY_NETR_DSRUPDATEREADONLYSERVERDNSRECORDS_PATCH
   62852             :         PY_NETR_DSRUPDATEREADONLYSERVERDNSRECORDS_PATCH(&netr_DsrUpdateReadOnlyServerDnsRecords_Type);
   62853             : #endif
   62854             : #ifdef PY_NETLOGON_PATCH
   62855             :         PY_NETLOGON_PATCH(&netlogon_InterfaceType);
   62856             : #endif
   62857             : #ifdef PY_NETLOGON_ABSTRACT_SYNTAX_PATCH
   62858             :         PY_NETLOGON_ABSTRACT_SYNTAX_PATCH(&netlogon_SyntaxType);
   62859             : #endif
   62860             : #ifdef PY_ABSTRACT_SYNTAX_PATCH
   62861             :         PY_ABSTRACT_SYNTAX_PATCH(&netlogon_SyntaxType);
   62862             : #endif
   62863             : 
   62864        3559 :         m = PyModule_Create(&moduledef);
   62865        3559 :         if (m == NULL)
   62866           0 :                 goto out;
   62867             : 
   62868        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_128BIT", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_STRONG_KEYS));
   62869        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_SCHANNEL", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_AUTHENTICATED_RPC));
   62870        3559 :         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_RETURN_FLAT_NAME|DS_RETURN_DNS_NAME)));
   62871        3559 :         PyModule_AddObject(m, "NETLOGON_PASSWORD_VERSION_NUMBER_PRESENT", PyLong_FromUnsignedLongLong(0x02231968));
   62872        3559 :         PyModule_AddObject(m, "DS_GFTI_UPDATE_TDO", PyLong_FromUnsignedLongLong(0x1));
   62873        3559 :         PyModule_AddObject(m, "MSV1_0_CLEARTEXT_PASSWORD_ALLOWED", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_CLEARTEXT_PASSWORD_ALLOWED));
   62874        3559 :         PyModule_AddObject(m, "MSV1_0_UPDATE_LOGON_STATISTICS", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_UPDATE_LOGON_STATISTICS));
   62875        3559 :         PyModule_AddObject(m, "MSV1_0_RETURN_USER_PARAMETERS", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_RETURN_USER_PARAMETERS));
   62876        3559 :         PyModule_AddObject(m, "MSV1_0_DONT_TRY_GUEST_ACCOUNT", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_DONT_TRY_GUEST_ACCOUNT));
   62877        3559 :         PyModule_AddObject(m, "MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT));
   62878        3559 :         PyModule_AddObject(m, "MSV1_0_RETURN_PASSWORD_EXPIRY", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_RETURN_PASSWORD_EXPIRY));
   62879        3559 :         PyModule_AddObject(m, "MSV1_0_USE_CLIENT_CHALLENGE", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_USE_CLIENT_CHALLENGE));
   62880        3559 :         PyModule_AddObject(m, "MSV1_0_TRY_GUEST_ACCOUNT_ONLY", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_TRY_GUEST_ACCOUNT_ONLY));
   62881        3559 :         PyModule_AddObject(m, "MSV1_0_RETURN_PROFILE_PATH", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_RETURN_PROFILE_PATH));
   62882        3559 :         PyModule_AddObject(m, "MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_TRY_SPECIFIED_DOMAIN_ONLY));
   62883        3559 :         PyModule_AddObject(m, "MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT));
   62884        3559 :         PyModule_AddObject(m, "MSV1_0_DISABLE_PERSONAL_FALLBACK", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_DISABLE_PERSONAL_FALLBACK));
   62885        3559 :         PyModule_AddObject(m, "MSV1_0_ALLOW_FORCE_GUEST", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_ALLOW_FORCE_GUEST));
   62886        3559 :         PyModule_AddObject(m, "MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_CLEARTEXT_PASSWORD_SUPPLIED));
   62887        3559 :         PyModule_AddObject(m, "MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_USE_DOMAIN_FOR_ROUTING_ONLY));
   62888        3559 :         PyModule_AddObject(m, "MSV1_0_ALLOW_MSVCHAPV2", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_ALLOW_MSVCHAPV2));
   62889        3559 :         PyModule_AddObject(m, "MSV1_0_S4U2SELF", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_S4U2SELF));
   62890        3559 :         PyModule_AddObject(m, "MSV1_0_CHECK_LOGONHOURS_FOR_S4U", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_CHECK_LOGONHOURS_FOR_S4U));
   62891        3559 :         PyModule_AddObject(m, "MSV1_0_SUBAUTHENTICATION_DLL_EX", PyLong_FromUnsignedLongLong((uint32_t)MSV1_0_SUBAUTHENTICATION_DLL_EX));
   62892        3559 :         PyModule_AddObject(m, "NetlogonInteractiveInformation", PyLong_FromLong((uint16_t)NetlogonInteractiveInformation));
   62893        3559 :         PyModule_AddObject(m, "NetlogonNetworkInformation", PyLong_FromLong((uint16_t)NetlogonNetworkInformation));
   62894        3559 :         PyModule_AddObject(m, "NetlogonServiceInformation", PyLong_FromLong((uint16_t)NetlogonServiceInformation));
   62895        3559 :         PyModule_AddObject(m, "NetlogonGenericInformation", PyLong_FromLong((uint16_t)NetlogonGenericInformation));
   62896        3559 :         PyModule_AddObject(m, "NetlogonInteractiveTransitiveInformation", PyLong_FromLong((uint16_t)NetlogonInteractiveTransitiveInformation));
   62897        3559 :         PyModule_AddObject(m, "NetlogonNetworkTransitiveInformation", PyLong_FromLong((uint16_t)NetlogonNetworkTransitiveInformation));
   62898        3559 :         PyModule_AddObject(m, "NetlogonServiceTransitiveInformation", PyLong_FromLong((uint16_t)NetlogonServiceTransitiveInformation));
   62899        3559 :         PyModule_AddObject(m, "NETLOGON_GUEST", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_GUEST));
   62900        3559 :         PyModule_AddObject(m, "NETLOGON_NOENCRYPTION", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NOENCRYPTION));
   62901        3559 :         PyModule_AddObject(m, "NETLOGON_CACHED_ACCOUNT", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CACHED_ACCOUNT));
   62902        3559 :         PyModule_AddObject(m, "NETLOGON_USED_LM_PASSWORD", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_USED_LM_PASSWORD));
   62903        3559 :         PyModule_AddObject(m, "NETLOGON_EXTRA_SIDS", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_EXTRA_SIDS));
   62904        3559 :         PyModule_AddObject(m, "NETLOGON_SUBAUTH_SESSION_KEY", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_SUBAUTH_SESSION_KEY));
   62905        3559 :         PyModule_AddObject(m, "NETLOGON_SERVER_TRUST_ACCOUNT", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_SERVER_TRUST_ACCOUNT));
   62906        3559 :         PyModule_AddObject(m, "NETLOGON_NTLMV2_ENABLED", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NTLMV2_ENABLED));
   62907        3559 :         PyModule_AddObject(m, "NETLOGON_RESOURCE_GROUPS", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_RESOURCE_GROUPS));
   62908        3559 :         PyModule_AddObject(m, "NETLOGON_PROFILE_PATH_RETURNED", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_PROFILE_PATH_RETURNED));
   62909        3559 :         PyModule_AddObject(m, "NETLOGON_GRACE_LOGON", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_GRACE_LOGON));
   62910        3559 :         PyModule_AddObject(m, "NetlogonValidationUasInfo", PyLong_FromLong((uint16_t)NetlogonValidationUasInfo));
   62911        3559 :         PyModule_AddObject(m, "NetlogonValidationSamInfo", PyLong_FromLong((uint16_t)NetlogonValidationSamInfo));
   62912        3559 :         PyModule_AddObject(m, "NetlogonValidationSamInfo2", PyLong_FromLong((uint16_t)NetlogonValidationSamInfo2));
   62913        3559 :         PyModule_AddObject(m, "NetlogonValidationGenericInfo2", PyLong_FromLong((uint16_t)NetlogonValidationGenericInfo2));
   62914        3559 :         PyModule_AddObject(m, "NetlogonValidationSamInfo4", PyLong_FromLong((uint16_t)NetlogonValidationSamInfo4));
   62915        3559 :         PyModule_AddObject(m, "NETR_DELTA_DOMAIN", PyLong_FromLong((uint16_t)NETR_DELTA_DOMAIN));
   62916        3559 :         PyModule_AddObject(m, "NETR_DELTA_GROUP", PyLong_FromLong((uint16_t)NETR_DELTA_GROUP));
   62917        3559 :         PyModule_AddObject(m, "NETR_DELTA_DELETE_GROUP", PyLong_FromLong((uint16_t)NETR_DELTA_DELETE_GROUP));
   62918        3559 :         PyModule_AddObject(m, "NETR_DELTA_RENAME_GROUP", PyLong_FromLong((uint16_t)NETR_DELTA_RENAME_GROUP));
   62919        3559 :         PyModule_AddObject(m, "NETR_DELTA_USER", PyLong_FromLong((uint16_t)NETR_DELTA_USER));
   62920        3559 :         PyModule_AddObject(m, "NETR_DELTA_DELETE_USER", PyLong_FromLong((uint16_t)NETR_DELTA_DELETE_USER));
   62921        3559 :         PyModule_AddObject(m, "NETR_DELTA_RENAME_USER", PyLong_FromLong((uint16_t)NETR_DELTA_RENAME_USER));
   62922        3559 :         PyModule_AddObject(m, "NETR_DELTA_GROUP_MEMBER", PyLong_FromLong((uint16_t)NETR_DELTA_GROUP_MEMBER));
   62923        3559 :         PyModule_AddObject(m, "NETR_DELTA_ALIAS", PyLong_FromLong((uint16_t)NETR_DELTA_ALIAS));
   62924        3559 :         PyModule_AddObject(m, "NETR_DELTA_DELETE_ALIAS", PyLong_FromLong((uint16_t)NETR_DELTA_DELETE_ALIAS));
   62925        3559 :         PyModule_AddObject(m, "NETR_DELTA_RENAME_ALIAS", PyLong_FromLong((uint16_t)NETR_DELTA_RENAME_ALIAS));
   62926        3559 :         PyModule_AddObject(m, "NETR_DELTA_ALIAS_MEMBER", PyLong_FromLong((uint16_t)NETR_DELTA_ALIAS_MEMBER));
   62927        3559 :         PyModule_AddObject(m, "NETR_DELTA_POLICY", PyLong_FromLong((uint16_t)NETR_DELTA_POLICY));
   62928        3559 :         PyModule_AddObject(m, "NETR_DELTA_TRUSTED_DOMAIN", PyLong_FromLong((uint16_t)NETR_DELTA_TRUSTED_DOMAIN));
   62929        3559 :         PyModule_AddObject(m, "NETR_DELTA_DELETE_TRUST", PyLong_FromLong((uint16_t)NETR_DELTA_DELETE_TRUST));
   62930        3559 :         PyModule_AddObject(m, "NETR_DELTA_ACCOUNT", PyLong_FromLong((uint16_t)NETR_DELTA_ACCOUNT));
   62931        3559 :         PyModule_AddObject(m, "NETR_DELTA_DELETE_ACCOUNT", PyLong_FromLong((uint16_t)NETR_DELTA_DELETE_ACCOUNT));
   62932        3559 :         PyModule_AddObject(m, "NETR_DELTA_SECRET", PyLong_FromLong((uint16_t)NETR_DELTA_SECRET));
   62933        3559 :         PyModule_AddObject(m, "NETR_DELTA_DELETE_SECRET", PyLong_FromLong((uint16_t)NETR_DELTA_DELETE_SECRET));
   62934        3559 :         PyModule_AddObject(m, "NETR_DELTA_DELETE_GROUP2", PyLong_FromLong((uint16_t)NETR_DELTA_DELETE_GROUP2));
   62935        3559 :         PyModule_AddObject(m, "NETR_DELTA_DELETE_USER2", PyLong_FromLong((uint16_t)NETR_DELTA_DELETE_USER2));
   62936        3559 :         PyModule_AddObject(m, "NETR_DELTA_MODIFY_COUNT", PyLong_FromLong((uint16_t)NETR_DELTA_MODIFY_COUNT));
   62937        3559 :         PyModule_AddObject(m, "NETLOGON_REPLICATION_NEEDED", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_REPLICATION_NEEDED));
   62938        3559 :         PyModule_AddObject(m, "NETLOGON_REPLICATION_IN_PROGRESS", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_REPLICATION_IN_PROGRESS));
   62939        3559 :         PyModule_AddObject(m, "NETLOGON_FULL_SYNC_REPLICATION", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_FULL_SYNC_REPLICATION));
   62940        3559 :         PyModule_AddObject(m, "NETLOGON_REDO_NEEDED", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_REDO_NEEDED));
   62941        3559 :         PyModule_AddObject(m, "NETLOGON_HAS_IP", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_HAS_IP));
   62942        3559 :         PyModule_AddObject(m, "NETLOGON_HAS_TIMESERV", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_HAS_TIMESERV));
   62943        3559 :         PyModule_AddObject(m, "NETLOGON_DNS_UPDATE_FAILURE", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_DNS_UPDATE_FAILURE));
   62944        3559 :         PyModule_AddObject(m, "NETLOGON_VERIFY_STATUS_RETURNED", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_VERIFY_STATUS_RETURNED));
   62945        3559 :         PyModule_AddObject(m, "NETLOGON_CONTROL_QUERY", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_QUERY));
   62946        3559 :         PyModule_AddObject(m, "NETLOGON_CONTROL_REPLICATE", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_REPLICATE));
   62947        3559 :         PyModule_AddObject(m, "NETLOGON_CONTROL_SYNCHRONIZE", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_SYNCHRONIZE));
   62948        3559 :         PyModule_AddObject(m, "NETLOGON_CONTROL_PDC_REPLICATE", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_PDC_REPLICATE));
   62949        3559 :         PyModule_AddObject(m, "NETLOGON_CONTROL_REDISCOVER", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_REDISCOVER));
   62950        3559 :         PyModule_AddObject(m, "NETLOGON_CONTROL_TC_QUERY", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_TC_QUERY));
   62951        3559 :         PyModule_AddObject(m, "NETLOGON_CONTROL_TRANSPORT_NOTIFY", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_TRANSPORT_NOTIFY));
   62952        3559 :         PyModule_AddObject(m, "NETLOGON_CONTROL_FIND_USER", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_FIND_USER));
   62953        3559 :         PyModule_AddObject(m, "NETLOGON_CONTROL_CHANGE_PASSWORD", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_CHANGE_PASSWORD));
   62954        3559 :         PyModule_AddObject(m, "NETLOGON_CONTROL_TC_VERIFY", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_TC_VERIFY));
   62955        3559 :         PyModule_AddObject(m, "NETLOGON_CONTROL_FORCE_DNS_REG", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_FORCE_DNS_REG));
   62956        3559 :         PyModule_AddObject(m, "NETLOGON_CONTROL_QUERY_DNS_REG", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_QUERY_DNS_REG));
   62957        3559 :         PyModule_AddObject(m, "NETLOGON_CONTROL_BACKUP_CHANGE_LOG", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_BACKUP_CHANGE_LOG));
   62958        3559 :         PyModule_AddObject(m, "NETLOGON_CONTROL_TRUNCATE_LOG", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_TRUNCATE_LOG));
   62959        3559 :         PyModule_AddObject(m, "NETLOGON_CONTROL_SET_DBFLAG", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_SET_DBFLAG));
   62960        3559 :         PyModule_AddObject(m, "NETLOGON_CONTROL_BREAKPOINT", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_CONTROL_BREAKPOINT));
   62961        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_ACCOUNT_LOCKOUT", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_ACCOUNT_LOCKOUT));
   62962        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_PERSISTENT_SAMREPL", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_PERSISTENT_SAMREPL));
   62963        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_ARCFOUR", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_ARCFOUR));
   62964        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_PROMOTION_COUNT", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_PROMOTION_COUNT));
   62965        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_CHANGELOG_BDC", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_CHANGELOG_BDC));
   62966        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_FULL_SYNC_REPL", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_FULL_SYNC_REPL));
   62967        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_MULTIPLE_SIDS", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_MULTIPLE_SIDS));
   62968        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_REDO", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_REDO));
   62969        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_PASSWORD_CHANGE_REFUSAL));
   62970        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_SEND_PASSWORD_INFO_PDC", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_SEND_PASSWORD_INFO_PDC));
   62971        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_GENERIC_PASSTHROUGH", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_GENERIC_PASSTHROUGH));
   62972        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_CONCURRENT_RPC", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_CONCURRENT_RPC));
   62973        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL));
   62974        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL));
   62975        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_STRONG_KEYS", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_STRONG_KEYS));
   62976        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_TRANSITIVE_TRUSTS", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_TRANSITIVE_TRUSTS));
   62977        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_DNS_DOMAIN_TRUSTS", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_DNS_DOMAIN_TRUSTS));
   62978        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_PASSWORD_SET2", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_PASSWORD_SET2));
   62979        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_GETDOMAININFO", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_GETDOMAININFO));
   62980        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_CROSS_FOREST_TRUSTS", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_CROSS_FOREST_TRUSTS));
   62981        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION));
   62982        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_RODC_PASSTHROUGH", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_RODC_PASSTHROUGH));
   62983        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_SUPPORTS_AES_SHA2", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_SUPPORTS_AES_SHA2));
   62984        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_SUPPORTS_AES", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_SUPPORTS_AES));
   62985        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_AUTHENTICATED_RPC_LSASS", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_AUTHENTICATED_RPC_LSASS));
   62986        3559 :         PyModule_AddObject(m, "NETLOGON_NEG_AUTHENTICATED_RPC", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_NEG_AUTHENTICATED_RPC));
   62987        3559 :         PyModule_AddObject(m, "SYNCSTATE_NORMAL_STATE", PyLong_FromLong((uint16_t)SYNCSTATE_NORMAL_STATE));
   62988        3559 :         PyModule_AddObject(m, "SYNCSTATE_DOMAIN_STATE", PyLong_FromLong((uint16_t)SYNCSTATE_DOMAIN_STATE));
   62989        3559 :         PyModule_AddObject(m, "SYNCSTATE_GROUP_STATE", PyLong_FromLong((uint16_t)SYNCSTATE_GROUP_STATE));
   62990        3559 :         PyModule_AddObject(m, "SYNCSTATE_UAS_BUILT_IN_GROUP_STATE", PyLong_FromLong((uint16_t)SYNCSTATE_UAS_BUILT_IN_GROUP_STATE));
   62991        3559 :         PyModule_AddObject(m, "SYNCSTATE_USER_STATE", PyLong_FromLong((uint16_t)SYNCSTATE_USER_STATE));
   62992        3559 :         PyModule_AddObject(m, "SYNCSTATE_GROUP_MEMBER_STATE", PyLong_FromLong((uint16_t)SYNCSTATE_GROUP_MEMBER_STATE));
   62993        3559 :         PyModule_AddObject(m, "SYNCSTATE_ALIAS_STATE", PyLong_FromLong((uint16_t)SYNCSTATE_ALIAS_STATE));
   62994        3559 :         PyModule_AddObject(m, "SYNCSTATE_ALIAS_MEMBER_STATE", PyLong_FromLong((uint16_t)SYNCSTATE_ALIAS_MEMBER_STATE));
   62995        3559 :         PyModule_AddObject(m, "SYNCSTATE_SAM_DONE_STATE", PyLong_FromLong((uint16_t)SYNCSTATE_SAM_DONE_STATE));
   62996        3559 :         PyModule_AddObject(m, "NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED", PyLong_FromLong((uint16_t)NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED));
   62997        3559 :         PyModule_AddObject(m, "NETR_CHANGELOG_CHANGED_PASSWORD", PyLong_FromLong((uint16_t)NETR_CHANGELOG_CHANGED_PASSWORD));
   62998        3559 :         PyModule_AddObject(m, "NETR_CHANGELOG_SID_INCLUDED", PyLong_FromLong((uint16_t)NETR_CHANGELOG_SID_INCLUDED));
   62999        3559 :         PyModule_AddObject(m, "NETR_CHANGELOG_NAME_INCLUDED", PyLong_FromLong((uint16_t)NETR_CHANGELOG_NAME_INCLUDED));
   63000        3559 :         PyModule_AddObject(m, "NETR_CHANGELOG_FIRST_PROMOTION_OBJ", PyLong_FromLong((uint16_t)NETR_CHANGELOG_FIRST_PROMOTION_OBJ));
   63001        3559 :         PyModule_AddObject(m, "DS_FORCE_REDISCOVERY", PyLong_FromUnsignedLongLong((uint32_t)DS_FORCE_REDISCOVERY));
   63002        3559 :         PyModule_AddObject(m, "DS_DIRECTORY_SERVICE_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)DS_DIRECTORY_SERVICE_REQUIRED));
   63003        3559 :         PyModule_AddObject(m, "DS_DIRECTORY_SERVICE_PREFERRED", PyLong_FromUnsignedLongLong((uint32_t)DS_DIRECTORY_SERVICE_PREFERRED));
   63004        3559 :         PyModule_AddObject(m, "DS_GC_SERVER_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)DS_GC_SERVER_REQUIRED));
   63005        3559 :         PyModule_AddObject(m, "DS_PDC_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)DS_PDC_REQUIRED));
   63006        3559 :         PyModule_AddObject(m, "DS_BACKGROUND_ONLY", PyLong_FromUnsignedLongLong((uint32_t)DS_BACKGROUND_ONLY));
   63007        3559 :         PyModule_AddObject(m, "DS_IP_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)DS_IP_REQUIRED));
   63008        3559 :         PyModule_AddObject(m, "DS_KDC_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)DS_KDC_REQUIRED));
   63009        3559 :         PyModule_AddObject(m, "DS_TIMESERV_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)DS_TIMESERV_REQUIRED));
   63010        3559 :         PyModule_AddObject(m, "DS_WRITABLE_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)DS_WRITABLE_REQUIRED));
   63011        3559 :         PyModule_AddObject(m, "DS_GOOD_TIMESERV_PREFERRED", PyLong_FromUnsignedLongLong((uint32_t)DS_GOOD_TIMESERV_PREFERRED));
   63012        3559 :         PyModule_AddObject(m, "DS_AVOID_SELF", PyLong_FromUnsignedLongLong((uint32_t)DS_AVOID_SELF));
   63013        3559 :         PyModule_AddObject(m, "DS_ONLY_LDAP_NEEDED", PyLong_FromUnsignedLongLong((uint32_t)DS_ONLY_LDAP_NEEDED));
   63014        3559 :         PyModule_AddObject(m, "DS_IS_FLAT_NAME", PyLong_FromUnsignedLongLong((uint32_t)DS_IS_FLAT_NAME));
   63015        3559 :         PyModule_AddObject(m, "DS_IS_DNS_NAME", PyLong_FromUnsignedLongLong((uint32_t)DS_IS_DNS_NAME));
   63016        3559 :         PyModule_AddObject(m, "DS_TRY_NEXTCLOSEST_SITE", PyLong_FromUnsignedLongLong((uint32_t)DS_TRY_NEXTCLOSEST_SITE));
   63017        3559 :         PyModule_AddObject(m, "DS_DIRECTORY_SERVICE_6_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)DS_DIRECTORY_SERVICE_6_REQUIRED));
   63018        3559 :         PyModule_AddObject(m, "DS_WEB_SERVICE_REQUIRED", PyLong_FromUnsignedLongLong((uint32_t)DS_WEB_SERVICE_REQUIRED));
   63019        3559 :         PyModule_AddObject(m, "DS_RETURN_DNS_NAME", PyLong_FromUnsignedLongLong((uint32_t)DS_RETURN_DNS_NAME));
   63020        3559 :         PyModule_AddObject(m, "DS_RETURN_FLAT_NAME", PyLong_FromUnsignedLongLong((uint32_t)DS_RETURN_FLAT_NAME));
   63021        3559 :         PyModule_AddObject(m, "DS_ADDRESS_TYPE_INET", PyLong_FromUnsignedLongLong((uint32_t)DS_ADDRESS_TYPE_INET));
   63022        3559 :         PyModule_AddObject(m, "DS_ADDRESS_TYPE_NETBIOS", PyLong_FromUnsignedLongLong((uint32_t)DS_ADDRESS_TYPE_NETBIOS));
   63023        3559 :         PyModule_AddObject(m, "DS_SERVER_PDC", PyLong_FromUnsignedLongLong((uint32_t)DS_SERVER_PDC));
   63024        3559 :         PyModule_AddObject(m, "DS_SERVER_GC", PyLong_FromUnsignedLongLong((uint32_t)DS_SERVER_GC));
   63025        3559 :         PyModule_AddObject(m, "DS_SERVER_LDAP", PyLong_FromUnsignedLongLong((uint32_t)DS_SERVER_LDAP));
   63026        3559 :         PyModule_AddObject(m, "DS_SERVER_DS", PyLong_FromUnsignedLongLong((uint32_t)DS_SERVER_DS));
   63027        3559 :         PyModule_AddObject(m, "DS_SERVER_KDC", PyLong_FromUnsignedLongLong((uint32_t)DS_SERVER_KDC));
   63028        3559 :         PyModule_AddObject(m, "DS_SERVER_TIMESERV", PyLong_FromUnsignedLongLong((uint32_t)DS_SERVER_TIMESERV));
   63029        3559 :         PyModule_AddObject(m, "DS_SERVER_CLOSEST", PyLong_FromUnsignedLongLong((uint32_t)DS_SERVER_CLOSEST));
   63030        3559 :         PyModule_AddObject(m, "DS_SERVER_WRITABLE", PyLong_FromUnsignedLongLong((uint32_t)DS_SERVER_WRITABLE));
   63031        3559 :         PyModule_AddObject(m, "DS_SERVER_GOOD_TIMESERV", PyLong_FromUnsignedLongLong((uint32_t)DS_SERVER_GOOD_TIMESERV));
   63032        3559 :         PyModule_AddObject(m, "DS_SERVER_NDNC", PyLong_FromUnsignedLongLong((uint32_t)DS_SERVER_NDNC));
   63033        3559 :         PyModule_AddObject(m, "DS_SERVER_SELECT_SECRET_DOMAIN_6", PyLong_FromUnsignedLongLong((uint32_t)DS_SERVER_SELECT_SECRET_DOMAIN_6));
   63034        3559 :         PyModule_AddObject(m, "DS_SERVER_FULL_SECRET_DOMAIN_6", PyLong_FromUnsignedLongLong((uint32_t)DS_SERVER_FULL_SECRET_DOMAIN_6));
   63035        3559 :         PyModule_AddObject(m, "DS_SERVER_WEBSERV", PyLong_FromUnsignedLongLong((uint32_t)DS_SERVER_WEBSERV));
   63036        3559 :         PyModule_AddObject(m, "DS_SERVER_DS_8", PyLong_FromUnsignedLongLong((uint32_t)DS_SERVER_DS_8));
   63037        3559 :         PyModule_AddObject(m, "DS_DNS_CONTROLLER", PyLong_FromUnsignedLongLong((uint32_t)DS_DNS_CONTROLLER));
   63038        3559 :         PyModule_AddObject(m, "DS_DNS_DOMAIN", PyLong_FromUnsignedLongLong((uint32_t)DS_DNS_DOMAIN));
   63039        3559 :         PyModule_AddObject(m, "DS_DNS_FOREST_ROOT", PyLong_FromUnsignedLongLong((uint32_t)DS_DNS_FOREST_ROOT));
   63040        3559 :         PyModule_AddObject(m, "NETR_TRUST_FLAG_IN_FOREST", PyLong_FromUnsignedLongLong((uint32_t)NETR_TRUST_FLAG_IN_FOREST));
   63041        3559 :         PyModule_AddObject(m, "NETR_TRUST_FLAG_OUTBOUND", PyLong_FromUnsignedLongLong((uint32_t)NETR_TRUST_FLAG_OUTBOUND));
   63042        3559 :         PyModule_AddObject(m, "NETR_TRUST_FLAG_TREEROOT", PyLong_FromUnsignedLongLong((uint32_t)NETR_TRUST_FLAG_TREEROOT));
   63043        3559 :         PyModule_AddObject(m, "NETR_TRUST_FLAG_PRIMARY", PyLong_FromUnsignedLongLong((uint32_t)NETR_TRUST_FLAG_PRIMARY));
   63044        3559 :         PyModule_AddObject(m, "NETR_TRUST_FLAG_NATIVE", PyLong_FromUnsignedLongLong((uint32_t)NETR_TRUST_FLAG_NATIVE));
   63045        3559 :         PyModule_AddObject(m, "NETR_TRUST_FLAG_INBOUND", PyLong_FromUnsignedLongLong((uint32_t)NETR_TRUST_FLAG_INBOUND));
   63046        3559 :         PyModule_AddObject(m, "NETR_TRUST_FLAG_MIT_KRB5", PyLong_FromUnsignedLongLong((uint32_t)NETR_TRUST_FLAG_MIT_KRB5));
   63047        3559 :         PyModule_AddObject(m, "NETR_TRUST_FLAG_AES", PyLong_FromUnsignedLongLong((uint32_t)NETR_TRUST_FLAG_AES));
   63048        3559 :         PyModule_AddObject(m, "NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS", PyLong_FromUnsignedLongLong((uint32_t)NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS));
   63049        3559 :         PyModule_AddObject(m, "NETR_WS_FLAG_HANDLES_SPN_UPDATE", PyLong_FromUnsignedLongLong((uint32_t)NETR_WS_FLAG_HANDLES_SPN_UPDATE));
   63050        3559 :         PyModule_AddObject(m, "NETR_VER_SUITE_BACKOFFICE", PyLong_FromLong((uint16_t)NETR_VER_SUITE_BACKOFFICE));
   63051        3559 :         PyModule_AddObject(m, "NETR_VER_SUITE_BLADE", PyLong_FromLong((uint16_t)NETR_VER_SUITE_BLADE));
   63052        3559 :         PyModule_AddObject(m, "NETR_VER_SUITE_COMPUTE_SERVER", PyLong_FromLong((uint16_t)NETR_VER_SUITE_COMPUTE_SERVER));
   63053        3559 :         PyModule_AddObject(m, "NETR_VER_SUITE_DATACENTER", PyLong_FromLong((uint16_t)NETR_VER_SUITE_DATACENTER));
   63054        3559 :         PyModule_AddObject(m, "NETR_VER_SUITE_ENTERPRISE", PyLong_FromLong((uint16_t)NETR_VER_SUITE_ENTERPRISE));
   63055        3559 :         PyModule_AddObject(m, "NETR_VER_SUITE_EMBEDDEDNT", PyLong_FromLong((uint16_t)NETR_VER_SUITE_EMBEDDEDNT));
   63056        3559 :         PyModule_AddObject(m, "NETR_VER_SUITE_PERSONAL", PyLong_FromLong((uint16_t)NETR_VER_SUITE_PERSONAL));
   63057        3559 :         PyModule_AddObject(m, "NETR_VER_SUITE_SINGLEUSERTS", PyLong_FromLong((uint16_t)NETR_VER_SUITE_SINGLEUSERTS));
   63058        3559 :         PyModule_AddObject(m, "NETR_VER_SUITE_SMALLBUSINESS", PyLong_FromLong((uint16_t)NETR_VER_SUITE_SMALLBUSINESS));
   63059        3559 :         PyModule_AddObject(m, "NETR_VER_SUITE_SMALLBUSINESS_RESTRICTED", PyLong_FromLong((uint16_t)NETR_VER_SUITE_SMALLBUSINESS_RESTRICTED));
   63060        3559 :         PyModule_AddObject(m, "NETR_VER_SUITE_STORAGE_SERVER", PyLong_FromLong((uint16_t)NETR_VER_SUITE_STORAGE_SERVER));
   63061        3559 :         PyModule_AddObject(m, "NETR_VER_SUITE_TERMINAL", PyLong_FromLong((uint16_t)NETR_VER_SUITE_TERMINAL));
   63062        3559 :         PyModule_AddObject(m, "NETR_VER_SUITE_WH_SERVER", PyLong_FromLong((uint16_t)NETR_VER_SUITE_WH_SERVER));
   63063        3559 :         PyModule_AddObject(m, "NETR_VER_NT_DOMAIN_CONTROLLER", PyLong_FromLong((uint16_t)NETR_VER_NT_DOMAIN_CONTROLLER));
   63064        3559 :         PyModule_AddObject(m, "NETR_VER_NT_SERVER", PyLong_FromLong((uint16_t)NETR_VER_NT_SERVER));
   63065        3559 :         PyModule_AddObject(m, "NETR_VER_NT_WORKSTATION", PyLong_FromLong((uint16_t)NETR_VER_NT_WORKSTATION));
   63066        3559 :         PyModule_AddObject(m, "SendToSamUpdatePassword", PyLong_FromLong((uint16_t)SendToSamUpdatePassword));
   63067        3559 :         PyModule_AddObject(m, "SendToSamResetBadPasswordCount", PyLong_FromLong((uint16_t)SendToSamResetBadPasswordCount));
   63068        3559 :         PyModule_AddObject(m, "SendToSamUpdatePasswordForward", PyLong_FromLong((uint16_t)SendToSamUpdatePasswordForward));
   63069        3559 :         PyModule_AddObject(m, "SendToSamUpdateLastLogonTimestamp", PyLong_FromLong((uint16_t)SendToSamUpdateLastLogonTimestamp));
   63070        3559 :         PyModule_AddObject(m, "SendToSamResetSmartCardPassword", PyLong_FromLong((uint16_t)SendToSamResetSmartCardPassword));
   63071        3559 :         PyModule_AddObject(m, "NETLOGON_SAMLOGON_FLAG_PASS_TO_FOREST_ROOT", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_SAMLOGON_FLAG_PASS_TO_FOREST_ROOT));
   63072        3559 :         PyModule_AddObject(m, "NETLOGON_SAMLOGON_FLAG_PASS_CROSS_FOREST_HOP", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_SAMLOGON_FLAG_PASS_CROSS_FOREST_HOP));
   63073        3559 :         PyModule_AddObject(m, "NETLOGON_SAMLOGON_FLAG_RODC_TO_OTHER_DOMAIN", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_SAMLOGON_FLAG_RODC_TO_OTHER_DOMAIN));
   63074        3559 :         PyModule_AddObject(m, "NETLOGON_SAMLOGON_FLAG_RODC_NTLM_REQUEST", PyLong_FromUnsignedLongLong((uint32_t)NETLOGON_SAMLOGON_FLAG_RODC_NTLM_REQUEST));
   63075        3559 :         PyModule_AddObject(m, "NlDnsLdapAtSite", PyLong_FromLong((uint16_t)NlDnsLdapAtSite));
   63076        3559 :         PyModule_AddObject(m, "NlDnsGcAtSite", PyLong_FromLong((uint16_t)NlDnsGcAtSite));
   63077        3559 :         PyModule_AddObject(m, "NlDnsDsaCname", PyLong_FromLong((uint16_t)NlDnsDsaCname));
   63078        3559 :         PyModule_AddObject(m, "NlDnsKdcAtSite", PyLong_FromLong((uint16_t)NlDnsKdcAtSite));
   63079        3559 :         PyModule_AddObject(m, "NlDnsDcAtSite", PyLong_FromLong((uint16_t)NlDnsDcAtSite));
   63080        3559 :         PyModule_AddObject(m, "NlDnsRfc1510KdcAtSite", PyLong_FromLong((uint16_t)NlDnsRfc1510KdcAtSite));
   63081        3559 :         PyModule_AddObject(m, "NlDnsGenericGcAtSite", PyLong_FromLong((uint16_t)NlDnsGenericGcAtSite));
   63082        3559 :         PyModule_AddObject(m, "NlDnsInfoTypeNone", PyLong_FromLong((uint16_t)NlDnsInfoTypeNone));
   63083        3559 :         PyModule_AddObject(m, "NlDnsDomainName", PyLong_FromLong((uint16_t)NlDnsDomainName));
   63084        3559 :         PyModule_AddObject(m, "NlDnsDomainNameAlias", PyLong_FromLong((uint16_t)NlDnsDomainNameAlias));
   63085        3559 :         PyModule_AddObject(m, "NlDnsForestName", PyLong_FromLong((uint16_t)NlDnsForestName));
   63086        3559 :         PyModule_AddObject(m, "NlDnsForestNameAlias", PyLong_FromLong((uint16_t)NlDnsForestNameAlias));
   63087        3559 :         PyModule_AddObject(m, "NlDnsNdncDomainName", PyLong_FromLong((uint16_t)NlDnsNdncDomainName));
   63088        3559 :         PyModule_AddObject(m, "NlDnsRecordName", PyLong_FromLong((uint16_t)NlDnsRecordName));
   63089        3559 :         Py_INCREF((PyObject *)(void *)&netr_UasInfo_Type);
   63090        3559 :         PyModule_AddObject(m, "netr_UasInfo", (PyObject *)(void *)&netr_UasInfo_Type);
   63091        3559 :         Py_INCREF((PyObject *)(void *)&netr_UasLogoffInfo_Type);
   63092        3559 :         PyModule_AddObject(m, "netr_UasLogoffInfo", (PyObject *)(void *)&netr_UasLogoffInfo_Type);
   63093        3559 :         Py_INCREF((PyObject *)(void *)&netr_AcctLockStr_Type);
   63094        3559 :         PyModule_AddObject(m, "netr_AcctLockStr", (PyObject *)(void *)&netr_AcctLockStr_Type);
   63095        3559 :         Py_INCREF((PyObject *)(void *)&netr_IdentityInfo_Type);
   63096        3559 :         PyModule_AddObject(m, "netr_IdentityInfo", (PyObject *)(void *)&netr_IdentityInfo_Type);
   63097        3559 :         Py_INCREF((PyObject *)(void *)&netr_PasswordInfo_Type);
   63098        3559 :         PyModule_AddObject(m, "netr_PasswordInfo", (PyObject *)(void *)&netr_PasswordInfo_Type);
   63099        3559 :         Py_INCREF((PyObject *)(void *)&netr_ChallengeResponse_Type);
   63100        3559 :         PyModule_AddObject(m, "netr_ChallengeResponse", (PyObject *)(void *)&netr_ChallengeResponse_Type);
   63101        3559 :         Py_INCREF((PyObject *)(void *)&netr_NetworkInfo_Type);
   63102        3559 :         PyModule_AddObject(m, "netr_NetworkInfo", (PyObject *)(void *)&netr_NetworkInfo_Type);
   63103        3559 :         Py_INCREF((PyObject *)(void *)&netr_GenericInfo_Type);
   63104        3559 :         PyModule_AddObject(m, "netr_GenericInfo", (PyObject *)(void *)&netr_GenericInfo_Type);
   63105        3559 :         Py_INCREF((PyObject *)(void *)&netr_LogonLevel_Type);
   63106        3559 :         PyModule_AddObject(m, "netr_LogonLevel", (PyObject *)(void *)&netr_LogonLevel_Type);
   63107        3559 :         Py_INCREF((PyObject *)(void *)&netr_UserSessionKey_Type);
   63108        3559 :         PyModule_AddObject(m, "netr_UserSessionKey", (PyObject *)(void *)&netr_UserSessionKey_Type);
   63109        3559 :         Py_INCREF((PyObject *)(void *)&netr_LMSessionKey_Type);
   63110        3559 :         PyModule_AddObject(m, "netr_LMSessionKey", (PyObject *)(void *)&netr_LMSessionKey_Type);
   63111        3559 :         Py_INCREF((PyObject *)(void *)&netr_SamBaseInfo_Type);
   63112        3559 :         PyModule_AddObject(m, "netr_SamBaseInfo", (PyObject *)(void *)&netr_SamBaseInfo_Type);
   63113        3559 :         Py_INCREF((PyObject *)(void *)&netr_SamInfo2_Type);
   63114        3559 :         PyModule_AddObject(m, "netr_SamInfo2", (PyObject *)(void *)&netr_SamInfo2_Type);
   63115        3559 :         Py_INCREF((PyObject *)(void *)&netr_SidAttr_Type);
   63116        3559 :         PyModule_AddObject(m, "netr_SidAttr", (PyObject *)(void *)&netr_SidAttr_Type);
   63117        3559 :         Py_INCREF((PyObject *)(void *)&netr_SamInfo3_Type);
   63118        3559 :         PyModule_AddObject(m, "netr_SamInfo3", (PyObject *)(void *)&netr_SamInfo3_Type);
   63119        3559 :         Py_INCREF((PyObject *)(void *)&netr_SamInfo6_Type);
   63120        3559 :         PyModule_AddObject(m, "netr_SamInfo6", (PyObject *)(void *)&netr_SamInfo6_Type);
   63121        3559 :         Py_INCREF((PyObject *)(void *)&netr_PacInfo_Type);
   63122        3559 :         PyModule_AddObject(m, "netr_PacInfo", (PyObject *)(void *)&netr_PacInfo_Type);
   63123        3559 :         Py_INCREF((PyObject *)(void *)&netr_GenericInfo2_Type);
   63124        3559 :         PyModule_AddObject(m, "netr_GenericInfo2", (PyObject *)(void *)&netr_GenericInfo2_Type);
   63125        3559 :         Py_INCREF((PyObject *)(void *)&netr_Validation_Type);
   63126        3559 :         PyModule_AddObject(m, "netr_Validation", (PyObject *)(void *)&netr_Validation_Type);
   63127        3559 :         Py_INCREF((PyObject *)(void *)&netr_Credential_Type);
   63128        3559 :         PyModule_AddObject(m, "netr_Credential", (PyObject *)(void *)&netr_Credential_Type);
   63129        3559 :         Py_INCREF((PyObject *)(void *)&netr_Authenticator_Type);
   63130        3559 :         PyModule_AddObject(m, "netr_Authenticator", (PyObject *)(void *)&netr_Authenticator_Type);
   63131        3559 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_DELETE_USER_Type);
   63132        3559 :         PyModule_AddObject(m, "netr_DELTA_DELETE_USER", (PyObject *)(void *)&netr_DELTA_DELETE_USER_Type);
   63133        3559 :         Py_INCREF((PyObject *)(void *)&netr_USER_KEY16_Type);
   63134        3559 :         PyModule_AddObject(m, "netr_USER_KEY16", (PyObject *)(void *)&netr_USER_KEY16_Type);
   63135        3559 :         Py_INCREF((PyObject *)(void *)&netr_PasswordHistory_Type);
   63136        3559 :         PyModule_AddObject(m, "netr_PasswordHistory", (PyObject *)(void *)&netr_PasswordHistory_Type);
   63137        3559 :         Py_INCREF((PyObject *)(void *)&netr_USER_KEYS2_Type);
   63138        3559 :         PyModule_AddObject(m, "netr_USER_KEYS2", (PyObject *)(void *)&netr_USER_KEYS2_Type);
   63139        3559 :         Py_INCREF((PyObject *)(void *)&netr_USER_KEY_UNION_Type);
   63140        3559 :         PyModule_AddObject(m, "netr_USER_KEY_UNION", (PyObject *)(void *)&netr_USER_KEY_UNION_Type);
   63141        3559 :         Py_INCREF((PyObject *)(void *)&netr_USER_KEYS_Type);
   63142        3559 :         PyModule_AddObject(m, "netr_USER_KEYS", (PyObject *)(void *)&netr_USER_KEYS_Type);
   63143        3559 :         Py_INCREF((PyObject *)(void *)&netr_USER_PRIVATE_INFO_Type);
   63144        3559 :         PyModule_AddObject(m, "netr_USER_PRIVATE_INFO", (PyObject *)(void *)&netr_USER_PRIVATE_INFO_Type);
   63145        3559 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_USER_Type);
   63146        3559 :         PyModule_AddObject(m, "netr_DELTA_USER", (PyObject *)(void *)&netr_DELTA_USER_Type);
   63147        3559 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_DOMAIN_Type);
   63148        3559 :         PyModule_AddObject(m, "netr_DELTA_DOMAIN", (PyObject *)(void *)&netr_DELTA_DOMAIN_Type);
   63149        3559 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_GROUP_Type);
   63150        3559 :         PyModule_AddObject(m, "netr_DELTA_GROUP", (PyObject *)(void *)&netr_DELTA_GROUP_Type);
   63151        3559 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_RENAME_Type);
   63152        3559 :         PyModule_AddObject(m, "netr_DELTA_RENAME", (PyObject *)(void *)&netr_DELTA_RENAME_Type);
   63153        3559 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_GROUP_MEMBER_Type);
   63154        3559 :         PyModule_AddObject(m, "netr_DELTA_GROUP_MEMBER", (PyObject *)(void *)&netr_DELTA_GROUP_MEMBER_Type);
   63155        3559 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_ALIAS_Type);
   63156        3559 :         PyModule_AddObject(m, "netr_DELTA_ALIAS", (PyObject *)(void *)&netr_DELTA_ALIAS_Type);
   63157        3559 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_ALIAS_MEMBER_Type);
   63158        3559 :         PyModule_AddObject(m, "netr_DELTA_ALIAS_MEMBER", (PyObject *)(void *)&netr_DELTA_ALIAS_MEMBER_Type);
   63159        3559 :         Py_INCREF((PyObject *)(void *)&netr_QUOTA_LIMITS_Type);
   63160        3559 :         PyModule_AddObject(m, "netr_QUOTA_LIMITS", (PyObject *)(void *)&netr_QUOTA_LIMITS_Type);
   63161        3559 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_POLICY_Type);
   63162        3559 :         PyModule_AddObject(m, "netr_DELTA_POLICY", (PyObject *)(void *)&netr_DELTA_POLICY_Type);
   63163        3559 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_TRUSTED_DOMAIN_Type);
   63164        3559 :         PyModule_AddObject(m, "netr_DELTA_TRUSTED_DOMAIN", (PyObject *)(void *)&netr_DELTA_TRUSTED_DOMAIN_Type);
   63165        3559 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_ACCOUNT_Type);
   63166        3559 :         PyModule_AddObject(m, "netr_DELTA_ACCOUNT", (PyObject *)(void *)&netr_DELTA_ACCOUNT_Type);
   63167        3559 :         Py_INCREF((PyObject *)(void *)&netr_CIPHER_VALUE_Type);
   63168        3559 :         PyModule_AddObject(m, "netr_CIPHER_VALUE", (PyObject *)(void *)&netr_CIPHER_VALUE_Type);
   63169        3559 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_SECRET_Type);
   63170        3559 :         PyModule_AddObject(m, "netr_DELTA_SECRET", (PyObject *)(void *)&netr_DELTA_SECRET_Type);
   63171        3559 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_UNION_Type);
   63172        3559 :         PyModule_AddObject(m, "netr_DELTA_UNION", (PyObject *)(void *)&netr_DELTA_UNION_Type);
   63173        3559 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_ID_UNION_Type);
   63174        3559 :         PyModule_AddObject(m, "netr_DELTA_ID_UNION", (PyObject *)(void *)&netr_DELTA_ID_UNION_Type);
   63175        3559 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_ENUM_Type);
   63176        3559 :         PyModule_AddObject(m, "netr_DELTA_ENUM", (PyObject *)(void *)&netr_DELTA_ENUM_Type);
   63177        3559 :         Py_INCREF((PyObject *)(void *)&netr_DELTA_ENUM_ARRAY_Type);
   63178        3559 :         PyModule_AddObject(m, "netr_DELTA_ENUM_ARRAY", (PyObject *)(void *)&netr_DELTA_ENUM_ARRAY_Type);
   63179        3559 :         Py_INCREF((PyObject *)(void *)&netr_UAS_INFO_0_Type);
   63180        3559 :         PyModule_AddObject(m, "netr_UAS_INFO_0", (PyObject *)(void *)&netr_UAS_INFO_0_Type);
   63181        3559 :         Py_INCREF((PyObject *)(void *)&netr_AccountBuffer_Type);
   63182        3559 :         PyModule_AddObject(m, "netr_AccountBuffer", (PyObject *)(void *)&netr_AccountBuffer_Type);
   63183        3559 :         Py_INCREF((PyObject *)(void *)&netr_NETLOGON_INFO_1_Type);
   63184        3559 :         PyModule_AddObject(m, "netr_NETLOGON_INFO_1", (PyObject *)(void *)&netr_NETLOGON_INFO_1_Type);
   63185        3559 :         Py_INCREF((PyObject *)(void *)&netr_NETLOGON_INFO_2_Type);
   63186        3559 :         PyModule_AddObject(m, "netr_NETLOGON_INFO_2", (PyObject *)(void *)&netr_NETLOGON_INFO_2_Type);
   63187        3559 :         Py_INCREF((PyObject *)(void *)&netr_NETLOGON_INFO_3_Type);
   63188        3559 :         PyModule_AddObject(m, "netr_NETLOGON_INFO_3", (PyObject *)(void *)&netr_NETLOGON_INFO_3_Type);
   63189        3559 :         Py_INCREF((PyObject *)(void *)&netr_NETLOGON_INFO_4_Type);
   63190        3559 :         PyModule_AddObject(m, "netr_NETLOGON_INFO_4", (PyObject *)(void *)&netr_NETLOGON_INFO_4_Type);
   63191        3559 :         Py_INCREF((PyObject *)(void *)&netr_CONTROL_QUERY_INFORMATION_Type);
   63192        3559 :         PyModule_AddObject(m, "netr_CONTROL_QUERY_INFORMATION", (PyObject *)(void *)&netr_CONTROL_QUERY_INFORMATION_Type);
   63193        3559 :         Py_INCREF((PyObject *)(void *)&netr_CONTROL_DATA_INFORMATION_Type);
   63194        3559 :         PyModule_AddObject(m, "netr_CONTROL_DATA_INFORMATION", (PyObject *)(void *)&netr_CONTROL_DATA_INFORMATION_Type);
   63195        3559 :         Py_INCREF((PyObject *)(void *)&netr_ChangeLogObject_Type);
   63196        3559 :         PyModule_AddObject(m, "netr_ChangeLogObject", (PyObject *)(void *)&netr_ChangeLogObject_Type);
   63197        3559 :         Py_INCREF((PyObject *)(void *)&netr_ChangeLogEntry_Type);
   63198        3559 :         PyModule_AddObject(m, "netr_ChangeLogEntry", (PyObject *)(void *)&netr_ChangeLogEntry_Type);
   63199        3559 :         Py_INCREF((PyObject *)(void *)&netr_Blob_Type);
   63200        3559 :         PyModule_AddObject(m, "netr_Blob", (PyObject *)(void *)&netr_Blob_Type);
   63201        3559 :         Py_INCREF((PyObject *)(void *)&netr_DsRGetDCNameInfo_Type);
   63202        3559 :         PyModule_AddObject(m, "netr_DsRGetDCNameInfo", (PyObject *)(void *)&netr_DsRGetDCNameInfo_Type);
   63203        3559 :         Py_INCREF((PyObject *)(void *)&netr_Capabilities_Type);
   63204        3559 :         PyModule_AddObject(m, "netr_Capabilities", (PyObject *)(void *)&netr_Capabilities_Type);
   63205        3559 :         Py_INCREF((PyObject *)(void *)&netr_LsaPolicyInformation_Type);
   63206        3559 :         PyModule_AddObject(m, "netr_LsaPolicyInformation", (PyObject *)(void *)&netr_LsaPolicyInformation_Type);
   63207        3559 :         Py_INCREF((PyObject *)(void *)&netr_OsVersionInfoEx_Type);
   63208        3559 :         PyModule_AddObject(m, "netr_OsVersionInfoEx", (PyObject *)(void *)&netr_OsVersionInfoEx_Type);
   63209        3559 :         Py_INCREF((PyObject *)(void *)&netr_OsVersion_Type);
   63210        3559 :         PyModule_AddObject(m, "netr_OsVersion", (PyObject *)(void *)&netr_OsVersion_Type);
   63211        3559 :         Py_INCREF((PyObject *)(void *)&netr_OsVersionContainer_Type);
   63212        3559 :         PyModule_AddObject(m, "netr_OsVersionContainer", (PyObject *)(void *)&netr_OsVersionContainer_Type);
   63213        3559 :         Py_INCREF((PyObject *)(void *)&netr_WorkstationInformation_Type);
   63214        3559 :         PyModule_AddObject(m, "netr_WorkstationInformation", (PyObject *)(void *)&netr_WorkstationInformation_Type);
   63215        3559 :         Py_INCREF((PyObject *)(void *)&netr_WorkstationInfo_Type);
   63216        3559 :         PyModule_AddObject(m, "netr_WorkstationInfo", (PyObject *)(void *)&netr_WorkstationInfo_Type);
   63217        3559 :         Py_INCREF((PyObject *)(void *)&netr_trust_extension_info_Type);
   63218        3559 :         PyModule_AddObject(m, "netr_trust_extension_info", (PyObject *)(void *)&netr_trust_extension_info_Type);
   63219        3559 :         Py_INCREF((PyObject *)(void *)&netr_trust_extension_Type);
   63220        3559 :         PyModule_AddObject(m, "netr_trust_extension", (PyObject *)(void *)&netr_trust_extension_Type);
   63221        3559 :         Py_INCREF((PyObject *)(void *)&netr_trust_extension_container_Type);
   63222        3559 :         PyModule_AddObject(m, "netr_trust_extension_container", (PyObject *)(void *)&netr_trust_extension_container_Type);
   63223        3559 :         Py_INCREF((PyObject *)(void *)&netr_OneDomainInfo_Type);
   63224        3559 :         PyModule_AddObject(m, "netr_OneDomainInfo", (PyObject *)(void *)&netr_OneDomainInfo_Type);
   63225        3559 :         Py_INCREF((PyObject *)(void *)&netr_DomainInformation_Type);
   63226        3559 :         PyModule_AddObject(m, "netr_DomainInformation", (PyObject *)(void *)&netr_DomainInformation_Type);
   63227        3559 :         Py_INCREF((PyObject *)(void *)&netr_DomainInfo_Type);
   63228        3559 :         PyModule_AddObject(m, "netr_DomainInfo", (PyObject *)(void *)&netr_DomainInfo_Type);
   63229        3559 :         Py_INCREF((PyObject *)(void *)&NL_PASSWORD_VERSION_Type);
   63230        3559 :         PyModule_AddObject(m, "NL_PASSWORD_VERSION", (PyObject *)(void *)&NL_PASSWORD_VERSION_Type);
   63231        3559 :         Py_INCREF((PyObject *)(void *)&netr_CryptPassword_Type);
   63232        3559 :         PyModule_AddObject(m, "netr_CryptPassword", (PyObject *)(void *)&netr_CryptPassword_Type);
   63233        3559 :         Py_INCREF((PyObject *)(void *)&netr_SendToSamResetBadPasswordCount_Type);
   63234        3559 :         PyModule_AddObject(m, "netr_SendToSamResetBadPasswordCount", (PyObject *)(void *)&netr_SendToSamResetBadPasswordCount_Type);
   63235        3559 :         Py_INCREF((PyObject *)(void *)&netr_SendToSamMessage_Type);
   63236        3559 :         PyModule_AddObject(m, "netr_SendToSamMessage", (PyObject *)(void *)&netr_SendToSamMessage_Type);
   63237        3559 :         Py_INCREF((PyObject *)(void *)&netr_SendToSamBase_Type);
   63238        3559 :         PyModule_AddObject(m, "netr_SendToSamBase", (PyObject *)(void *)&netr_SendToSamBase_Type);
   63239        3559 :         Py_INCREF((PyObject *)(void *)&netr_DsRAddressToSitenamesWCtr_Type);
   63240        3559 :         PyModule_AddObject(m, "netr_DsRAddressToSitenamesWCtr", (PyObject *)(void *)&netr_DsRAddressToSitenamesWCtr_Type);
   63241        3559 :         Py_INCREF((PyObject *)(void *)&netr_DsRAddress_Type);
   63242        3559 :         PyModule_AddObject(m, "netr_DsRAddress", (PyObject *)(void *)&netr_DsRAddress_Type);
   63243        3559 :         Py_INCREF((PyObject *)(void *)&netr_DomainTrust_Type);
   63244        3559 :         PyModule_AddObject(m, "netr_DomainTrust", (PyObject *)(void *)&netr_DomainTrust_Type);
   63245        3559 :         Py_INCREF((PyObject *)(void *)&netr_DomainTrustList_Type);
   63246        3559 :         PyModule_AddObject(m, "netr_DomainTrustList", (PyObject *)(void *)&netr_DomainTrustList_Type);
   63247        3559 :         Py_INCREF((PyObject *)(void *)&netr_DsRAddressToSitenamesExWCtr_Type);
   63248        3559 :         PyModule_AddObject(m, "netr_DsRAddressToSitenamesExWCtr", (PyObject *)(void *)&netr_DsRAddressToSitenamesExWCtr_Type);
   63249        3559 :         Py_INCREF((PyObject *)(void *)&DcSitesCtr_Type);
   63250        3559 :         PyModule_AddObject(m, "DcSitesCtr", (PyObject *)(void *)&DcSitesCtr_Type);
   63251        3559 :         Py_INCREF((PyObject *)(void *)&netr_TrustInfo_Type);
   63252        3559 :         PyModule_AddObject(m, "netr_TrustInfo", (PyObject *)(void *)&netr_TrustInfo_Type);
   63253        3559 :         Py_INCREF((PyObject *)(void *)&NL_DNS_NAME_INFO_Type);
   63254        3559 :         PyModule_AddObject(m, "NL_DNS_NAME_INFO", (PyObject *)(void *)&NL_DNS_NAME_INFO_Type);
   63255        3559 :         Py_INCREF((PyObject *)(void *)&NL_DNS_NAME_INFO_ARRAY_Type);
   63256        3559 :         PyModule_AddObject(m, "NL_DNS_NAME_INFO_ARRAY", (PyObject *)(void *)&NL_DNS_NAME_INFO_ARRAY_Type);
   63257        3559 :         Py_INCREF((PyObject *)(void *)&netr_LogonUasLogon_Type);
   63258        3559 :         PyModule_AddObject(m, "netr_LogonUasLogon", (PyObject *)(void *)&netr_LogonUasLogon_Type);
   63259        3559 :         Py_INCREF((PyObject *)(void *)&netr_LogonUasLogoff_Type);
   63260        3559 :         PyModule_AddObject(m, "netr_LogonUasLogoff", (PyObject *)(void *)&netr_LogonUasLogoff_Type);
   63261        3559 :         Py_INCREF((PyObject *)(void *)&netr_LogonSamLogon_Type);
   63262        3559 :         PyModule_AddObject(m, "netr_LogonSamLogon", (PyObject *)(void *)&netr_LogonSamLogon_Type);
   63263        3559 :         Py_INCREF((PyObject *)(void *)&netr_LogonSamLogoff_Type);
   63264        3559 :         PyModule_AddObject(m, "netr_LogonSamLogoff", (PyObject *)(void *)&netr_LogonSamLogoff_Type);
   63265        3559 :         Py_INCREF((PyObject *)(void *)&netr_ServerReqChallenge_Type);
   63266        3559 :         PyModule_AddObject(m, "netr_ServerReqChallenge", (PyObject *)(void *)&netr_ServerReqChallenge_Type);
   63267        3559 :         Py_INCREF((PyObject *)(void *)&netr_ServerAuthenticate_Type);
   63268        3559 :         PyModule_AddObject(m, "netr_ServerAuthenticate", (PyObject *)(void *)&netr_ServerAuthenticate_Type);
   63269        3559 :         Py_INCREF((PyObject *)(void *)&netr_ServerPasswordSet_Type);
   63270        3559 :         PyModule_AddObject(m, "netr_ServerPasswordSet", (PyObject *)(void *)&netr_ServerPasswordSet_Type);
   63271        3559 :         Py_INCREF((PyObject *)(void *)&netr_DatabaseDeltas_Type);
   63272        3559 :         PyModule_AddObject(m, "netr_DatabaseDeltas", (PyObject *)(void *)&netr_DatabaseDeltas_Type);
   63273        3559 :         Py_INCREF((PyObject *)(void *)&netr_DatabaseSync_Type);
   63274        3559 :         PyModule_AddObject(m, "netr_DatabaseSync", (PyObject *)(void *)&netr_DatabaseSync_Type);
   63275        3559 :         Py_INCREF((PyObject *)(void *)&netr_AccountDeltas_Type);
   63276        3559 :         PyModule_AddObject(m, "netr_AccountDeltas", (PyObject *)(void *)&netr_AccountDeltas_Type);
   63277        3559 :         Py_INCREF((PyObject *)(void *)&netr_AccountSync_Type);
   63278        3559 :         PyModule_AddObject(m, "netr_AccountSync", (PyObject *)(void *)&netr_AccountSync_Type);
   63279        3559 :         Py_INCREF((PyObject *)(void *)&netr_GetDcName_Type);
   63280        3559 :         PyModule_AddObject(m, "netr_GetDcName", (PyObject *)(void *)&netr_GetDcName_Type);
   63281        3559 :         Py_INCREF((PyObject *)(void *)&netr_LogonControl_Type);
   63282        3559 :         PyModule_AddObject(m, "netr_LogonControl", (PyObject *)(void *)&netr_LogonControl_Type);
   63283        3559 :         Py_INCREF((PyObject *)(void *)&netr_GetAnyDCName_Type);
   63284        3559 :         PyModule_AddObject(m, "netr_GetAnyDCName", (PyObject *)(void *)&netr_GetAnyDCName_Type);
   63285        3559 :         Py_INCREF((PyObject *)(void *)&netr_LogonControl2_Type);
   63286        3559 :         PyModule_AddObject(m, "netr_LogonControl2", (PyObject *)(void *)&netr_LogonControl2_Type);
   63287        3559 :         Py_INCREF((PyObject *)(void *)&netr_ServerAuthenticate2_Type);
   63288        3559 :         PyModule_AddObject(m, "netr_ServerAuthenticate2", (PyObject *)(void *)&netr_ServerAuthenticate2_Type);
   63289        3559 :         Py_INCREF((PyObject *)(void *)&netr_DatabaseSync2_Type);
   63290        3559 :         PyModule_AddObject(m, "netr_DatabaseSync2", (PyObject *)(void *)&netr_DatabaseSync2_Type);
   63291        3559 :         Py_INCREF((PyObject *)(void *)&netr_DatabaseRedo_Type);
   63292        3559 :         PyModule_AddObject(m, "netr_DatabaseRedo", (PyObject *)(void *)&netr_DatabaseRedo_Type);
   63293        3559 :         Py_INCREF((PyObject *)(void *)&netr_LogonControl2Ex_Type);
   63294        3559 :         PyModule_AddObject(m, "netr_LogonControl2Ex", (PyObject *)(void *)&netr_LogonControl2Ex_Type);
   63295        3559 :         Py_INCREF((PyObject *)(void *)&netr_NetrEnumerateTrustedDomains_Type);
   63296        3559 :         PyModule_AddObject(m, "netr_NetrEnumerateTrustedDomains", (PyObject *)(void *)&netr_NetrEnumerateTrustedDomains_Type);
   63297        3559 :         Py_INCREF((PyObject *)(void *)&netr_DsRGetDCName_Type);
   63298        3559 :         PyModule_AddObject(m, "netr_DsRGetDCName", (PyObject *)(void *)&netr_DsRGetDCName_Type);
   63299        3559 :         Py_INCREF((PyObject *)(void *)&netr_LogonGetCapabilities_Type);
   63300        3559 :         PyModule_AddObject(m, "netr_LogonGetCapabilities", (PyObject *)(void *)&netr_LogonGetCapabilities_Type);
   63301        3559 :         Py_INCREF((PyObject *)(void *)&netr_LogonGetTrustRid_Type);
   63302        3559 :         PyModule_AddObject(m, "netr_LogonGetTrustRid", (PyObject *)(void *)&netr_LogonGetTrustRid_Type);
   63303        3559 :         Py_INCREF((PyObject *)(void *)&netr_ServerAuthenticate3_Type);
   63304        3559 :         PyModule_AddObject(m, "netr_ServerAuthenticate3", (PyObject *)(void *)&netr_ServerAuthenticate3_Type);
   63305        3559 :         Py_INCREF((PyObject *)(void *)&netr_DsRGetDCNameEx_Type);
   63306        3559 :         PyModule_AddObject(m, "netr_DsRGetDCNameEx", (PyObject *)(void *)&netr_DsRGetDCNameEx_Type);
   63307        3559 :         Py_INCREF((PyObject *)(void *)&netr_DsRGetSiteName_Type);
   63308        3559 :         PyModule_AddObject(m, "netr_DsRGetSiteName", (PyObject *)(void *)&netr_DsRGetSiteName_Type);
   63309        3559 :         Py_INCREF((PyObject *)(void *)&netr_LogonGetDomainInfo_Type);
   63310        3559 :         PyModule_AddObject(m, "netr_LogonGetDomainInfo", (PyObject *)(void *)&netr_LogonGetDomainInfo_Type);
   63311        3559 :         Py_INCREF((PyObject *)(void *)&netr_ServerPasswordSet2_Type);
   63312        3559 :         PyModule_AddObject(m, "netr_ServerPasswordSet2", (PyObject *)(void *)&netr_ServerPasswordSet2_Type);
   63313        3559 :         Py_INCREF((PyObject *)(void *)&netr_ServerPasswordGet_Type);
   63314        3559 :         PyModule_AddObject(m, "netr_ServerPasswordGet", (PyObject *)(void *)&netr_ServerPasswordGet_Type);
   63315        3559 :         Py_INCREF((PyObject *)(void *)&netr_NetrLogonSendToSam_Type);
   63316        3559 :         PyModule_AddObject(m, "netr_NetrLogonSendToSam", (PyObject *)(void *)&netr_NetrLogonSendToSam_Type);
   63317        3559 :         Py_INCREF((PyObject *)(void *)&netr_DsRAddressToSitenamesW_Type);
   63318        3559 :         PyModule_AddObject(m, "netr_DsRAddressToSitenamesW", (PyObject *)(void *)&netr_DsRAddressToSitenamesW_Type);
   63319        3559 :         Py_INCREF((PyObject *)(void *)&netr_DsRGetDCNameEx2_Type);
   63320        3559 :         PyModule_AddObject(m, "netr_DsRGetDCNameEx2", (PyObject *)(void *)&netr_DsRGetDCNameEx2_Type);
   63321        3559 :         Py_INCREF((PyObject *)(void *)&netr_NetrEnumerateTrustedDomainsEx_Type);
   63322        3559 :         PyModule_AddObject(m, "netr_NetrEnumerateTrustedDomainsEx", (PyObject *)(void *)&netr_NetrEnumerateTrustedDomainsEx_Type);
   63323        3559 :         Py_INCREF((PyObject *)(void *)&netr_DsRAddressToSitenamesExW_Type);
   63324        3559 :         PyModule_AddObject(m, "netr_DsRAddressToSitenamesExW", (PyObject *)(void *)&netr_DsRAddressToSitenamesExW_Type);
   63325        3559 :         Py_INCREF((PyObject *)(void *)&netr_DsrGetDcSiteCoverageW_Type);
   63326        3559 :         PyModule_AddObject(m, "netr_DsrGetDcSiteCoverageW", (PyObject *)(void *)&netr_DsrGetDcSiteCoverageW_Type);
   63327        3559 :         Py_INCREF((PyObject *)(void *)&netr_LogonSamLogonEx_Type);
   63328        3559 :         PyModule_AddObject(m, "netr_LogonSamLogonEx", (PyObject *)(void *)&netr_LogonSamLogonEx_Type);
   63329        3559 :         Py_INCREF((PyObject *)(void *)&netr_DsrEnumerateDomainTrusts_Type);
   63330        3559 :         PyModule_AddObject(m, "netr_DsrEnumerateDomainTrusts", (PyObject *)(void *)&netr_DsrEnumerateDomainTrusts_Type);
   63331        3559 :         Py_INCREF((PyObject *)(void *)&netr_DsrDeregisterDNSHostRecords_Type);
   63332        3559 :         PyModule_AddObject(m, "netr_DsrDeregisterDNSHostRecords", (PyObject *)(void *)&netr_DsrDeregisterDNSHostRecords_Type);
   63333        3559 :         Py_INCREF((PyObject *)(void *)&netr_ServerTrustPasswordsGet_Type);
   63334        3559 :         PyModule_AddObject(m, "netr_ServerTrustPasswordsGet", (PyObject *)(void *)&netr_ServerTrustPasswordsGet_Type);
   63335        3559 :         Py_INCREF((PyObject *)(void *)&netr_DsRGetForestTrustInformation_Type);
   63336        3559 :         PyModule_AddObject(m, "netr_DsRGetForestTrustInformation", (PyObject *)(void *)&netr_DsRGetForestTrustInformation_Type);
   63337        3559 :         Py_INCREF((PyObject *)(void *)&netr_GetForestTrustInformation_Type);
   63338        3559 :         PyModule_AddObject(m, "netr_GetForestTrustInformation", (PyObject *)(void *)&netr_GetForestTrustInformation_Type);
   63339        3559 :         Py_INCREF((PyObject *)(void *)&netr_LogonSamLogonWithFlags_Type);
   63340        3559 :         PyModule_AddObject(m, "netr_LogonSamLogonWithFlags", (PyObject *)(void *)&netr_LogonSamLogonWithFlags_Type);
   63341        3559 :         Py_INCREF((PyObject *)(void *)&netr_ServerGetTrustInfo_Type);
   63342        3559 :         PyModule_AddObject(m, "netr_ServerGetTrustInfo", (PyObject *)(void *)&netr_ServerGetTrustInfo_Type);
   63343        3559 :         Py_INCREF((PyObject *)(void *)&netr_Unused47_Type);
   63344        3559 :         PyModule_AddObject(m, "netr_Unused47", (PyObject *)(void *)&netr_Unused47_Type);
   63345        3559 :         Py_INCREF((PyObject *)(void *)&netr_DsrUpdateReadOnlyServerDnsRecords_Type);
   63346        3559 :         PyModule_AddObject(m, "netr_DsrUpdateReadOnlyServerDnsRecords", (PyObject *)(void *)&netr_DsrUpdateReadOnlyServerDnsRecords_Type);
   63347        3559 :         Py_INCREF((PyObject *)(void *)&netlogon_InterfaceType);
   63348        3559 :         PyModule_AddObject(m, "netlogon", (PyObject *)(void *)&netlogon_InterfaceType);
   63349        3559 :         Py_INCREF((PyObject *)(void *)&netlogon_SyntaxType);
   63350        3559 :         PyModule_AddObject(m, "netlogon_abstract_syntax", (PyObject *)(void *)&netlogon_SyntaxType);
   63351        3559 :         Py_INCREF((PyObject *)(void *)&netlogon_SyntaxType);
   63352        3559 :         PyModule_AddObject(m, "abstract_syntax", (PyObject *)(void *)&netlogon_SyntaxType);
   63353             : #ifdef PY_MOD_NETLOGON_PATCH
   63354             :         PY_MOD_NETLOGON_PATCH(m);
   63355             : #endif
   63356        3559 :         out:
   63357        3559 :         Py_XDECREF(dep_samba_dcerpc_misc);
   63358        3559 :         Py_XDECREF(dep_samba_dcerpc_lsa);
   63359        3559 :         Py_XDECREF(dep_samba_dcerpc_samr);
   63360        3559 :         Py_XDECREF(dep_samba_dcerpc_security);
   63361        3559 :         Py_XDECREF(dep_talloc);
   63362        3559 :         Py_XDECREF(dep_samba_dcerpc_base);
   63363        3437 :         return m;
   63364             : 
   63365             : }

Generated by: LCOV version 1.13